Ampache is an open-source music streaming server that replaces Spotify with private audio streaming, Subsonic API support, and full library control.
Ampache has provided self-hosted audio and video streaming since 2001, running on standard PHP and MySQL or MariaDB infrastructure. The platform scans local media directories by extracting embedded tags and streams playback directly to web browsers, mobile apps, and network receivers. Homelab administrators use it to manage multi-user music streaming from private storage without cloud dependencies.
Spotify operates on a closed ecosystem where listening habits, skips, and timestamps are tracked and monetized, while track availability remains subject to licensing disputes. When distributor agreements expire, tracks vanish from saved libraries without warning. Ampache establishes local custody over audio collections: the server runs on private hardware, indexes stored files, and transmits no external telemetry. Playlists, play counts, and ratings remain inside a local database, preventing remote distributors from altering personal archives.
The core distinction is catalog access versus infrastructure ownership. Spotify provides millions of commercial tracks and algorithmic radio in exchange for a recurring monthly fee. Ampache supplies no audio of its own; administrators must acquire, tag, and store their own files. Remote streaming requires configuring reverse proxies, PHP extensions, and Subsonic-compatible mobile players like Symfonium or DSub. For homelab operators prioritizing privacy, format preservation, and uncompressed playback, that setup overhead delivers durable control.
ffmpeg to transcode unsupported formats on demand, applying per-user bitrate caps that protect mobile data limits.ffmpeg lacks server-side pre-caching for transcoded streams, creating seeking delay and CPU spikes on low-power NAS hardware./rest/ endpoint, and Node.js for frontend asset compilation.Can Ampache replace Spotify for music streaming? Ampache replaces Spotify's remote playback and playlist features if you own your music files and host the server. It lacks a commercial streaming catalog or algorithmic radio, requiring administrators to supply all media.
Which mobile apps work with an Ampache server? Any client supporting the Subsonic or OpenSubsonic API, including Symfonium, DSub, and Amperfy, connects directly to Ampache. Users can also stream through the web interface or dedicated tools like Power Ampache.
Does Ampache modify music files on disk? By default, the server operates in read-only mode to extract embedded tags without altering stored tracks. Administrators can enable write permissions in configuration if they want rating and tag edits written back to files.
Ampache is a solid choice for homelab administrators with organized audio archives who need flexible streaming across Subsonic, UPnP, and web clients. Active development continues with updates pushed in August 2026 under the copyleft AGPL-3.0 terms, keeping server improvements open while listening records stay private. Those needing a hosted commercial catalog should look elsewhere, but self-hosters demanding full data custody will find it capable.
We started this exact setup from scratch in a clean Linux machine on Nov 3, 2026 and checked it through Ampache's own API: every check passed. Recipes are re-checked regularly and removed if they stop working.
mkdir -p ampache && cd ampache
curl -fsSL https://open-source.store/tools/ampache/compose.yml -o compose.ymlcat > .env <<EOF
MYSQL_PASSWORD=$(openssl rand -hex 12)
AMPACHE_DB_PASSWORD=$(openssl rand -hex 12)
AMPACHE_ADMIN_USER=admin
AMPACHE_ADMIN_PASSWORD=$(openssl rand -hex 12)
[email protected]
EOFMYSQL_PASSWORD — Administrative password for the bundled MariaDB database. Generated above; keep it secret.AMPACHE_DB_PASSWORD — Password for the Ampache database user. Generated above; keep it secret.AMPACHE_ADMIN_USER — Username for the initial Ampache administrator account.AMPACHE_ADMIN_PASSWORD — Password for the initial Ampache administrator account. Generated above; keep it secret.AMPACHE_ADMIN_EMAIL — Email address for the initial Ampache administrator account.docker compose up -dservices:
ampache:
image: ampache/ampache:8.3.0
restart: unless-stopped
ports:
- "80:80"
environment:
MYSQL_USER: admin
MYSQL_PASS: ${MYSQL_PASSWORD}
DB_NAME: ampache
DB_HOST: localhost
DB_PORT: 3306
DB_USER: admin
DB_PASSWORD: ${MYSQL_PASSWORD}
AMPACHE_DB_USER: ampache
AMPACHE_DB_PASSWORD: ${AMPACHE_DB_PASSWORD}
AMPACHE_ADMIN_USER: ${AMPACHE_ADMIN_USER}
AMPACHE_ADMIN_PASSWORD: ${AMPACHE_ADMIN_PASSWORD}
AMPACHE_ADMIN_EMAIL: ${AMPACHE_ADMIN_EMAIL}
volumes:
- ampache-backup:/var/www/backup
- ampache-config:/var/www/config
- ampache-log:/var/log/ampache
- ampache-media:/media
- ampache-mysql:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/login.php 2>/dev/null || php -r 'file_get_contents(\"http://127.0.0.1/login.php\") ?: exit(1);' || exit 1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 45s
volumes:
ampache-backup:
ampache-config:
ampache-log:
ampache-media:
ampache-mysql:
Go, gRPC and Protobuf done right, LLM agents in production, and the hard parts of shipping a first product.
Show that Ampache is listed as an open-source alternative. Paste into your README:
Ubuntu 24.04 · Apple container, Docker 29.1.3, Compose 2.40.3+ds1-0ubuntu1~24.04.1. Images pulled in 241 s: ampache/ampache:8.3.0.
Based on the upstream setup. Official compose pinned to 8.3.0 with automated installation via environment variables, internal MariaDB, and container healthcheck.
ampache-1 | 2026-11-03T06:44:08.073078885Z => An empty or uninitialized MySQL volume is detected in ampache-1 | 2026-11-03T06:44:08.073090260Z => Installing MySQL ... ampache-1 | 2026-11-03T06:44:08.077897843Z Installing MariaDB/MySQL system tables in '/var/lib/mysql' ... ampache-1 | 2026-11-03T06:44:08.118282926Z 2026-11-03 6:44:08 0 [Warning] mariadbd: io_uring_queue_init() failed with EPERM: sysctl kernel.io_uring_disabled has the value 2, or 1 and the user of the process is not a member of sysctl kernel.io_uring_group. (see man 2 io_uring_setup). ampache-1 | 2026-11-03T06:44:08.118294551Z create_uring failed: falling back to libaio ampache-1 | 2026-11-03T06:44:08.736217510Z OK ampache-1 | 2026-11-03T06:44:08.736248885Z ampache-1 | 2026-11-03T06:44:08.736251510Z To start mariadbd at boot time you have to copy ampache-1 | 2026-11-03T06:44:08.736252802Z support-files/mariadb.service to the right place for your system ampache-1 | 2026-11-03T06:44:08.736254385Z ampache-1 | 2026-11-03T06:44:08.736255260Z ampache-1 | 2026-11-03T06:44:08.736256177Z PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! ampache-1 | 2026-11-03T06:44:08.736257302Z To do so, start the server, then issue the following command: ampache-1 | 2026-11-03T06:44:08.736258260Z ampache-1 | 2026-11-03T06:44:08.736259177Z '/usr/bin/mariadb-secure-installation' ampache-1 | 2026-11-03T06:44:08.736260093Z ampache-1 | 2026-11-03T06:44:08.736260885Z which will also give you the option of removing the test ampache-1 | 2026-11-03T06:44:08.736262052Z databases and anonymous user created by default. This is ampache-1 | 2026-11-03T06:44:08.736263135Z strongly recommended for production servers. ampache-1 | 2026-11-03T06:44:08.736264177Z ampache-1 | 2026-11-03T06:44:08.736264968Z See the MariaDB Knowledgebase at https://mariadb.com/kb ampache-1 | 2026-11-03T06:44:08.736266052Z ampache-1 | 2026-11-03T06:44:08.736266968Z You can start the MariaDB daemon with: ampache-1 | 2026-11-03T06:44:08.736267968Z cd '/usr' ; /usr/bin/mariadbd-safe --datadir='/var/lib/mysql' ampache-1 | 2026-11-03T06:44:08.736268885Z ampache-1 | 2026-11-03T06:44:08.736269718Z You can test the MariaDB daemon with mariadb-test-run.pl ampache-1 | 2026-11-03T06:44:08.736270843Z cd '/usr/share/mariadb/mariadb-test' ; perl mariadb-test-run.pl ampache-1 | 2026-11-03T06:44:08.736271843Z ampache-1 | 2026-11-03T06:44:08.736272635Z Please report any problems at https://mariadb.org/jira ampache-1 | 2026-11-03T06:44:08.736273552Z ampache-1 | 2026-11-03T06:44:08.736274427Z The latest information about MariaDB is available at https://mariadb.org/. ampache-1 | 2026-11-03T06:44:08.736275427Z ampache-1 | 2026-11-03T06:44:08.736276218Z Consider joining MariaDB's strong and vibrant community: ampache-1 | 2026-11-03T06:44:08.736277135Z https://mariadb.org/get-involved/ ampache-1 | 2026-11-03T06:44:08.736278135Z ampache-1 | 2026-11-03T06:44:08.736374260Z => Done! ampache-1 | 2026-11-03T06:44:08.751436802Z 261103 06:44:08 mysqld_safe Logging to syslog. ampache-1 | 2026-11-03T06:44:08.759705468Z 261103 06:44:08 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql ampache-1 | 2026-11-03T06:44:13.738802804Z => Waiting for confirmation of MySQL service startup ampache-1 | 2026-11-03T06:44:18.776243723Z => Creating MySQL admin user (admin) with preset password ampache-1 | 2026-11-03T06:44:18.796347640Z => Done! ampache-1 | 2026-11-03T06:44:18.796360140Z ======================================================================== ampache-1 | 2026-11-03T06:44:18.796361348Z You can now connect to this MySQL Server using: ampache-1 | 2026-11-03T06:44:18.796362265Z ampache-1 | 2026-11-03T06:44:18.796362931Z mysql -uadmin -p*** -h<host> -P<port> ampache-1 | 2026-11-03T06:44:18.796363765Z ampache-1 | 2026-11-03T06:44:18.796364348Z Please remember to change the above password as soon as possible! ampache-1 | 2026-11-03T06:44:18.796365015Z MySQL user 'root' has no password but only allows local connections ampache-1 | 2026-11-03T06:44:18.796365681Z ======================================================================== ampache-1 | 2026-11-03T06:44:19.810231625Z => Missing Ampache config file: /var/www/config/ampache.cfg.php ampache-1 | 2026-11-03T06:44:19.810290750Z => Checking install variables ... ampache-1 | 2026-11-03T06:44:19.826560708Z 261103 06:44:19 mysqld_safe Logging to syslog. ampache-1 | 2026-11-03T06:44:19.834497500Z 261103 06:44:19 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql ampache-1 | 2026-11-03T06:44:24.816328961Z => Waiting for confirmation of MySQL service startup ampache-1 | 2026-11-03T06:44:29.847866796Z => Installing Ampache database ampache-1 | 2026-11-03T06:44:30.406662255Z => Creating Ampache admin user ampache-1 | 2026-11-03T06:44:30.469607505Z Created Admin user admin with password *** ampache-1 | 2026-11-03T06:44:30.469966255Z ampache-1 | 2026-11-03T06:44:31.491131797Z => Log file not found: /var/log/ampache/ampache.log (will not tail) ampache-1 | 2026-11-03T06:44:31.548520506Z 2026-11-03 06:44:31,548 INFO Set uid to user 0 succeeded ampache-1 | 2026-11-03T06:44:31.549060256Z 2026-11-03 06:44:31,549 INFO supervisord started with pid 1 ampache-1 | 2026-11-03T06:44:32.556319339Z 2026-11-03 06:44:32,555 INFO spawned: 'apache2' with pid 302 ampache-1 | 2026-11-03T06:44:32.559342381Z 2026-11-03 06:44:32,559 INFO spawned: 'cron' with pid 303 ampache-1 | 2026-11-03T06:44:32.560560006Z 2026-11-03 06:44:32,560 INFO spawned: 'inotifywait' with pid 305 ampache-1 | 2026-11-03T06:44:32.566390506Z 2026-11-03 06:44:32,566 INFO spawned: 'mysql' with pid 307 ampache-1 | 2026-11-03T06:44:33.609623757Z 2026-11-03 06:44:33,609 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ampache-1 | 2026-11-03T06:44:33.609678965Z 2026-11-03 06:44:33,609 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ampache-1 | 2026-11-03T06:44:33.609685090Z 2026-11-03 06:44:33,609 INFO success: inotifywait entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ampache-1 | 2026-11-03T06:44:33.609687923Z 2026-11-03 06:44:33,609 INFO success: mysql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)