Skip to main content

Quick Start

To use Cardinal Music, Photos, and Cinema, you will need to run Cardinal Media Server.

Cardinal Media Server is available for free on Docker Hub, and comes bundled with all of Cardinal's web apps.

Docker Compose

Use the sample docker-compose.yaml files below for your chosen release channel and database. Both SQLite and PostgreSQL are supported. If you aren't sure which database to use, go with SQLite.

SQLite

docker-compose.yaml
services:
cardinal-media-server-stable-sqlite:
image: cardinalapps/media-server:stable
container_name: cardinal-media-server-stable-sqlite
ports:
- 24900:24900
volumes:
- cardinal-media-server-stable-sqlite-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-media-server-stable-sqlite-data:

PostgreSQL

docker-compose.yaml
services:
cardinal-media-server-stable-postgres:
image: cardinalapps/media-server:stable
container_name: cardinal-media-server-stable-postgres
ports:
- 24900:24900
environment:
- CARDINAL_POSTGRES=true
volumes:
- cardinal-media-server-stable-postgres-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
depends_on:
- cardinal-media-server-stable-postgres-db
links:
- cardinal-media-server-stable-postgres-db
restart: unless-stopped
cardinal-media-server-stable-postgres-db:
image: postgres:16.3
container_name: cardinal-media-server-stable-postgres-db
restart: always
environment:
- POSTGRES_USER=cardinal
- POSTGRES_PASSWORD=cardinal
ports:
- 24910:5432
volumes:
- cardinal-media-server-stable-postgres-db-data:/var/lib/postgresql/data
volumes:
cardinal-media-server-stable-postgres-data:
cardinal-media-server-stable-postgres-db-data:

Note 1: If you want to change either the POSTGRES_USER or POSTGRES_PASSWORD values, you must also pass them to the Cardinal environment.

Note 2: You cannot change the POSTGRES_USER or POSTGRES_PASSWORD values after PostgreSQL creates its volume.

Docker CLI

You can use the Docker CLI instead of Docker Compose to run Cardinal Media Server with SQLite. Using PostgreSQL with the CLI is not officially supported.

docker run \
-d \
--name cardinal \
-p 24900:24900 \
-v cardinal-data:/config \
-v PATH_TO_MY_MUSIC_FILES:/music \
-v PATH_TO_MY_PHOTO_FILES:/photos \
-v PATH_TO_MY_TV_FILES:/tv \
-v PATH_TO_MY_MOVIE_FILES:/movies \
--restart unless-stopped \
cardinalapps/media-server:stable

Environment Variables

See the Environment Variables guide.

Next Steps

There are a few suggestions for what to do next in the Next Steps.