Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk12 min

How to Self-Host Ampache Music Streaming on a Linux VPS

Install Ampache 8 on a Linux VPS with Docker Compose or native Apache/MariaDB/PHP. Follow the storage, rewrite, HTTPS, client and backup guidance for reliable remote streaming.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run Ampache 8 on a Linux VPS with either Docker Compose or a conventional Apache, MariaDB and PHP stack. Ampache is free, self-hosted software for cataloging and streaming your own music and video, and it exposes both its native API and a Subsonic-compatible API for mobile and desktop players.

For a new server, Docker Compose is usually the fastest repeatable deployment. A native installation is the better fit when the VPS already hosts Apache or nginx and you need direct control over PHP, permissions and virtual hosts. Whichever route you choose, PHP 8.5 or newer, a MySQL-compatible database, readable media storage, URL rewriting and correctly configured HTTPS are functional requirements—not optional polish.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before installing Ampache

Supported software for Ampache 8

The current Ampache 8 documentation requires PHP 8.5 or newer. Ampache 8 will not run on earlier PHP releases; the Ampache 7 line covers PHP 7.4 through 8.4 for systems that cannot move to PHP 8.5 yet. The database must be MySQL 8.x or MariaDB 10.x or later.

Component Requirement or supported value Why it matters
Operating system Any supported Linux distribution; the maintained example uses Ubuntu 26.04 LTS Ubuntu 26.04 ships PHP 8.5 in its main archive, avoiding a third-party PHP repository.
PHP PHP 8.5+ for Ampache 8 The installer checks required PHP extensions and stops when they are missing.
Database MySQL 8.x or MariaDB 10.x+ Stores users, catalogs, metadata, preferences and playback information.
Web server Apache, nginx, lighttpd, Caddy or IIS; Apache receives the most testing Serves the interface and API and must pass rewritten stream and REST paths.
Storage Readable music or video directory with enough capacity for your library Ampache indexes files; it does not make the underlying media disappear into the database.
Container architectures linux/amd64, linux/arm/v7 and linux/arm64 Determines whether the official image can run on your VPS CPU.

You also need a sudo-enabled VPS account, a DNS name that points to the server, and enough disk space for the operating system, database, Ampache configuration, logs and your media. Ampache documentation does not publish a universal concurrent-user or bandwidth figure, so size CPU, memory, storage and network capacity for your library and listening pattern rather than relying on a claimed benchmark.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Docker Compose or a native web stack?

Decision point Docker Compose Native Apache/MariaDB/PHP
Setup speed and repeatability Fastest path; the image packages the application and its runtime. More manual package, module and permission work.
Control of web stack Web server and PHP live in the container; host integration is narrower. Direct control over virtual hosts, PHP settings, modules and filesystem ownership.
Upgrade and rollback Pull a pinned image, recreate the container and restore persistent mounts if necessary. Upgrade packages or replace the application tree while preserving the database and config.
Backups Back up database, config, logs and media bind mounts. Back up the database, Ampache config, logs and media directories.
HTTPS and proxying Usually place a host reverse proxy in front of the container. Terminate TLS in the same Apache or nginx installation, or add a proxy.
Sharing the VPS Isolates Ampache, but ports and proxy routing still need planning. Convenient when several sites already share one web server and PHP runtime.

Choose Docker Compose if you want a reproducible service and clean separation from other applications. Choose native installation when the VPS already has a managed Apache/nginx stack, when you need host-level PHP tuning, or when several sites must share one database service.

Prepare the VPS

Set the hostname and firewall

  1. Create an A or AAAA DNS record such as music.example.net pointing to the VPS.
  2. Allow SSH, HTTP and HTTPS in the VPS firewall. Keep the database bound to localhost or the private container network; do not expose MySQL or MariaDB publicly.
  3. Update the operating system and create a separate administrative user with sudo access. Disable password-based SSH and root login if your provider supports key-based access.

Plan storage and ownership

Keep the media library separate from Ampache’s writable application data. The web process needs to read music, but it normally does not need to modify it. Configuration and database directories must remain writable and persistent. A read-only media mount prevents an application compromise from silently changing or deleting your collection; enable write access only when you intentionally use uploads or tag-editing features.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a public URL

Decide whether Ampache will occupy the whole hostname (music.example.net), a path such as example.net/ampache, or a dedicated virtual host. A dedicated hostname generally avoids path-prefix mistakes in API and stream URLs.

Install Ampache with Docker

Install Docker and create persistent directories

Install Docker Engine and the Compose plugin using your distribution’s supported packages. Then create a project directory and persistent bind mounts. The official Docker guidance uses this layout:

mkdir -p ~/ampache/data/{media,mysql,config,log}
cd ~/ampache

Place or mount your library at ~/ampache/data/media. The database belongs in data/mysql, Ampache configuration in data/config, and logs in data/log. Preserve these directories when recreating containers.

Use the documented quick-start container

For a first test, the official download documentation gives this command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
docker run --name=ampache -d -v /path/to/your/music:/media:ro -p 80:80 ampache/ampache

Replace /path/to/your/music with the absolute path to your library. This is useful for confirming that the image starts, but a production VPS should use Compose so configuration, database, logs and media survive container replacement.

Build a Compose service around persistent mounts

Define an Ampache service in your Compose project and map the persistent paths as follows:

Host path Container path Access
./data/media /media Read-only in the normal case
./data/mysql /var/lib/mysql Writable database data
./data/config /var/www/config Writable Ampache configuration
./data/log /var/log/ampache Writable logs

Use the image’s documented database and administrator variables, or complete the web installer after the first start. Keep the media mapping read-only and expose only the HTTP port to a local reverse proxy when TLS is terminated on the host.

Pin the image and start it

Use a numbered release tag when predictable upgrades matter. The tags latest, develop and preview have different stability expectations; avoid development or preview tags for a service you depend on daily. Start the project with docker compose up -d, inspect docker compose logs -f, and open the public URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Complete the installer and create a catalog

  1. Open the Ampache URL and enter the database connection details and administrator credentials, or provide the equivalent container variables before startup.
  2. Set the media path to /media, which is the path inside the container, not the host path.
  3. Create a catalog and run the initial scan.
  4. Name the catalog music if you want directory monitoring. The Docker guide states that a catalog with that name enables monitoring; other catalog names are updated by the hourly cron job.

After the first scan, play a file locally through the web interface before adding a reverse proxy. This separates an indexing or permission problem from an HTTPS routing problem.

Install Ampache natively on Ubuntu

Install the web server, database, PHP and transcoders

The maintained Ubuntu guide targets Ubuntu 26.04 LTS and installs Apache, MariaDB, PHP 8.5 and transcoding tools. Start with:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
sudo apt update
sudo apt install apache2 mariadb-server php8.5

Install the PHP extensions listed by Ampache’s current Composer requirements and installer checks, together with the audio/video tools you intend to use. Package names can vary by distribution, so treat the installer check as the authority for any missing extension rather than copying an old Ampache 7 package list.

Create the database and application directory

Run the MariaDB hardening routine, then create a dedicated database and user with a strong password. Grant that user access only to the Ampache database. Do not bind MariaDB to the public network interface.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo mysql_secure_installation
sudo mkdir -p /var/www/ampache
sudo chown -R www-data:www-data /var/www/ampache

Install Ampache from a release archive when you want to avoid build tooling. A Git checkout requires Composer and npm build steps; a release ZIP avoids those tools. Extract the release under /var/www/ampache and keep the shipped .htaccess files.

Enable rewriting and Apache overrides

  1. Enable Apache’s rewrite module with sudo a2enmod rewrite.
  2. Configure the virtual host or subfolder so Ampache’s directory permits AllowOverride All; otherwise Apache will ignore the shipped rewrite rules.
  3. Ensure the Ampache tree is readable by the web server and that its configuration directory is writable by www-data.
  4. Check syntax with sudo apachectl configtest, then reload with sudo systemctl reload apache2.

Ampache can be the whole site, live below a subfolder, or run on its own hostname. A dedicated hostname reduces the chance that another application’s rewrite rules capture Ampache requests.

Run the browser installer and scan media

Open the configured URL, enter the MariaDB credentials, create the administrator account and set the catalog path to the directory as seen by Apache. The web server user must be able to traverse every parent directory and read the music files. Use group-readable permissions for media unless uploads or tag writing are deliberate requirements.

Make URL rewriting work before troubleshooting streams

Ampache’s installation documentation gives this exact warning: “Streaming, the Subsonic API and the REST API all stop working without it, usually with a 404 from every request.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

On Apache, the usual fixes are enabling mod_rewrite, allowing AllowOverride All, and preserving Ampache’s .htaccess files. On nginx, copy and adapt the official server example rather than assuming Apache rules translate directly. Check the nginx configuration after upgrades because REST paths can change between releases.

Recent Apache versions may also require SetEnv ap_trust_cgilike_cl 1 in the /play directory when downloads or streams fail. Apply that directive only in the relevant directory context, test the configuration, reload Apache and retry a direct stream.

Diagnose a 404 systematically

  • If the web interface itself is a 404, verify the virtual-host document root and subfolder path.
  • If pages load but every stream and API call is a 404, check rewrite activation and AllowOverride first.
  • If only nginx deployments fail, compare the location blocks and FastCGI parameters with the current Ampache example.
  • If downloads fail on a recent Apache release while playback URLs look correct, test the ap_trust_cgilike_cl setting.

Expose Ampache securely over HTTPS

Terminate TLS at Apache, nginx or a reverse proxy

Use a real DNS name and a valid certificate. You can terminate HTTPS in the same web server that runs Ampache or in a reverse proxy that forwards to the container or local Apache port. The proxy must preserve the original host and scheme so Ampache generates public HTTPS links.

Set Ampache’s public URL and SSL behavior

For reverse-proxy deployments, configure Ampache’s local_web_path to match the externally visible path and enable force_ssl. When nginx terminates SSL upstream, pass fastcgi_param HTTPS on; so Ampache does not generate mixed HTTP links. The API documentation recommends SSL for security and privacy, especially when credentials and stream URLs cross the public internet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the database private

Allow database connections only from localhost or the private container network. Use a unique database password, a separate Ampache administrator account and a firewall that exposes only SSH, HTTP and HTTPS. Review proxy access logs and Ampache logs after the first remote login.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Permissions, catalogs and filesystem layout

On a native install, the Ubuntu guide uses www-data ownership for the Ampache tree and expects the web server to write the configuration directory. Music files can remain owned by your library-management account while granting the web server read and directory-traverse access. Do not make the entire media tree writable merely to solve a scan error.

In Docker, the equivalent boundary is the mount mode: map /media read-only and keep /var/lib/mysql, /var/www/config and /var/log/ampache persistent and writable. If the scan reports zero files, check the path inside the container, parent-directory execute permissions and filename encoding before changing ownership broadly.

A catalog named music activates directory monitoring in the Docker workflow. Other catalog names are updated by the hourly cron job described in the Docker guide. Schedule a manual scan after large imports so new albums appear immediately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect mobile and desktop players

Ampache supplies its own API and a Subsonic-compatible API. The official download documentation lists native clients for Android, iOS, Linux, Windows and macOS, along with local playback integrations such as MPD, VLC and Kodi. Client support changes over time, so verify a player’s current Ampache or Subsonic compatibility before committing to it.

The project also documents an opt-in Jellyfin-compatible API used by clients including Finamp, Symfonium and gelly. Enable that compatibility only when you need it, and treat it as version-sensitive rather than assuming every Jellyfin client will work with every Ampache release.

General client setup

  1. Use the HTTPS base URL that a browser can reach from outside the VPS.
  2. Enter the Ampache username and password, not the MariaDB credentials.
  3. Select the client’s Ampache or Subsonic connection mode and let it test the endpoint.
  4. If login succeeds but playback fails, return to rewrite and proxy checks; authentication alone does not prove that stream routes are forwarding correctly.

Back up and upgrade without losing the library

Back up all persistent state

  • Database data: the MariaDB database or Docker’s data/mysql mount.
  • Configuration: the Ampache configuration directory, including generated settings.
  • Logs: useful for diagnosing failed scans, API requests and transcoding.
  • Media: the original music and video files, stored separately from application data.

Test that a backup can be restored to a temporary instance. A container image alone is not a backup because it does not contain your catalog database or configuration.

Upgrade Docker deployments

  1. Read the Ampache upgrade notes, especially when crossing a major version.
  2. Back up database, configuration, logs and media mounts.
  3. Change the image to the pinned release you selected.
  4. Pull and recreate the service with docker compose pull followed by docker compose up -d.
  5. Check logs, log in, play a track and test one API client before declaring the upgrade complete.

Upgrade native deployments

Keep the database and configuration outside the replaceable application tree, unpack the new release alongside the old one, apply the documented migration steps, then switch the virtual host and reload Apache. A Git checkout adds Composer and npm build requirements; a release ZIP is simpler when you want a prebuilt distribution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ampache 8 is the mainline for PHP 8.5 and newer. Systems that must remain on PHP 7.4 through 8.4 should follow the Ampache 7 branches instead of forcing an incompatible Ampache 8 installation.

Troubleshooting checklist

Symptom Likely cause Fix
Installer rejects PHP PHP is older than 8.5 for Ampache 8, or required extensions are missing. Upgrade to PHP 8.5+, install every extension reported by the installer, or use Ampache 7 on a PHP 7.4–8.4 system.
Database connection fails Wrong host, port, credentials or container network; database is not running. Test MariaDB/MySQL locally, verify the Compose network name, and keep the database host private.
Catalog is empty Wrong path, unreadable parent directory or media mounted at the wrong container path. Use /media in Docker, verify read and traverse permissions, then rescan.
Interface works, streams return 404 Rewrite rules are disabled or blocked by AllowOverride. Enable rewrite, preserve .htaccess, allow overrides, and retest the direct stream URL.
HTTPS redirects loop or links use HTTP Reverse proxy scheme is not passed to Ampache. Set local_web_path and force_ssl; on nginx, pass fastcgi_param HTTPS on;.
Apache download fails after an upgrade Apache’s CGI-like path handling blocks the play directory. Test SetEnv ap_trust_cgilike_cl 1 in the /play directory and reload Apache.
Changes appear late Catalog monitoring or the hourly cron job has not run. Use the music catalog for directory monitoring or launch a manual scan.

Operational security checklist

  • Use HTTPS for the web interface and every API client.
  • Use a dedicated DNS name and strong, unique administrator credentials.
  • Expose only SSH, HTTP and HTTPS; keep MariaDB/MySQL on localhost or the private container network.
  • Mount media read-only unless uploads or tag editing are intentional.
  • Persist and back up configuration, database, logs and media independently.
  • Pin a stable container release and read upgrade notes before changing major versions.
  • Review logs after enabling a reverse proxy and after every upgrade.

Which deployment should you choose?

Use Docker Compose for the shortest path to a repeatable Ampache 8 server, especially when your VPS is dedicated to music and you want upgrades to be image-based. Use the native Ubuntu stack when Apache or nginx already serves other applications, when you need direct control of PHP and filesystem permissions, or when a shared virtual-host design is important. In both cases, successful remote playback depends on the same fundamentals: PHP and database versions that Ampache supports, a readable catalog, working URL rewriting, persistent writable configuration and database storage, and a proxy configuration that tells Ampache the public site is HTTPS.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.