Deploy Ampache

Self-hosted music and video streaming server with MariaDB, Subsonic API

Deploy Ampache

Just deployed

/var/lib/mysql

/data

Deploy and Host Ampache on Railway

Ampache is an open-source web application for streaming your own music and video library. It indexes audio files into a browsable catalog with playlists, smart lists, ratings and multiple users, plays them in the browser, and serves them to mobile and desktop players through the Ampache, Subsonic and Jellyfin-compatible APIs.

About Hosting Ampache

Ampache is a PHP application that needs a web server, a MySQL-compatible database and persistent storage for its config file and your media. This template runs Ampache 8.4.0 from the official ampache/ampache image (built from our GitHub repo) with MariaDB 11.4 as a separate service on Railway's private network. On the first start it installs the database schema, creates the admin account with a generated password, creates a music catalog on the volume and enables web uploads into it. Config, backups and media live on a Railway volume, and Ampache applies database migrations on every start, so redeploys and updates keep your library.

Common Use Cases

  • Stream your personal music collection to the browser and to Subsonic-compatible phone apps from anywhere
  • Share a family or team music library with separate accounts, playlists and listening statistics
  • Upload albums from the web UI and keep them organised in one self-hosted catalog

Dependencies for Ampache Hosting

  • MariaDB (included as its own service, with a volume)
  • A Railway volume for Ampache's config, backups and media

Deployment Dependencies

Implementation Details

Services:

  • Ampache: Apache and PHP 8.5, public HTTPS domain, health check on /healthz, volume at /data (config, backup, media/music). An hourly cron runs Ampache's maintenance, and new files in /media/music are added to the catalog automatically.
  • MariaDB: Ampache's database on the private network, volume at /var/lib/mysql, generated passwords.

After deploy:

  1. Open the Ampache domain and log in as admin with the AMPACHE_ADMIN_PASSWORD value from the Ampache service's Variables tab.
  2. Add music with Upload in the sidebar, or copy files into /media/music (for example with railway ssh).
  3. In a Subsonic-compatible app, use https://YOUR-DOMAIN with your Ampache username and password.

Tested with 0.5 GB RAM and 1 vCPU per service. Large libraries and transcoding need more. Optional settings (AMPACHE_ADMIN_EMAIL, PHP_MEMORY_LIMIT, APACHE_MAX_WORKERS) are described in the repo README.

Updates: when the template repo moves to a new Ampache version, Railway shows an "update available" notice in your project. Read the changelog, run backup-db.sh in the Ampache service shell (it writes a dump to /data/backup), then apply the update.

Why Deploy Ampache on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Ampache on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set
S3-compatible object store, keys and public URL preset, volume kept

SuperSlowSloth
0
View Template
TimescaleDB
A PostgreSQL-based time-series database for analytics on Railway.

Rakit
1
View Template
Neo4j 2026.10 Community
Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

My Projects
0