Deploy Ampache
Web-Based Audio/Video Streaming Application And File Manager
ampache
Just deployed
/var/www/config
Deploy and Host Ampache on Railway
Ampache is an open-source web-based audio and video streaming application and file manager. It allows you to host, organize, and stream your music, podcast, and video library from anywhere using a browser or compatible mobile and desktop media apps (such as Subsonic, Plex, or WebDAV clients). This template deploys Ampache on Railway with persistent configuration storage and public web interface access.
About Hosting Ampache
Hosting Ampache on Railway runs a single container service using the official ampache/ampache:latest Docker image. A persistent volume is mounted at /var/www/config to retain server settings, database connection details, indexer configurations, and user preferences across redeployments. The service listens on internal port 80 and is exposed to the internet using Railway's public domain routing.
Common Use Cases
- Self-hosted personal music cloud: Stream your audio collection across web browsers, mobile phones, and smart devices.
- Subsonic API server: Connect third-party Subsonic clients (DSub, Ample, Substreamer, Ultrasonic) directly to your Ampache backend.
- Podcast aggregation and streaming: Manage and listen to private or public podcast feeds.
- Multi-user audio catalog: Share music and media libraries with family or friends using fine-grained access control.
Dependencies for Ampache Hosting
- Ampache image:
ampache/ampache:latest - One persistent volume mounted at
/var/www/config - Railway public domain mapped to port
80 - An internal or external MySQL/MariaDB database (can be added within Railway or configured during web setup)
Upstream: Ampache Website · GitHub Repository · Documentation
Implementation Details
| Service | Image | Role | Web Port | Volume Mount |
|---|---|---|---|---|
| ampache | ampache/ampache:latest | Web Interface & Streaming Backend | 80 | /var/www/config |
Topology
| Service | Role | Volume | Public | Notes |
|---|---|---|---|---|
| ampache | Audio/Video Streaming + Web UI | /var/www/config | Yes (Port 80) | Centralized web server & Subsonic API provider |
Volumes (drives) — what to mount
| Service | Mount path | What is stored |
|---|---|---|
| ampache | /var/www/config | Ampache application configuration (ampache.cfg.php), keys, and session data |
Warning: Do not remove or detach the
/var/www/configvolume — doing so will cause your site configuration and database credentials to be reset on subsequent deployments.
Quick Start
- Click the Deploy on Railway button.
- Sign in (or create a free Railway account) and click Deploy.
- Wait 1–2 minutes for the
ampachecontainer and persistent volume to provision. - Open the ampache service → Settings → Networking and click the generated public domain URL.
- Follow the web installation wizard to complete database set up, create an administrative account, and configure media folder paths.
Configuration
Core Variables
| Variable | Default / Source | Description / Notes |
|---|---|---|
PORT | 80 | Internal HTTP port the server listens on inside the container |
Custom Domain
- Open the ampache service → Settings → Networking → Custom Domain.
- Enter your custom domain name and follow Railway’s DNS setup instructions (CNAME record).
- Railway handles TLS certificate provisioning automatically.
- Access Ampache securely over HTTPS at
https://your.custom.domain.
Updating Ampache
- Open the ampache service → Settings → Source.
- Verify or update the container image tag (e.g.,
ampache/ampache:latest). - Click Redeploy.
All persistent application settings stored in /var/www/config will remain intact across updates.
Traps
Common pitfalls and deployment caveats:
- Missing persistent config volume — Detaching or removing
/var/www/configwill reset yourampache.cfg.phpconfiguration upon every redeploy. - Database requirement — Ampache requires a MySQL or MariaDB database backend. You can add a MySQL database service within the same Railway project and reference its private host (
${{MySQL.RAILWAY_PRIVATE_DOMAIN}}) during initial web setup. - Large catalog indexing timeouts — When building initial music indexes over network volumes or remote mounts, run background task workers or run manual scans through the admin panel to prevent web request timeouts.
Why Deploy Ampache on Railway?
Railway provides a reliable cloud container platform for media servers. Deploying Ampache on Railway offers automatic SSL/TLS termination, seamless domain attachment, simple persistent storage management, and continuous uptime without server hardware management.
Template Content
ampache
ampache/ampache:latest