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
|
# Minecraft
|
||||||
|
|
||||||
Self-host one or multiple servers.
|
Self-host one or multiple servers.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
### Whitelist
|
### Whitelist
|
||||||
|
|
||||||
#### Method 1: Docker
|
#### Option 1: Via Docker
|
||||||
In the `itzg/minecraft-server` env vars in docker, add the following to enable and configure whitelist.
|
Add the following env vars in docker-compose.yml:
|
||||||
```
|
```bash
|
||||||
ENABLE_WHITELIST: "TRUE"
|
ENABLE_WHITELIST: "TRUE"
|
||||||
WHITELIST: "player1,player2,player3"
|
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.
|
#### Option 2: Manually
|
||||||
|
1. After first time startup set `enforce-whitelist=true` in `server.properties`.
|
||||||
#### Method 2: Manual
|
2. Then, create `whitelist.properties` in the server directory with the following contents:
|
||||||
After first time startup set `enforce-whitelist=true` in `server.properties`.
|
```bash
|
||||||
|
|
||||||
Then, create `whitelist.properties` in the server directory with the following contents:
|
|
||||||
```
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"uuid": "player_uuid",
|
"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`.
|
After first time start go into `server.properties` and set `enforce-whitelist=true`.
|
||||||
Add users via server commands (`whitelist add NAME`).
|
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/`
|
SinglePlayerSleep: `https://www.spigotmc.org/resources/singleplayersleep.68139/`
|
||||||
Dynmap: `https://www.spigotmc.org/resources/dynmap%C2%AE.274/`
|
Dynmap: `https://www.spigotmc.org/resources/dynmap%C2%AE.274/`
|
||||||
NoEndermanGrief: `https://www.spigotmc.org/resources/no-enderman-grief2.71236/`
|
NoEndermanGrief: `https://www.spigotmc.org/resources/no-enderman-grief2.71236/`
|
||||||
ajLeaderboards: `https://www.spigotmc.org/threads/ajleaderboards.471179/`
|
ajLeaderboards: `https://www.spigotmc.org/threads/ajleaderboards.471179/`
|
||||||
|
|
||||||
#### Updating Plugins
|
#### 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.
|
Most plugins should not need to regenerate their data, so you can leave it as is.
|
||||||
|
|
||||||
## Maintenance
|
## Maintenance
|
||||||
@ -62,9 +61,20 @@ And move to a safe place.
|
|||||||
You might want this because the JVM might start hitting memory limits if too much is going on.
|
You might want this because the JVM might start hitting memory limits if too much is going on.
|
||||||
|
|
||||||
You can configure scheduled restarts by configuring `crontab` to periodically restart the container.
|
You can configure scheduled restarts by configuring `crontab` to periodically restart the container.
|
||||||
Edit crontab: `sudo crontab -e`
|
Edit crontab: `sudo crontab -e`
|
||||||
Add: `0 2 * * * docker restart minecraft-2023 minecraft-creative`
|
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
|
## References
|
||||||
https://github.com/itzg/docker-minecraft-server
|
https://github.com/itzg/docker-minecraft-server
|
||||||
https://github.com/Joshi425/minecraft-exporter
|
https://github.com/Joshi425/minecraft-exporter
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
version: "3"
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
minecraft:
|
minecraft:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
@ -10,6 +8,37 @@ networks:
|
|||||||
external: true
|
external: true
|
||||||
|
|
||||||
services:
|
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:
|
minecraft_creative:
|
||||||
image: itzg/minecraft-server:latest
|
image: itzg/minecraft-server:latest
|
||||||
container_name: minecraft_creative
|
container_name: minecraft_creative
|
||||||
@ -23,9 +52,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /pwspool/games/minecraft/minecraft_creative:/data
|
- /pwspool/games/minecraft/minecraft_creative:/data
|
||||||
environment:
|
environment:
|
||||||
- TYPE=PAPER
|
- TYPE=PURPUR
|
||||||
- MEMORY=2G
|
- MEMORY=2G
|
||||||
- VERSION=1.21.4
|
- VERSION=LATEST
|
||||||
- EULA=TRUE
|
- EULA=TRUE
|
||||||
- SERVER_NAME=minecraft_creative
|
- SERVER_NAME=minecraft_creative
|
||||||
- MODE=creative
|
- MODE=creative
|
||||||
@ -56,9 +85,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /pwspool/games/minecraft/minecraft_2023:/data
|
- /pwspool/games/minecraft/minecraft_2023:/data
|
||||||
environment:
|
environment:
|
||||||
- TYPE=PAPER
|
- TYPE=PURPUR
|
||||||
- MEMORY=4G
|
- MEMORY=4G
|
||||||
- VERSION=1.21.4
|
- VERSION=LATEST
|
||||||
- EULA=TRUE
|
- EULA=TRUE
|
||||||
- SERVER_NAME=minecraft_2023
|
- SERVER_NAME=minecraft_2023
|
||||||
- MODE=survival
|
- MODE=survival
|
||||||
@ -88,9 +117,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /pwspool/games/minecraft/minecraft_skyblock:/data
|
- /pwspool/games/minecraft/minecraft_skyblock:/data
|
||||||
environment:
|
environment:
|
||||||
- TYPE=PAPER
|
- TYPE=PURPUR
|
||||||
- MEMORY=4G
|
- MEMORY=4G
|
||||||
- VERSION=1.21.4
|
- VERSION=LATEST
|
||||||
- EULA=TRUE
|
- EULA=TRUE
|
||||||
- SERVER_NAME=minecraft_skyblock
|
- SERVER_NAME=minecraft_skyblock
|
||||||
- MODE=survival
|
- MODE=survival
|
||||||
|
|||||||
@ -25,3 +25,8 @@ Requires that the `/transcode` and `/downloads` directories are created and link
|
|||||||
## Setup
|
## Setup
|
||||||
When navigating to plex, assuming no nginx routing is happening, you must go to `https://[url]/web/index.html#!/` for first time 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