mirror of
https://github.com/runyanjake/olomana.git
synced 2026-06-25 08:04:52 -07:00
Update Minecraft containers
This commit is contained in:
parent
dd406c2891
commit
4774042a41
@ -1,26 +1,22 @@
|
||||
# Minecraft
|
||||
|
||||
Self-host one or multiple servers.
|
||||
|
||||
## Setup
|
||||
|
||||
### Whitelist
|
||||
|
||||
#### Method 1: Docker
|
||||
In the `itzg/minecraft-server` env vars in docker, add the following to enable and configure whitelist.
|
||||
```
|
||||
#### Option 1: Via Docker
|
||||
Add the following env vars in docker-compose.yml:
|
||||
```bash
|
||||
ENABLE_WHITELIST: "TRUE"
|
||||
WHITELIST: "player1,player2,player3"
|
||||
```
|
||||
Note: The whitelist is additive, so if you set it to `[player1]` and later `[player2,player3]`, you'll end up with a whiltelist accepting all 3 players.
|
||||
The whitelist will be created in `whitelist.json` in the server directory. Adding something there will update the whitelist on the next run.
|
||||
|
||||
Edit the whitelist in `whitelist.json` in the server directory.
|
||||
|
||||
#### Method 2: Manual
|
||||
After first time startup set `enforce-whitelist=true` in `server.properties`.
|
||||
|
||||
Then, create `whitelist.properties` in the server directory with the following contents:
|
||||
```
|
||||
#### Option 2: Manually
|
||||
1. After first time startup set `enforce-whitelist=true` in `server.properties`.
|
||||
2. Then, create `whitelist.properties` in the server directory with the following contents:
|
||||
```bash
|
||||
[
|
||||
{
|
||||
"uuid": "player_uuid",
|
||||
@ -29,21 +25,24 @@ Then, create `whitelist.properties` in the server directory with the following c
|
||||
]
|
||||
```
|
||||
|
||||
#### Method 3: In Game
|
||||
#### Option 3: Via In-Game Commands
|
||||
After first time start go into `server.properties` and set `enforce-whitelist=true`.
|
||||
Add users via server commands (`whitelist add NAME`).
|
||||
|
||||
#### Plugins/Mods
|
||||
### Plugins/Mods
|
||||
|
||||
### Plugins
|
||||
##### Plugins (Updated 3/29/2026)
|
||||
[OnePlayerSleep+](https://modrinth.com/plugin/oneplayersleepgg?version=1.21.11&loader=paper)
|
||||
[NoEndermanGrief](https://modrinth.com/plugin/no-enderman-griefing/version/1.0)
|
||||
|
||||
#### Plugins (Old)
|
||||
SinglePlayerSleep: `https://www.spigotmc.org/resources/singleplayersleep.68139/`
|
||||
Dynmap: `https://www.spigotmc.org/resources/dynmap%C2%AE.274/`
|
||||
NoEndermanGrief: `https://www.spigotmc.org/resources/no-enderman-grief2.71236/`
|
||||
ajLeaderboards: `https://www.spigotmc.org/threads/ajleaderboards.471179/`
|
||||
|
||||
#### Updating Plugins
|
||||
It's very easy, just obtain the new jar file for the updated plugin, stop server and swap old jar in `plugins/`.
|
||||
|
||||
Obtain the new jar file for the updated plugin, stop server and swap old jar in `plugins/`.
|
||||
Most plugins should not need to regenerate their data, so you can leave it as is.
|
||||
|
||||
## Maintenance
|
||||
@ -65,6 +64,17 @@ You can configure scheduled restarts by configuring `crontab` to periodically re
|
||||
Edit crontab: `sudo crontab -e`
|
||||
Add: `0 2 * * * docker restart minecraft-2023 minecraft-creative`
|
||||
|
||||
## Runbook
|
||||
Start all:
|
||||
```bash
|
||||
docker compose down && docker system prune -af && docker compose up -d && docker logs -f minecraft-2023
|
||||
```
|
||||
|
||||
Start single:
|
||||
```bash
|
||||
docker compose down && docker system prune -af && docker compose up -d minecraft_solo && docker logs -f minecraft_solo
|
||||
```
|
||||
|
||||
## References
|
||||
https://github.com/itzg/docker-minecraft-server
|
||||
https://github.com/Joshi425/minecraft-exporter
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
minecraft:
|
||||
driver: bridge
|
||||
@ -10,6 +8,37 @@ networks:
|
||||
external: true
|
||||
|
||||
services:
|
||||
minecraft_solo:
|
||||
image: itzg/minecraft-server:latest
|
||||
container_name: minecraft_solo
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- grafana
|
||||
- minecraft
|
||||
ports:
|
||||
- "25567:25565"
|
||||
volumes:
|
||||
- /pwspool/games/minecraft/minecraft_solo:/data
|
||||
environment:
|
||||
- TYPE=PURPUR
|
||||
- MEMORY=2G
|
||||
- VERSION=LATEST
|
||||
- EULA=TRUE
|
||||
- SERVER_NAME=minecraft_solo
|
||||
- MODE=survival
|
||||
- DIFFICULTY=hard
|
||||
- OPS=RicecakeSMS,pZ_aeriaL
|
||||
- ENABLE_WHITELIST=true
|
||||
- WHITELIST=RicecakeSMS,pZ_aeriaL
|
||||
- ICON=https://i.imgur.com/sqjZGql.png
|
||||
- ENABLE_COMMAND_BLOCK=false
|
||||
- GENERATE_STRUCTURES=true
|
||||
- MOTD="\u00A77Pinnerland Creative Server, powered by \u00A75P\u00A79W\u00A75S\u00A77\!"
|
||||
- PVP=false
|
||||
- ALLOW_FLIGHT=true
|
||||
labels:
|
||||
- "traefik.enable=false"
|
||||
|
||||
minecraft_creative:
|
||||
image: itzg/minecraft-server:latest
|
||||
container_name: minecraft_creative
|
||||
@ -23,9 +52,9 @@ services:
|
||||
volumes:
|
||||
- /pwspool/games/minecraft/minecraft_creative:/data
|
||||
environment:
|
||||
- TYPE=PAPER
|
||||
- TYPE=PURPUR
|
||||
- MEMORY=2G
|
||||
- VERSION=1.21.4
|
||||
- VERSION=LATEST
|
||||
- EULA=TRUE
|
||||
- SERVER_NAME=minecraft_creative
|
||||
- MODE=creative
|
||||
@ -56,9 +85,9 @@ services:
|
||||
volumes:
|
||||
- /pwspool/games/minecraft/minecraft_2023:/data
|
||||
environment:
|
||||
- TYPE=PAPER
|
||||
- TYPE=PURPUR
|
||||
- MEMORY=4G
|
||||
- VERSION=1.21.4
|
||||
- VERSION=LATEST
|
||||
- EULA=TRUE
|
||||
- SERVER_NAME=minecraft_2023
|
||||
- MODE=survival
|
||||
@ -88,9 +117,9 @@ services:
|
||||
volumes:
|
||||
- /pwspool/games/minecraft/minecraft_skyblock:/data
|
||||
environment:
|
||||
- TYPE=PAPER
|
||||
- TYPE=PURPUR
|
||||
- MEMORY=4G
|
||||
- VERSION=1.21.4
|
||||
- VERSION=LATEST
|
||||
- EULA=TRUE
|
||||
- SERVER_NAME=minecraft_skyblock
|
||||
- MODE=survival
|
||||
|
||||
@ -25,3 +25,8 @@ Requires that the `/transcode` and `/downloads` directories are created and link
|
||||
## Setup
|
||||
When navigating to plex, assuming no nginx routing is happening, you must go to `https://[url]/web/index.html#!/` for first time setup.
|
||||
|
||||
## Running
|
||||
```bash
|
||||
docker compose down && docker system prune -af && docker compose up -d && docker logs -f plex
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user