4. Installing Cardinal Home Server
Step 1: Create a docker-compose.yaml file
Installing a Docker app is a bit different from installing a regular desktop app. Instead of using some kind of .exe
or .dmg
, you're going to copy and paste some text into a plain text file and save it somewhere on your computer. Then, you'll let Docker read that file and it will handle everything else.
- Create an empty text file anywhere on your computer called
docker-compose.yaml
. Normally, a plain text file ends with.txt
, but in this case you need to make sure it's actually.yaml
. You can move the file around later too. - Open your
docker-compose.yaml
file with a plain text editor like Notepad or TextEdit and paste in this big blob of text.
- Linux & macOS
- Windows
services:
cardinal:
image: cardinalapps/home-server:stable
container_name: cardinal
ports:
- 24900:24900
volumes:
- cardinal-data:/config
- PATH_TO_MY_MUSIC_FILES:/music # Update or remove this
- PATH_TO_MY_PHOTO_FILES:/photos # Update or remove this
- PATH_TO_MY_TV_FILES:/tv # Update or remove this
- PATH_TO_MY_MOVIE_FILES:/movies # Update or remove this
restart: unless-stopped
volumes:
cardinal-data:
Windows users must make sure to change their backward slashes (\
) to forward slashes (/
).
services:
cardinal:
image: cardinalapps/home-server:stable
container_name: cardinal
ports:
- 24900:24900
volumes:
- cardinal-data:/config
- "C:/PATH/TO/MY/MUSIC/FILES:/music" # Update or remove this
- "C:/PATH/TO/MY/PHOTO/FILES:/photos" # Update or remove this
- "C:/PATH/TO/MY/TV/FILES:/tv" # Update or remove this
- "C:/PATH/TO/MY/MOVIE/FILES:/movies" # Update or remove this
restart: unless-stopped
volumes:
cardinal-data:
- See those four highlighted lines? You'll need to replace the text in all caps on the left side of the colons with your real folder paths.
- If you don't want to use a specific media type, erase the entire line.
If you aren't sure how to find a folder path on your computer, here's a simple way to do it in a few operating systems.
- In Explorer, right-click the folder.
- Click
Copy as Path
.
- In Explorer, right-click the folder.
- Click
Properties
. - Copy the
Path
.
- In Finder, right-click the folder.
- Press and hold
⌥ option
. - Click
Copy "Folder" as Pathname
.
- In Files, right-click the folder.
- Click
Open in Terminal
. - Type
pwd
and press enter.
- Once you've added all the media paths you want to use, save your
docker-compose.yaml
file and close it.
Step 2: Start up Cardinal Home Server
The main way to run apps that use a docker-compose.yaml file is to run commands in a terminal in the same folder as your docker-compose.yaml
.
Now that your docker-compose.yaml
file is ready, you can use it to start up Cardinal Home Server.
- Open a terminal and navigate to the folder with your
docker-compose.yaml
file.
If you aren't sure how to do that, here's how to navigate to a folder in a terminal in a few operating systems.
- In Explorer, right-click the folder that has your
docker-compose.yaml
file. - Click
Open in Terminal
.
- In Explorer, right-click your
docker-compose.yaml
file. - Click
Properties
. - Copy the
Where
path. - Open a terminal and type
cd [folder]
where "[folder]" is the path you just copied, and press enter.
- In Finder, right-click your
docker-compose.yaml
file. - Click
Get Info
. - Click
Copy "Folder" as Pathname
. - Open a terminal and type
cd [folder]
where "[folder]" is the path you just copied, and press enter.
- In Files, right-click your
docker-compose.yaml
file. - Click
Properties
. - Copy the
Parent Folder
path. - Open a terminal and type
cd [folder]
where "[folder]" is the path you just copied, and press enter.
You have navigated to your docker-compose.yaml
file, and you can operate your Cardinal Home Server from here.
- Enter
docker compose up -d
and press enter. This tells Docker to read the file and start the app.- You may see database connection errors the first time you start up Cardinal Home Server. This is fine; the Home Server simply initialized before PostgreSQL did. Everything will continue normally once PostgreSQL finishes its first time startup.
Congratulations! Cardinal Home Server is now running. You can verify that it's working by running the command docker ps
in your terminal. You should see it in that list.
Step 3: Open the Cardinal Home Server dashboard
Your Cardinal Home Server dashboard will be running on port 24900
of the computer you installed it on. You can enter docker logs cardinal
to see the URL where you can access it. You cannot use localhost
to access your server.
When you visit your dashboard for the first time, it will take you to the First Time Setup.