Last active
April 14, 2023 02:19
-
-
Save Phelms215/8a9207f05e885bdf57425418b02599d1 to your computer and use it in GitHub Desktop.
Vault Hunter 1.18 Docker Compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
vault-hunters: | |
image: itzg/minecraft-server | |
ports: | |
- 25565:25565 | |
environment: | |
CF_API_KEY: "{{REPLACE_WITH_API_KEY}}" | |
GID: {{REPLACE_WITH_GROUP_ID}} | |
UID: {{REPLACE_WITH_USER_ID}} | |
MEMORY: "{{REPLACE_WITH_SERVER_MEMORY}}" | |
EULA: "TRUE" | |
TYPE: "AUTO_CURSEFORGE" | |
USE_AIKAR_FLAGS: "TRUE" | |
CF_PAGE_URL: "https://www.curseforge.com/minecraft/modpacks/vault-hunters-1-18-2" | |
CF_EXCLUDE_MODS: "245733,532127" | |
CF_FORCE_SYNCHRONIZE: "TRUE" | |
tty: true | |
stdin_open: true | |
restart: unless-stopped | |
volumes: | |
- /home/vh_server:/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps (assuming linux / ubuntu) | |
1. Install docker -> apt update && apt install docker.io docker-compose | |
2. Create User -> useradd vh_server (change vh_server to whatever name you want the server to run as) | |
3. Get UID/GID -> id vh_server | |
4. Replace GID/UID enviornment variables with information from step 3 | |
5. Create data directory -> mkdir /home/vh_server (change to wherever you want the server files & world files to live) | |
6. Get an API key for Curseforge -> https://console.curseforge.com/ | |
7. Update the "CF_API_KEY" based on the information from step 6. | |
8. copy the docker-compose.yml (with updated variables from steps above) into the /home/vh_server | |
9. Bring up server -> docker-compose up | |
10. Turn server down (and remove container) -> docker-compose down (no data loss since the volume is a bind to the local machine) | |
The server will auto download mods and update with a simple docker restart command | |
NOTE: With the CF_FORCE_SYNCHRONIZE the /config folder will be reset to defaults so disable this flag if you change any configs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment