---
title: "Deploy Ampache"
description: "Self-hosted music and video streaming server with MariaDB, Subsonic API"
category: "Storage"
url: https://railway.com/deploy/ampache-1
---

# Deploy Ampache

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

**[Deploy Ampache on Railway](https://railway.com/template/ampache-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/ampache-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### MariaDB https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/mariadb.png

- **Image:** mariadb:11.4.13@sha256:a8992b5e5404d11e03c54a31d0c1bdea3fd116d283aa6d1a627551f29045309b
- **Start command:** `docker-entrypoint.sh mariadbd --datadir=/var/lib/mysql/data --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci`

### Ampache https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/ampache.png

- **Source:** https://github.com/aalfath/ampache-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# 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

* Ampache: https://ampache.org and https://github.com/ampache/ampache (release 8.4.0)
* Official Docker image: https://hub.docker.com/r/ampache/ampache (tag `nosql8.4.0`)
* Template repo (Dockerfile, start scripts, changelog): https://github.com/aalfath/ampache-railway-template

### 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.



## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/ampache-1
