Official image, published as 80:80
The ampache/ampache:8.4.0 image bundles Apache, MariaDB and FFmpeg. Keep the 80:80 mapping: Ampache reads its own streams back through the public port, and a different host port gives empty Subsonic streams. The volumes keep the configuration, the database and the logs.
services:
ampache:
image: ampache/ampache:8.4.0
container_name: ampache
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./data/config:/var/www/config
- ./data/log:/var/log/ampache
- ./data/mysql:/var/lib/mysql
- /srv/music:/media:ro
On first start the MariaDB password of the admin account is generated at random; it shows in the container logs (docker logs ampache) on a line shaped like mysql -uadmin -p<password>.
Without Docker: PHP 8.5 and rewrite rules
Ampache 8 needs PHP 8.5 or newer, MySQL or MariaDB and a web server; the release page offers one archive per PHP version. The app calls addresses under /rest/<method>.view, which only the rewrite rules route to Ampache: with Apache, copy public/rest/.htaccess.dist and public/play/.htaccess.dist to .htaccess, as the Docker image does.
The installation wizard
Open http://<server>/install.php. At the database step, the MySQL administrator is called admin in the Docker image; tick the creation of a dedicated user. At the configuration step, the Players section lists the backends: leave Subsonic ticked, as it is by default. Then create the administrator account, accept the update offered and log in.
Finally add a local catalog on /media. If it is named music, the folder watcher built into the image keeps it current; under any other name only the hourly job updates it.
Turning transcoding on
In ./data/config/ampache.cfg.php, declare FFmpeg as the conversion command and allow FLAC, then restart the container. Add a transcode_TYPE line for every other format you store.
; ./data/config/ampache.cfg.php
transcode_cmd = "ffmpeg"
transcode_flac = "allowed"
If you want your FLAC files to arrive untouched, then check your account's output format under Preferences → Streaming → Transcoding: set to mp3, it converts them even when the app asks for the original.
The password to give the app
Under Preferences → Account, choose a Subsonic Password or copy the API key shown on the same page. That is the text you will enter in RoadSonic instead of the account password, so the app can sign in with a salted token, on the local network and from afar.
Adding Ampache to the app
Create an OpenSubsonic source with http://<server> as its address (port 80 needs no mention), your Ampache username and, as the password, the Subsonic Password or the API key. For a local HTTP address the “Allow unencrypted local HTTP” option has to be on; finish with “Test and connect”.
Library visible, but nothing plays
Silent playback with Docker: check the port mapping. Mobile data still in FLAC: transcoding is not enabled. The word Disabled at /rest/ping.view: the Subsonic backend is off in the admin preferences (Use Subsonic backend).
