from web site
Minecraft is a well-known multiplayer game in which players can connect to a Minecraft world that is hosted within one of the player's running game or connect to a standalone server hosting an entire world.
It is not possible to set up a Minecraft server that can be accessed from outside your home without Tailscale.
- paying for hosting through third party, or - opening ports in the firewall, potentially allowing access to any rando on the Internet
Tailscale allows you to share it with anyone, anytime.
In this tutorial, we'll show how to create the Minecraft bedrock_server and connect to the server from any location using Tailscale.
Prerequisites
You will require a Linux server. This guide assumes that the Linux server or VM is running at home, behind a firewall. Tailscale lets clients connect to computers from anywhere and therefore there is no need to worry about access. It only needs to be connected to the internet. If you sign up for a VM hosted on a cloud provider's server be sure that your firewall blocks all access.
This guide assumes that you are using Ubuntu or Debian. However the changes for other Linux distributions will be minor.
Step 1: Set up bedrock_server on Linux
The bedrock_server can be used with Windows and Linux. We'll discuss Linux in this guide.
We recommend creating a user to run the Minecraft server, and installing some packages we'll need later:
Download the current version of the Linux bedrock_server binary from https://www.minecraft.net/en-us/download/server/bedrock. It is best to do this using the username that the minecraft user has just created:
Minecraft bedrock_server is regularly updated. When the Minecraft game app is updated, it will require the most current version of the server. So we'll prepare for future updates by storing the server files in the git directory:
Each successive bedrock_server update can be saved in git. Pay particular attention to permissions.json and server.properties, where any future bedrock_server update will overwrite any modifications you may have made.
systemd
systemd is a method to automatically start services when the system boots. We'll create a few files to have bedrock_server begin automatically.
/etc/systemd/system/minecraft.service
/opt/minecraft/start.sh
/opt/minecraft/stop.sh
Also make the shell scripts executable: chmod +x /opt/minecraft/start.sh /opt/minecraft/stop.sh
As root, you are able to start systemctl to start Minecraft. And voila! You're now running an Minecraft bedrock server.
You can connect to tmux as a Minecraft user to access the server console
To detach from tmux and to let bedrock_server run press Ctrl+B, then "d" to detachment.
Step 2 Install Tailscale
Tailscale is compatible with almost any modern Linux distribution, though the installation instructions might differ slightly.
Download Tailscale
Once installed and active on tailnet Once installed and active on tailnet, the Minecraft server bedrock_server is accessible from any Tailscale client.
Step 3: Play Minecraft
You'll need the Tailscale client installed, which is available from the App Store for iOS devices and the Play Store for Android. Additionally, you'll need the Minecraft app.
GAME SERVERS
In the Minecraft application, click Play, and then select the Servers tab. There will be a variety of third-party servers that are promoted in the list, but at the bottom of the list, there will be an option to add a server.
Add the information about your server, including the Tailscale IP Address (the 100.x.y.z address) to the description. These details can be found in the Tailscale app or in the admin console.
You'll be asked to sign in to XBox Live before being allowed to connect to the server. Live.com accounts can be created at no cost and you don't require an XBox. Tailscale does not receive the live.com account, Minecraft simply requires it before connecting.