|
1 | | -## docker-amp |
| 1 | +# docker-amp |
2 | 2 |
|
3 | 3 | [](https://hub.docker.com/r/vcxpz/amp)  [](https://github.com/hydazz/docker-amp/actions?query=workflow%3A"Auto+Builder+CI") [](https://app.codacy.com/gh/hydazz/docker-amp) |
4 | 4 |
|
5 | 5 | Fork of [MitchTalmadge/AMP-dockerized](https://github.com/MitchTalmadge/AMP-dockerized/) |
6 | 6 |
|
7 | 7 | [AMP](https://cubecoders.com/AMP) is short for Application Management Panel. It's CubeCoders next-generation server administration software built for both users, and service providers. It supports both Windows and Linux based servers and allows you to manage all your game servers from a single web interface. |
8 | 8 |
|
9 | | -## Usage |
10 | | - |
11 | | - docker run -d \ |
12 | | - --name=amp \ |
13 | | - -e PUID=1000 \ |
14 | | - -e PGID=1000 \ |
15 | | - -e TZ=Australia/Melbourne \ |
16 | | - -p 8080:8080 \ |
17 | | - -e USERNAME= `#webui username` \ |
18 | | - -e PASSWORD= `#webui password` \ |
19 | | - -e LICENCE= `#see below` \ |
20 | | - -e MODULE= `#see below` \ |
21 | | - -v <path to appdata>:/config \ |
22 | | - --mac-address=xx:xx:xx:xx:xx:xx `#see below` \ |
23 | | - --restart unless-stopped \ |
24 | | - vcxpz/amp |
| 9 | +# Usage |
| 10 | + |
| 11 | +```bash |
| 12 | +docker run -d \ |
| 13 | + --name=amp \ |
| 14 | + -e PUID=1000 \ |
| 15 | + -e PGID=1000 \ |
| 16 | + -e TZ=Australia/Melbourne \ |
| 17 | + -p 8080:8080 \ |
| 18 | + -e USERNAME= `#webui username` \ |
| 19 | + -e PASSWORD= `#webui password` \ |
| 20 | + -e LICENCE= `#see below` \ |
| 21 | + -e MODULE= `#see below` \ |
| 22 | + -v <path to appdata>:/config \ |
| 23 | + --mac-address=xx:xx:xx:xx:xx:xx `#see below` \ |
| 24 | + --restart unless-stopped \ |
| 25 | + vcxpz/amp |
| 26 | +``` |
25 | 27 |
|
26 | 28 | [](https://github.com/hydazz/docker-templates/blob/main/hydaz/amp.xml) |
27 | 29 |
|
28 | | -## Please Note |
| 30 | +# Please Note |
29 | 31 |
|
30 | 32 | As it takes more than 10 seconds (the default timeout for Docker) for AMP to do a graceful shutdown, make sure you have no running modules. Stopping your container via Docker while you have running modules may cause corruption as Docker will kill the container. The easiest way to do a graceful shutdown is to open a console to the container and execute `amp stop`. This command basically does `s6-svc -to /var/run/s6/services/amp`. Which sends a SIGTERM to AMP then tells `s6` not to restart AMP after the service it is terminated. |
31 | 33 |
|
32 | | -## Supported Modules |
| 34 | +# Supported Modules |
33 | 35 |
|
34 | 36 | **Will Work:** |
35 | 37 |
|
36 | | -- Java applications such as Minecraft Java, Minecraft Bedrock + others |
| 38 | +- Java applications such as Minecraft Java, Minecraft Bedrock + others |
37 | 39 |
|
38 | 40 | **Won't Work:** |
39 | 41 |
|
40 | | -- [Everything Else](https://github.com/CubeCoders/AMP/wiki/Supported-Applications-Compatibility) |
| 42 | +- [Everything Else](https://github.com/CubeCoders/AMP/wiki/Supported-Applications-Compatibility) |
41 | 43 |
|
42 | | -## MAC Address (Important) |
| 44 | +# MAC Address (Important) |
43 | 45 |
|
44 | | -AMP is designed to detect hardware changes and will de-activate all instances when something significant changes. |
45 | | -This is to stop people from sharing pre-activated instances and bypassing the licencing server. One way of detecting |
46 | | -changes is to look at the MAC address of the host's network card. A change here will de-activate instances. |
| 46 | +AMP is designed to detect hardware changes and will de-activate all instances when something significant changes. This is to stop people from sharing pre-activated instances and bypassing the licencing server. One way of detecting changes is to look at the MAC address of the host's network card. A change here will de-activate instances. |
47 | 47 |
|
48 | | -By default, Docker assigns a new MAC address to a container every time it is restarted. Therefore, unless you want to |
49 | | -painstakingly re-activate all your instances on every server reboot, you need to assign a permanent MAC address. |
| 48 | +By default, Docker assigns a new MAC address to a container every time it is restarted. Therefore, unless you want to painstakingly re-activate all your instances on every server reboot, you need to assign a permanent MAC address. |
50 | 49 |
|
51 | | -For most people, this can be accomplished by generating a random MAC address in Docker's acceptable range. |
52 | | -The instructions to do so are as follows: |
| 50 | +For most people, this can be accomplished by generating a random MAC address in Docker's acceptable range. The instructions to do so are as follows: |
53 | 51 |
|
54 | 52 | **Linux** |
55 | 53 |
|
56 | | - echo $RANDOM | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/' |
| 54 | +```bash |
| 55 | +echo $RANDOM | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/' |
| 56 | +``` |
57 | 57 |
|
58 | 58 | **MacOS** |
59 | 59 |
|
60 | | - echo $RANDOM | md5 | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/' |
| 60 | +```bash |
| 61 | +echo $RANDOM | md5 | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/' |
| 62 | +``` |
61 | 63 |
|
62 | 64 | **Windows** |
63 | 65 |
|
64 | | -- Visit this page: |
65 | | -- Put `02:42:AC` in as the prefix |
66 | | -- Choose the format with colons `:` |
67 | | -- Generate |
| 66 | +- Visit this page: |
| 67 | +- Put `02:42:AC` in as the prefix |
| 68 | +- Choose the format with colons `:` |
| 69 | +- Generate |
68 | 70 |
|
69 | | -### |
| 71 | +# # |
70 | 72 |
|
71 | | -- Copy the generated MAC and use it when starting the container. |
| 73 | +- Copy the generated MAC and use it when starting the container. |
72 | 74 |
|
73 | | - - For `docker run`, use the following flag: (Substitute your generated MAC) |
| 75 | + - For `docker run`, use the following flag: (Substitute your generated MAC) |
74 | 76 |
|
75 | | - `--mac-address="02:42:AC:XX:XX:XX"` |
| 77 | + `--mac-address="02:42:AC:XX:XX:XX"` |
76 | 78 |
|
77 | | - - For Docker Compose, use the following key next to `image`: |
| 79 | + - For Docker Compose, use the following key next to `image`: |
78 | 80 |
|
79 | | - `mac_address: 02:42:AC:XX:XX:XX` |
| 81 | + `mac_address: 02:42:AC:XX:XX:XX` |
80 | 82 |
|
81 | 83 | If you have a unique network situation, a random MAC may not work for you. In that case you will need to come up with your own solution to prevent address conflicts. |
82 | 84 |
|
83 | 85 | If you need help with any of this, please make an issue. |
84 | 86 |
|
85 | | -## Ports |
| 87 | +# Ports |
86 | 88 |
|
87 | 89 | Here's a rough (and potentially incorrect) list of default ports for the various modules. Each module also exposes port 8080 for the Web UI (can be changed with environment variables). If you find an inaccuracy, open an issue! |
88 | 90 |
|
89 | | -| Module Name | Default Ports | |
90 | | -| ----------- | --------------------------------------- | |
91 | | -| `ADS` | No additional ports. | |
92 | | -| `McMyAdmin` | TCP 25565 | |
93 | | -| `Minecraft` | TCP 25565 (Java) or UDP 19132 (Bedrock) | |
| 91 | +Module Name | Default Ports |
| 92 | +----------- | --------------------------------------- |
| 93 | +`ADS` | No additional ports. |
| 94 | +`McMyAdmin` | TCP 25565 |
| 95 | +`Minecraft` | TCP 25565 (Java) or UDP 19132 (Bedrock) |
94 | 96 |
|
95 | 97 | Just a quick note about ports: some games use TCP, some games use UDP. Make sure you are using the right protocol. Don't fall into the trap of accidentally mapping a TCP port for a UDP game -- you won't be able to connect. |
96 | 98 |
|
97 | | -## Environment Variables |
| 99 | +# Environment Variables |
98 | 100 |
|
99 | | -### Module |
| 101 | +## Module |
100 | 102 |
|
101 | | -| Name | Description | Default Value | |
102 | | -| -------- | ---------------------------------------------------------------- | ------------- | |
103 | | -| `MODULE` | Which Module to use for the main instance created by this image. | `ADS` | |
| 103 | +Name | Description | Default Value |
| 104 | +-------- | ---------------------------------------------------------------- | ------------- |
| 105 | +`MODULE` | Which Module to use for the main instance created by this image. | `ADS` |
104 | 106 |
|
105 | 107 | To run multiple game servers under this image, use the default value of `ADS` (Application Deployment Service) which allows you to create various modules from the web ui. |
106 | 108 |
|
107 | | -To be clear, this Docker image creates ONE instance by default. If you want to create more, use `ADS` as the first |
108 | | - instance, and create the rest with the web UI. Otherwise, you can pick any other module from the list. |
| 109 | +To be clear, this Docker image creates ONE instance by default. If you want to create more, use `ADS` as the first instance, and create the rest with the web UI. Otherwise, you can pick any other module from the list. |
109 | 110 |
|
110 | 111 | Here are the accepted values for the `MODULE` variable: |
111 | 112 |
|
112 | | -| Module Name | Description | |
113 | | -| ----------- | ------------------------------------------------------------------------------------------------------------- | |
114 | | -| `ADS` | Application Deployment Service. Used to manage multiple modules. Need multiple game servers? Pick this. | |
115 | | -| `McMyAdmin` | If you have a McMyAdmin Licence, this will be picked for you no matter what. It is equivalent to `Minecraft`. | |
116 | | -| `Minecraft` | Includes Java (Spigot, Bukkit, Paper, etc.) and Bedrock servers. | |
| 113 | +Module Name | Description |
| 114 | +----------- | ------------------------------------------------------------------------------------------------------------- |
| 115 | +`ADS` | Application Deployment Service. Used to manage multiple modules. Need multiple game servers? Pick this. |
| 116 | +`McMyAdmin` | If you have a McMyAdmin Licence, this will be picked for you no matter what. It is equivalent to `Minecraft`. |
| 117 | +`Minecraft` | Includes Java (Spigot, Bukkit, Paper, etc.) and Bedrock servers. |
117 | 118 |
|
118 | | -## Volumes |
| 119 | +# Volumes |
119 | 120 |
|
120 | | -| Mount Point | Description | |
121 | | -| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
122 | | -| `/config` | **Required!** This volume contains everything AMP needs to run. This includes all your instances, all their game files, the web ui sign-in info, etc. Essentially, without creating this volume, AMP will be wiped on every boot. | |
| 121 | +Mount Point | Description |
| 122 | +----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 123 | +`/config` | **Required!** This volume contains everything AMP needs to run. This includes all your instances, all their game files, the web ui sign-in info, etc. Essentially, without creating this volume, AMP will be wiped on every boot. |
123 | 124 |
|
124 | 125 | **See other variables on the official [README](https://github.com/MitchTalmadge/AMP-dockerized/)** |
125 | 126 |
|
126 | | -## Upgrading AMP |
| 127 | +# Upgrading AMP |
127 | 128 |
|
128 | 129 | To upgrade, all you have to do is pull the latest Docker image. We automatically check for AMP updates daily so there may be some delay when an update is released to when the image is updated. To do a force upgrade, open a console to the container and executing `amp upgrade`. This will upgrade all modules to the latest version available. |
129 | 130 |
|
130 | | -## Fixing Appdata Permissions |
| 131 | +# Fixing Appdata Permissions |
131 | 132 |
|
132 | 133 | If you ever accidentally screw up the permissions on the appdata folder, run `fix-perms` within the container. This will restore most of the files/folders with the correct permissions. |
0 commit comments