An docker image with the Ampache music server.
See: hub.docker.com/r/idelsink/ampache
docker run --name=ampache -d -v /path/to/your/music:/media:ro -p 80:80 idelsink/ampache
There are extra ports that can be passed to the container using the -p
flag.
The ports are:
- 80: http: ampache
- 443: (not used but https for the future)
- 9001: supervisord web UI (used to manage services)
- 32400: plex interface (see See Plex backend)
- Get MySQL root password (Found in terminal or in a file in the
/root
directory in the container) - Launch website (<url/ip> or localhost)
- Fill in obtained root credentials
- Add new database user
- Installation type: whatever you like
- Transcoding: Template Configuration => ffmpeg
- Players: do whatever you like (See Available Players)
- Create config
- Create admin account
- Update
- And you're done!
- Now just add your catalog(s) end configure it like you want it.
After starting the docker image as a daemon process, look at the logs for the pseudo-random generated MySQL root password.
docker logs ampache
# or for tailing the log file
docker logs -f ampache
The output would look something like this:
~~ Configuring system if not yet configured ~~
~~ Configuring supervisord ~~
~~ Configuring apache ~~
~~ Configuring mysql ~~
=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql
=> Installing MySQL ...
=> Done!
=> Trying to secure database
=> Starting MySQL service
=> Waiting for confirmation of MySQL service startup
=> Databse is less vulnerable now; Stopping MySQL service
========================================================================
Random generated password for root is:
'MhKtpfjCHUzhT0vR51Sgu2iCuxlr3P97qo4D2A8jdRsOzaGsuV89nGfAEPF6qNKOIyY4FMawNJF86zOKLdg1eTykpr2vXED3wfrj
'
You can now connect to this MySQL Server using:
mysql -uroot -p<password> -h<host> -P<port>
Change the above password if deemed necessary.
MySQL user 'root' only allows local connections.
========================================================================
~~ Configuring ampache ~~
=> Unzip ampache archive
~~ Starting the service manager supervisord ~~
Follow the rest of the steps from the installation summary.
To setup the Plex backend do the following:
- Pass an extra port parameter while starting docker for the Plex backend pointing to port
32400
.
For example add-p 32400:32400
to thedocker run
command. - If not already done so during the Ampache setup process, enable the Plex backend at
System > Use Plex backend > Enable
- Manually go to the
login.php
page athttp://[ip]:[plex port]/web/login.php
- Login with an Ampache account
- After login this page will NOT forward you to another page.
- Manually go to the
index.php
page athttp://[ip]:[plex port]/web/index.php
- Link Ampache to an existing Plex account.
- Setup port forwarding if applicable.
- Now use the official or any Plex application to browse/play your content. (tested with the official Plex application on Android 6.0.1)
Ampache is more than only a web interface. Several backends are implemented to ensure you can stream your media from anywhere. Select backends to enable. Depending the backend, you may need to perform additional configuration. See wiki page.
Players tested:
- Web interface
- Ampache API
- Subsonic
- Plex
- UPnP
- DAAP (iTunes)
- WebDAV
To update to the newest docker image, if necessary, a backup can be made. This is done by running a small script inside the docker container. This will backup the database and Ampache configuration.
Follow these steps to perform a backup of Ampache. Follow Steps 8 to (end) to restore a backup of Ampache.
- Find your docker name / ID
docker ps
- Connect to the running container
docker exec -it <ID or name> sh
- Run the backup script (inside the container)
mkdir /backup
/scripts/backup.sh b /backup
-
Follow the instructions
-
Exit the docker container
exit
- Copy the files from the container to the host
docker cp <ID or name>:/backup ./backup
-
Update to the new/other container and let it finish configuring
-
Copy the files from host to container
docker cp ./backup <ID or name>:/backup
- Restore the backup using the backup script
/scripts/backup.sh r /backup
- Follow the instructions
Exit the container and you're done.
- The MySQL root password can be found in the
/root
directory. - Make sure that your volume is mounted correctly, e.g. if using SELinux make sure to add the appropriate permission labels. (See this)
- Make sure not to use a port that is already used by another webserver/process.
You can check out the full license here
This project is licensed under the terms of the MIT license.