- create an lightsail OS Only Ubuntu instance
- turn on port forwarding of UDP
- set static ip
- ssh into the instance
- create and cd to /minecraft directory
- wget and unzip the latest bedrock server for ubuntu (https://www.minecraft.net/en-us/download/server/bedrock)
- create a
run.sh
(chmod 755) script with the following code:
#!/bin/bash
LD_LIBRARY_PATH=. ./bedrock_server
- edit server.settings and permissions.settings
- copy the following script into /etc/systemd/system/minecraft.server
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=ubuntu
Nice=1
KillMode=none
SuccessExitStatus=0 1
ProtectHome=true
ProtectSystem=full
PrivateDevices=true
NoNewPrivileges=true
WorkingDirectory=/minecraft
ExecStart=/minecraft/run.sh
ExecStop=killall bedrock_server
[Install]
WantedBy=multi-user.target
- Run the following commands
sudo systemctl daemon-reload
sudo systemctl start minecraft
sudo systemctl enable minecraft