Skip to content

Getting Started

Magritte is an application server designed to run on desktop-class machines, single-board computers, network-attached storage devices, and in the cloud.

Magritte is available as a Docker image published to the GitHub container registry. Use a docker compose file to customize the image to suit your use case:

services:
magritte:
image: ghcr.io/magritte-project/magritte:latest
container_name: magritte
restart: unless-stopped
ports:
- "8090:8090"
volumes:
# Database, generated secrets ($DATA_HOME/env), and other instance data
- /path/to/data:/data
# Your music library. Drop ":ro" if you enable uploads.
- /path/to/your/music:/music:ro
environment:
# Public URL of this instance; used in links and the email sender address.
WEB_URL: https://music.example.com

The containerized version of Magritte stores its data at /data and looks for music files at /music. Your docker compose file should specify volume rules for both of these paths.

The first time containerized Magritte is started, it will generate token secrets and salt and save them to a file in its data directory.

Important: By default, Magritte is started from its own user with UID/GID 1000 inside the container. You may need to give access to your data / music directories from the host system in order for Magritte to function. Alternatively, you can run the container as your host user:

services:
magritte:
...
user: "${UID:-1000}:${GID:-1000}"

If your host does not set $UID or $GID, like Synology Container Manager, you will need to acquire your UID and GID manually over SSH with the id command.