Linux

Where Does Ampache Store Config and Its Database?

Where Ampache keeps its ampache.cfg.php config, MySQL database, and media catalog paths on Linux.

Last updated

Ampache splits state between a config file (ampache.cfg.php with database credentials and options) and a MySQL database holding users, playlists, ratings, and catalog indexes. Media itself stays in your own folders, scanned but never moved.

Backups therefore mean the database dump plus the config file plus a note of media paths. Fresh installs pointed at all three restore the whole library. The config location varies by install method, so confirm it before assuming /etc. The setup check flags unwritable paths.

Where Ampache stores this, by platform

Linux
/etc/ampache/ampache.cfg.php

ampache.cfg.php with credentials and transcoding options. Manual installs use config/ under the web root instead. The file must stay unreadable to the web user beyond the app itself.

Frequently asked questions

how do i back up ampache

Dump the MySQL database plus a copy of ampache.cfg.php, and note the catalog media paths. Restores need the same files at the same paths plus a rescan. Playlists and ratings live in the database, not in the music folders.

where is the ampache config file

In /etc/ampache/ampache.cfg.php (distro packages) or the config/ folder of the web root (manual installs). It holds database credentials, session secrets, and transcode settings. Keep it out of web reachable backups.

can i move the ampache music folder freely

No. The database references absolute media paths, so moving music without updating catalogs orphans every entry. Edit the catalog roots in the UI and rescan after any move. Symlinks work but must resolve inside the web server sandbox.

Notice an outdated path? Let us know.