User Tools

This is an old revision of the document!


Minecraft Server

Installation

useradd -d /data/daemons/minecraft minecraft
mkdir /data/minecraft
chown minecraft:minecraft /data/minecraft/
docker-compose.yaml
services:
  bds:
    image: itzg/minecraft-bedrock-server
    environment:
      EULA: "TRUE"
    ports:
      - "19132:19132/udp"
    volumes:
      - ./data:/data
    stdin_open: true
    tty: true
podman compose pull

Remote Access

Mnecraft server doesn't use HTTP, so there is no need for a reverse proxy. You need to forward the UDP port from your external server to your internal (home) server (see here):

# on external server! nft add rule wg prerouting iifname "enp1s0" dnat ip to udp dport map { 19132 : 10.70.0.1 . 19132 } /etc/init.d/nftables save
 

Autostart

Using my user-containers OpenRC script just link it:

cd /etc/init.d
ln -s user-containers user-containers.minecraft

Create /etc/conf.d/user-containers.minecraft:

user-containers.minecraft
USER=minecraft
DESCRIPTION="Minecraft Server"

And set it up for autostart:+

/etc/init.d/user-containers.minecraft start
rc-update add user-containers.minecraft default

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information