Minecraft Field guide

Minecraft Bedrock Dedicated Server on Linux: Dependencies, Ports, and Systemd

Installing official Minecraft Bedrock Dedicated Server on Linux: libcurl4 runtime dependencies, unprivileged user isolation, RakNet UDP ports, and systemd with LD_LIBRARY_PATH.

Minecraft Bedrock Dedicated Server on Linux: Dependencies, Ports, and Systemd

The official Minecraft Bedrock Dedicated Server (BDS) by Mojang enables seamless cross-platform multiplayer worlds for players across mobile devices (iOS, Android), game consoles (Xbox, PlayStation, Nintendo Switch), and Windows 10/11 PCs. Unlike traditional Minecraft Java servers which execute within a standard Java Virtual Machine, the Bedrock server is distributed as a native C++ ELF binary for Linux x86_64, requiring specific shared libraries and system environments.

This technical guide walks through installing required Linux runtime libraries, configuring dedicated unprivileged system users, configuring UDP firewall rules, and writing a persistent systemd daemon unit.

System Prerequisites and Library Dependencies#

The bedrock_server executable relies on dynamic library linkage for network encryption and HTTP services. Running the binary without the libcurl4 runtime package results in an immediate execution crash.

Install the necessary Linux dependencies via the package manager:

bash
sudo apt update && sudo apt install -y curl unzip libcurl4 libssl3 ca-certificates

To preserve host security, never run game server processes with administrative root permissions. Create a dedicated system user bedrock assigned to /opt/bedrock with disabled shell login:

bash
sudo useradd -r -m -d /opt/bedrock -s /usr/sbin/nologin bedrock

Downloading and Extracting the Official BDS Archive#

Mojang publishes the dedicated server package in standard zip format. Fetch the official binary distribution and unpack it into the server home directory:

bash
cd /opt/bedrock && curl -H "User-Agent: Mozilla/5.0" -O https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.41.01.zip && unzip bedrock-server-*.zip && rm bedrock-server-*.zip

Assign full file ownership to the unprivileged daemon user and grant executable permissions to the binary:

bash
sudo chown -R bedrock:bedrock /opt/bedrock && sudo chmod +x /opt/bedrock/bedrock_server

Network Firewall and UDP Port Allocation#

The Bedrock multiplayer protocol runs entirely over RakNet UDP packet streams. TCP ports do not need to be opened:

  • Port 19132/udp — Standard transport port for all IPv4 client traffic.
  • Port 19133/udp — Secondary transport port for IPv6 client connections.

Permit incoming traffic through Ubuntu's Uncomplicated Firewall (UFW):

bash
sudo ufw allow 19132/udp && sudo ufw allow 19133/udp

If you prefer deploying a dedicated Bedrock server without manual package installation or dynamic library debugging, managed Minecraft server hosting delivers pre-configured Bedrock instances with automatic updates through an intuitive web control panel.

Configuring systemd for Background Automation#

A critical technical requirement for launching bedrock_server is ensuring the process can locate its bundled companion shared libraries (.so). The systemd configuration must explicitly export Environment="LD_LIBRARY_PATH=.".

Author the system unit at /etc/systemd/system/bedrock.service:

ini
[Unit]
Description=Minecraft Bedrock Dedicated Server
After=network.target

[Service]
Type=simple
User=bedrock
Group=bedrock
WorkingDirectory=/opt/bedrock
Environment="LD_LIBRARY_PATH=."
ExecStart=/opt/bedrock/bedrock_server
Restart=on-failure
RestartSec=10s
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target

Reload the systemd manager configuration, enable the daemon on host boot, and start the service:

bash
sudo systemctl daemon-reload && sudo systemctl enable --now bedrock && sudo systemctl status bedrock

Once running, administrators can customize world properties inside /opt/bedrock/server.properties (such as server-name, difficulty, or max-players) and reload configurations using sudo systemctl restart bedrock.

Sources#