4. Installing Cardinal Media 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.yamlfile with a plain text editor like Notepad or TextEdit and paste in this big blob of text.
- Linux & macOS
- Windows
services:
cardinal:
image: cardinalapps/media-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/media-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.
Windows 11- In Explorer, right-click the folder.
- Click
Copy as Path.
Windows 10- In Explorer, right-click the folder.
- Click
Properties. - Copy the
Path.
macOS- In Finder, right-click the folder.
- Press and hold
⌥ option. - Click
Copy "Folder" as Pathname.
Linux with GNOME- In Files, right-click the folder.
- Click
Open in Terminal. - Type
pwdand press enter.
- Once you've added all the media paths you want to use, save your
docker-compose.yamlfile and close it.
Step 2: Start up Cardinal Media 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 Media Server.
- Open a terminal and navigate to the folder with your
docker-compose.yamlfile.
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.
Windows 11- In Explorer, right-click the folder that has your
docker-compose.yamlfile. - Click
Open in Terminal.
Windows 10- In Explorer, right-click your
docker-compose.yamlfile. - Click
Properties. - Copy the
Wherepath. - Open a terminal and type
cd [folder]where "[folder]" is the path you just copied, and press enter.
macOS- In Finder, right-click your
docker-compose.yamlfile. - 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.
Linux with GNOME- In Files, right-click your
docker-compose.yamlfile. - Click
Properties. - Copy the
Parent Folderpath. - 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 Media Server from here.
- Enter
docker compose up -dand 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 Media Server. This is fine; the Media Server simply initialized before PostgreSQL did. Everything will continue normally once PostgreSQL finishes its first time startup.
Congratulations! Cardinal Media 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 Media Server dashboard
Your Cardinal Media 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.