Skip to main content

Quick Start

briiianAuthored by briiian · Last updated
self-hosted

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.

Prerequisites

You will need:

  • A computer with Docker running.

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.

These examples are designed to maximize ease of access, at the expense of hardening. Before you go live with your Media Server, you should visit the Deployment guide to optimize and secure your self-hosted setup.

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:
condition: service_healthy
restart: unless-stopped
cardinal-media-server-stable-postgres-db:
image: postgres:16
container_name: cardinal-media-server-stable-postgres-db
restart: always
environment:
- POSTGRES_USER=cardinal
- POSTGRES_PASSWORD=cardinal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cardinal"]
interval: 5s
timeout: 5s
retries: 5
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.

Start the server

Save your chosen example as docker-compose.yaml, then run this from the same folder:

docker compose up -d

Cardinal Media Server is now running on port 24900 of the machine you installed it on. Run the following command to see the full hostname. Look for the Welcome box.

docker compose logs -f

Note: You cannot use localhost or any loopback address. You must use your machine's LAN IP or public hostname.

Open the Admin Dashboard

In your browser, go to:

<hostname>:24900

Where you will be guided through a short first-time setup.

Next steps

Once you have Cardinal Media Server running, you should then:

  • Index your media: a necessary step before you can stream your music, photos, movies, and TV. See the Indexing guide.
  • Harden and optimize your setup: before you open up your server, consult the Deployment guide for information on how to secure your server, and how to optimize it for your environment.
  • Log in with Cardinal: claim your self-hosted apps with a free Cardinal account, and unlock cloud services in your apps. Entirely optional, but worth it. See the Accounts guide.

Was this article helpful?