Run AMP with Docker Compose

AMP (Application Management Panel) is a simple to use, self-hosted web control panel for services (mostly games) that run on both Windows and Linux systems with a focus on ease of use through the intuitive user interface and simple setup process. The thing that makes AMP much better is when it runs on Docker. In this scenario it is easier to setup, run and migrate to another system later with very little effort and technical detail.

In this post, AMP is installed to a Docker Compose configuration.

0 . Latest updates and prerequisites.

2024.11.24 – First draft, Ubuntu 24.04 Server.

Check back for updates, if you run into trouble. Leave a comment if the post is missing some detail.

Sudo access is required to an existing Linux server. While the post is written for Ubuntu, the magic is in Docker, so just about any Linux distribution will work with minimal digression. An AMP license and some command-line and user experience is also required.

1 . Install and setup Docker Compose.

At the server, make sure all updates are installed:

sudo apt update -y && sudo apt upgrade -y

Reboot the server and check again for updates until none remain and there are no error conditions.

Install Docker Compose:

sudo apt install docker-compose-v2

Create a space for the services and games that has enough space for the game installations as well as any backups or patches that may be downloaded over time:

sudo mkdir -p /opt/docker/amp

Make sure a sudo equivalent user has full access and ownership of this location. In this case, the user is localadmin with a UID and GUID of “1000”:

sudo chmod 775 /opt/docker/amp -R
sudo chown localadmin:localadmin /opt/docker/amp -R

2 . Deploy AMP image with some customisation.

Create an environment file in the docker location:

sudo nano /opt/docker/.env

The file should contain at least these variables so that they can be applied and reused as necessary, substituting details as required:

TIMEZONE="Europe/Berlin"
PUID="1000"
PGID="1000"
ROOT="/opt/docker"
AMP_LICENSE="Your_AMP_License_Key"
AMP_MAC="A_Random_MAC_Address in format aa-bb-cc-dd-ee-ff"
AMP_USER="The_Admin_Username_for_AMP"
AMP_PASS="A_Password_For_The_Username_Above"

In the above environment file, the timezone should match where the server is installed. The PUID and GUID match the user that docker runs under, usually a sudo user, from the previous step. The license key is obtained from CubeCoders. The random MAC address should be in a valid format but not anywhere else in the LAN. The username and password should be unique to this installation, for example “AMP_Admin” and “PasswordHorseBatteryStapleCorrect”.

Finally, create the docker-compose.yml file:

sudo nano /opt/docker/docker-compose.yml

And have these contents, at a minimum:

services:
  amp:
    container_name: amp
    image: mitchtalmadge/amp-dockerized:latest
    mac_address: ${AMP_MAC}
    environment:
      - UID=${PUID}
      - GID=${PGID}
      - TZ=${TIMEZONE}
      - LICENCE=${AMP_LICENSE}
      - MODULE=ADS
      - USERNAME=${AMP_USER}
      - PASSWORD=${AMP_PASS}
    volumes:
      - ${ROOT}/amp/ampdata:/home/amp/.ampdata
    networks:
      - backend
    ports:
      - 8081:8080
      - 25565:25565
    restart: unless-stopped

networks:
  backend:
    driver: bridge

The container_name is free text, make it simple and easy to understand. The variables are as described in the environment file. In this case, the AMP interface is running on port 8081, this can be any valid, free port and since AMP will be hosting Minecraft, the port 25565 is being passed through.

In recent versions of Docker, it is recommended to create a custom network and not rely on the default network. This network is called “backend”, it can be any name that is appropriate.

For more details about the Docker image, it is maintained here: https://github.com/MitchTalmadge/AMP-dockerized

3 . Test the deployment.

The download is larger than expected and it might take a few minutes before AMP is running. Start the services and give it 5 minutes:

cd /opt/docker
docker compose up -d

You should see the image downloading and after 5 minutes, the web interface should be ready:

At first login, the installer will ask for the AMP license key and server type being deployed. Use the interface to create a new game instance, in this case, Minecraft Java, which has a default port of 25565:

The server can then be connected to from Minecraft once it has been setup as preferred:

NOTE: This Docker image does not support all the included AMP games and services but is convenient enough that it makes up for the pain of manual deployments. Check out the maintainer’s page for finer details and updates: https://github.com/MitchTalmadge/AMP-dockerized

4 . Supporting this blog.

This type of content takes a lot of effort to write. Each post is drafted, researched, then tested multiple times, even a simple step or detail might take more than a few hours to go from the idea to a published blog post.

Did you notice there are no adverts or AI generated content on this site?

If you feel I have saved you some time, you can support me by;

©horsefreeglue.com, 2024. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given.

Spread the love
error: Content is protected !!