Skip to content

Instantly share code, notes, and snippets.

@matsubo
Last active February 4, 2023 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matsubo/203ab161b8cc5d0e7495b1c24665ac02 to your computer and use it in GitHub Desktop.
Save matsubo/203ab161b8cc5d0e7495b1c24665ac02 to your computer and use it in GitHub Desktop.
Minecraft bedrock server systemd setting. This is working on Ubuntu 22.04.1 LTS

Minecraft bedrock server systemd setting

% curl -s https://gist.githubusercontent.com/matsubo/203ab161b8cc5d0e7495b1c24665ac02/raw/d937c1cd5922992795038e8e58a52edfa413265b/bedrock.service > bedrock.service
% vi bedrock.service # edit user name and path.
% sudo mv bedrock.service /etc/systemd/system/
% sudo chown root.root /etc/systemd/system/bedrock.service
% sudo systemctl start bedrock
% sudo systemctl status bedrock.service
% sudo systemctl enable bedrock

Example output

matsu@dell ~> systemctl status bedrock.service
● bedrock.service - Minecraft Bedrock Server
     Loaded: loaded (/etc/systemd/system/bedrock.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2023-02-05 00:44:39 JST; 7min ago
   Main PID: 757360 (bedrock_server)
      Tasks: 21 (limit: 18977)
     Memory: 126.2M
        CPU: 10.592s
     CGroup: /system.slice/bedrock.service
             └─757360 /home/matsu/bedrock/bedrock_server

Feb 05 00:44:40 dell bedrock_server[757360]: [2023-02-05 00:44:40:826 INFO] IPv4 supported, port: 19132: Used for gameplay and LAN discovery
Feb 05 00:44:40 dell bedrock_server[757360]: [2023-02-05 00:44:40:826 INFO] IPv6 supported, port: 19133: Used for gameplay
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:130 INFO] Server started.
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO] ================ TELEMETRY MESSAGE ===================
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO] Server Telemetry is currently not enabled.
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO] Enabling this telemetry helps us improve the game.
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO]
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO] To enable this feature, add the line 'emit-server-telemetry=true'
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO] to the server.properties file in the handheld/src-server directory
Feb 05 00:44:41 dell bedrock_server[757360]: [2023-02-05 00:44:41:180 INFO] ======================================================
[Unit]
Description=Minecraft Bedrock Server
After=network.target local-fs.target
[Service]
Type=simple
User=matsu
Group=matsu
WorkingDirectory=/home/matsu/bedrock
Environment=LD_LIBRARY_PATH=.
ExecStart=/home/matsu/bedrock/bedrock_server
Restart=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment