First run
The setup wizard, the port, and the console commands you actually need.
The first start runs a short setup wizard in the console. It asks for a language, agreement to the
licence, and a few basics like the server name and the port. Everything it asks can be changed
later in server.properties.
Open the port
Bedrock clients connect over UDP, not TCP.
sudo ufw allow 19132/udpIf the server is reachable over IPv6 as well, the second port is 19133/udp. Full detail, router
included, in Connecting.
Make yourself an operator
In the server console, not in the game:
op YourGamertagOperators bypass spawn protection and can run administrative commands in game.
Stop it properly
stopNever kill the process
Killing the server leaves unsaved chunks and player data behind. Corrupted world data is not something the server can repair for you.
Console commands worth knowing
| Command | What it does |
|---|---|
stop | Saves everything and shuts down cleanly. |
save-all | Forces a world and player save. |
status | Memory, players, loaded chunks and current TPS. |
plugins | Lists loaded plugins and their versions. |
version | Server version and the API version plugins are checked against. |
whitelist on | Closes the server to everyone not on the whitelist. |
gamemode survival <player> | Changes a player's gamemode. |
timings paste | Records a timings report, which is what you attach when asking about lag. |
Running it in the background
A screen or tmux session is enough for a small server. For anything you care about, use a
service manager so it comes back after a reboot.
[Unit]
Description=Altay
After=network.target
[Service]
User=altay
WorkingDirectory=/home/altay/server
ExecStart=/home/altay/server/start.sh
Restart=on-failure
[Install]
WantedBy=multi-user.targetSend stop to the console on shutdown rather than letting systemd signal the process, so the
server saves before it exits.