add minecraft bedrock server

This commit is contained in:
Matthew Tran 2024-09-16 05:44:19 +00:00
parent e9f8a77d26
commit b714e2895b
11 changed files with 100 additions and 12 deletions

3
.gitignore vendored
View File

@ -15,6 +15,9 @@ p2pool/cache
# minecraft
minecraft/world*
# minecraft_bedrock
minecraft_bedrock/worlds*
# terraria
terraria/worlds
terraria/password.txt

View File

@ -3,10 +3,11 @@
Stuff that's deployed on [matthewtran.com](http://matthewtran.com). Tested on Ubuntu Server 22.04.3 LTS. Currently running the following services.
- website
- gitea ([git.matthewtran.com](http://git.matthewtran.com))
- gitea ([git.matthewtran.com](https://git.matthewtran.com))
- monerod
- p2pool (`xmrig -o matthewtran.com:3333`)
- minecraft
- minecraft bedrock
- ~~terraria~~
- wireguard
@ -14,15 +15,16 @@ Stuff that's deployed on [matthewtran.com](http://matthewtran.com). Tested on Ub
Forward the following ports to the server.
| service | port |
|-----------|--------------------|
| website | 80, 443 |
| gitea | 2222 |
| monerod | 18080 |
| p2pool | 3333, 37888, 37889 |
| minecraft | 25565 |
| terraria | 7777 |
| wireguard | 51820 |
| service | port |
|-------------------|--------------------|
| website | 80, 443 |
| gitea | 2222 |
| monerod | 18080 |
| p2pool | 3333, 37888, 37889 |
| minecraft | 25565 |
| minecraft bedrock | 19132, 19133 |
| terraria | 7777 |
| wireguard | 51820 |
Make sure IPv6 is enabled in Docker by modifying `/etc/docker/daemon.json`. For example:
@ -47,3 +49,9 @@ Note for first start you'll need to configure Gitea. You may also need to `chown
## backup
Run `./backup` and save the resultant `data.zip` somewhere. I should probably automate this.
## TODO
- full setup script
- correct volume mounting w/o need `chown`/`chmod`
- better backup and restore

1
backup
View File

@ -2,6 +2,7 @@
zip -FS -r data.zip \
minecraft/world \
minecraft_bedrock/worlds \
terraria/worlds \
terraria/password.txt \
website/gitea \

View File

@ -65,6 +65,17 @@ services:
- default6
volumes:
- ./minecraft/world:/home/matt/world
minecraft_bedrock:
restart: always
build: minecraft_bedrock/.
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
ports:
- "19132:19132/udp"
- "19133:19133/udp"
networks:
- default6
volumes:
- ./minecraft_bedrock/worlds:/home/matt/worlds
# terraria:
# restart: always
# build: terraria/.

View File

@ -0,0 +1 @@
worlds/

View File

@ -0,0 +1,16 @@
FROM ubuntu:24.04
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y wget unzip curl
RUN useradd -m matt
USER matt
WORKDIR /home/matt
# from https://www.minecraft.net/en-us/download/server/bedrock (currently 1.21.23.01)
RUN wget -O server.zip https://minecraft.azureedge.net/bin-linux/bedrock-server-1.21.23.01.zip
RUN unzip server.zip && rm server.zip
COPY --chown=matt:matt entry.sh ./
COPY --chown=matt:matt server.properties ./
COPY --chown=matt:matt permissions.json ./

View File

@ -0,0 +1,5 @@
#!/bin/sh
# TODO graceful exit
LD_LIBRARY_PATH=. ./bedrock_server

View File

@ -0,0 +1,7 @@
[
{
"permission": "operator",
"name": "dragonlock2",
"xuid": "2535438419596262"
}
]

View File

@ -0,0 +1,36 @@
server-name=poopy
gamemode=survival
force-gamemode=false
difficulty=hard
allow-cheats=true
max-players=20
online-mode=true
allow-list=false
server-port=19132
server-portv6=19133
enable-lan-visibility=true
view-distance=32
tick-distance=4
player-idle-timeout=0
max-threads=4
level-name=test
level-seed=
default-player-permission-level=visitor
texturepack-required=false
content-log-file-enabled=false
compression-threshold=1
compression-algorithm=zlib
server-authoritative-movement=server-auth
player-position-acceptance-threshold=0.5
player-movement-action-direction-threshold=0.85
server-authoritative-block-breaking-pick-range-scalar=1.5
chat-restriction=None
disable-player-interaction=false
client-side-chunk-generation-enabled=true
block-network-ids-are-hashes=true
disable-persona=false
disable-custom-skins=false
server-build-radius-ratio=Disabled
allow-outbound-script-debugging=false
allow-inbound-script-debugging=false
script-debugger-auto-attach=disabled

View File

@ -7,8 +7,8 @@ RUN useradd -m matt
USER matt
WORKDIR /home/matt
RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.3.3.tar.bz2 -O monerod.tar.bz2
RUN wget https://downloads.getmonero.org/cli/monero-linux-x64-v0.18.3.4.tar.bz2 -O monerod.tar.bz2
RUN tar xvf monerod.tar.bz2 && rm monerod.tar.bz2
RUN mv monero-x86_64-linux-gnu-v0.18.3.3 monero
RUN mv monero-x86_64-linux-gnu-v0.18.3.4 monero
COPY --chown=matt:matt entry.sh ./