Install with Docker Compose
The recommended way to run Songstress. One compose file, a short .env and one command.
Songstress is one container. These steps start it on any machine with Docker, in a few minutes, and open it in a browser. Check what you need first.
Install
Make a folder for Songstress
mkdir -p ~/songstress && cd ~/songstressSongstress keeps everything of its own in a data folder here: the database, everyone's settings and its caches.
Save the compose file
Save this as compose.yaml in that folder. You don't need to change anything in it: your own values go in .env.
x-logging: &logging
driver: json-file
options:
max-size: "50m"
max-file: "10"
services:
songstress:
image: ghcr.io/pacholoamit/songstress:${SONGSTRESS_TAG:-edge}
container_name: songstress
environment:
- TZ=${TZ:-UTC}
- PUID=${PUID:-}
- PGID=${PGID:-}
- SONGSTRESS_ADMIN_EMAIL=${SONGSTRESS_ADMIN_EMAIL:-}
- SONGSTRESS_ADMIN_PASSWORD=${SONGSTRESS_ADMIN_PASSWORD:-}
- SONGSTRESS_PUBLIC_URL=${SONGSTRESS_PUBLIC_URL:-}
- SONGSTRESS_SECRET_KEY=${SONGSTRESS_SECRET_KEY:-}
- ENABLE_TELEMETRY=${ENABLE_TELEMETRY:-true}
- UPDATE_CHECK=${UPDATE_CHECK:-on}
- SONGSTRESS_PB_EGRESS=${SONGSTRESS_PB_EGRESS:-direct}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- WRAPPED_REEL_MODE=${WRAPPED_REEL_MODE:-motion}
- TRANSCODE_LIVE_STREAM=${TRANSCODE_LIVE_STREAM:-1}
- TRANSCODE_LIVE_MAX=${TRANSCODE_LIVE_MAX:-8}
- TRANSCODE_EXACT=${TRANSCODE_EXACT:-0}
- ARTWORK_CACHE_MB=${ARTWORK_CACHE_MB:-2048}
- VOICE_PORT=${VOICE_PORT:-8093}
- VOICE_STUN=${VOICE_STUN:-}
- MUSIC_LIBRARIES=${MUSIC_LIBRARIES:-Main=/music}
- SWEEP_CRON=${SWEEP_CRON:-0 */6 * * *}
- WORKERS=${WORKERS:-5}
- DURATION_TOLERANCE_S=${DURATION_TOLERANCE_S:-3}
- SERVICE_ORDER=${SERVICE_ORDER:-}
- SPOTIFLAC_SOURCES=${SPOTIFLAC_SOURCES:-}
- UPGRADE_IMPORTED=${UPGRADE_IMPORTED:-true}
- DISCOGRAPHY_OUTPUT_TEMPLATE=${DISCOGRAPHY_OUTPUT_TEMPLATE:-}
- FILENAME_TEMPLATE=${FILENAME_TEMPLATE:-}
- RETRY_TRANSIENT_HOURS=${RETRY_TRANSIENT_HOURS:-6}
- RETRY_NOMATCH_DAYS=${RETRY_NOMATCH_DAYS:-30}
- ROTATE_AFTER_FAILS=${ROTATE_AFTER_FAILS:-6}
- MAX_ROTATIONS=${MAX_ROTATIONS:-50}
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID:-}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET:-}
- SPOTIFY_REDIRECT_URI=${SPOTIFY_REDIRECT_URI:-}
- LASTFM_API_KEY=${LASTFM_API_KEY:-}
- LASTFM_API_SECRET=${LASTFM_API_SECRET:-}
- GLUETUN_URL=${GLUETUN_URL:-http://127.0.0.1:8000}
- GLUETUN_API_KEY=${GLUETUN_API_KEY:-}
- YTDLP_COOKIES_FILE=${YTDLP_COOKIES_FILE:-}
- SONGSTRESS_COMMUNITY_API_KEY=${SONGSTRESS_COMMUNITY_API_KEY:-}
- SONGSTRESS_QOBUZ_APP_ID=${SONGSTRESS_QOBUZ_APP_ID:-}
- SONGSTRESS_QOBUZ_APP_SECRET=${SONGSTRESS_QOBUZ_APP_SECRET:-}
- SONGSTRESS_PROVIDER_ENDPOINTS=${SONGSTRESS_PROVIDER_ENDPOINTS:-}
- SONGSTRESS_PROVIDER_ENDPOINTS_REFRESH=${SONGSTRESS_PROVIDER_ENDPOINTS_REFRESH:-}
- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USERNAME=${SMTP_USERNAME:-}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
- SMTP_FROM=${SMTP_FROM:-}
- SMTP_TO=${SMTP_TO:-}
- SMTP_STARTTLS=${SMTP_STARTTLS:-true}
- HISTORY_IMPORT_PATH=${HISTORY_IMPORT_PATH:-}
ports:
# The web app and every app's connection.
- "${SONGSTRESS_PORT:-8090}:8090"
# Talking in a Jam: the same port inside and out, UDP and TCP.
- "${VOICE_PORT:-8093}:${VOICE_PORT:-8093}/udp"
- "${VOICE_PORT:-8093}:${VOICE_PORT:-8093}/tcp"
volumes:
# Songstress's own data: keep this folder, and back it up.
- ./data:/pb/pb_data
# Your music.
- ${MUSIC_DIR}:/music
tmpfs:
- /tmp:mode=1777,size=${SONGSTRESS_TMP_SIZE:-1536m}
restart: unless-stopped
logging: *logging
mem_limit: ${SONGSTRESS_MEM_LIMIT:-4g}
cpus: ${SONGSTRESS_CPUS:-0}Write your .env
Save this as .env beside it, with your own music folder and time zone.
MUSIC_DIR=/srv/music
SONGSTRESS_TAG=latest
TZ=Europe/BerlinMUSIC_DIRis the folder that holds your music, on this machine. If it is new, make it first withmkdir -p, as the user who owns your music.SONGSTRESS_TAGpicks the release.latestis the newest release. Left empty, you getedge, the newest build, which changes often. To stay on one version, use its number from the releases page, likev0.49.0.TZis your time zone.
Start Songstress
docker compose up -dThe first start downloads the image, a few gigabytes. Then check on it:
docker compose psAfter about a minute it shows healthy. To watch it start:
docker compose logs -f songstressCreate your admin account
Open http://your-server:8090 in a browser, using your machine's address, like http://192.168.1.20:8090. The
first screen is Create your admin account. Carry on with Set up your server.
Do this step now
Until the admin account exists, anyone who can open the page can create it.
Who Songstress runs as
Songstress saves the music it adds for you into MUSIC_DIR, so the user it runs as must be able to write there.
- Left unset, it runs as the owner of your music folder, or as
1000:1000when the folder belongs to root. - To choose, set
PUIDandPGIDin.env. Your own account's are whatid -uandid -gprint. - If Docker had to create the music folder, it belongs to root. On its first start Songstress gives that empty folder to the user it runs as. It never changes the owner of a folder that already holds music.
- If Songstress can't write there, the app says why and how to fix it, in a notice and in Settings ▸ About ▸ Diagnostics.
Settings you can add before the first start
These are optional. Put any of them in .env, then run docker compose up -d again.
SONGSTRESS_ADMIN_EMAILandSONGSTRESS_ADMIN_PASSWORDmake your admin account at the first start, so the first screen is the sign-in page instead.SONGSTRESS_PUBLIC_URLis the address people use, likehttps://music.example.com. Invite and password-reset links point there.SMTP_HOSTand the otherSMTP_settings let Songstress send email. See Email and notifications.
Every setting is in Environment variables.
Update
docker compose pull && docker compose up -dYour data stays in ./data. Before an update changes the database, Songstress keeps a copy of it, so you can go
back. See Update and roll back.