Skip to main content

Install with Docker Compose

Run these commands one at a time on your server.

1. Make a folder​

mkdir -p ~/mediarr && cd ~/mediarr

2. Download the two files​

curl -fsSL -o docker-compose.yml https://cdn.mediarr.app/install/docker-compose.yml
curl -fsSL -o .env https://cdn.mediarr.app/install/example.env

3. Edit .env​

nano .env

Change these values:

SettingWhat to put
DB_PASSWORDA long random password, with only letters and digits
UPLOAD_LOCATIONAbsolute path for your originals, such as /home/you/mediarr/library
CACHE_LOCATIONAbsolute path for thumbnails, such as /home/you/mediarr/cache
DB_LOCATIONAbsolute path for the database, on a local disk
PUID, PGIDYour user and group. The commands id -u and id -g show them

This makes a suitable password:

openssl rand -hex 24

4. Make the folders​

Make them yourself, so that they belong to your user and not to root. Use the paths from your .env:

mkdir -p /home/you/mediarr/library /home/you/mediarr/cache /home/you/mediarr/db

5. Start Mediarr​

docker compose up -d

The first start downloads the images, which takes a few minutes. This shows when everything is running:

docker compose ps

6. Open it​

Go to http://your-server-ip:9851 and create the first account, which becomes the administrator. Then continue with the first steps.

Do not open this port to the internet

Ports published by Docker bypass firewalls such as ufw. To reach Mediarr from outside, put a reverse proxy with HTTPS in front of it, or use a VPN.

Optional parts​

These are turned on in .env, then applied with docker compose up -d:

All settings are listed under environment variables.