{"slug":"run-a-private-minecraft-server-with-tailscale","title":"Run a private Minecraft server with Tailscale","tags":["tailscale"],"agent_summary":"Last validated: Jan 5, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# Run a private Minecraft server with Tailscale\r\n\r\nLast validated: Jan 5, 2026\r\n\r\nMinecraft is a popular multiplayer game, in which players can connect to\r\na Minecraft world hosted within one of the player's running game or can\r\nconnect to a standalone server hosting a world.\r\n\r\nWithout Tailscale, setting up a Minecraft server to be reachable from outside\r\nthe home means either:\r\n\r\n- paying for third-party hosting, or\r\n- opening ports in the firewall, potentially allowing access to any person on the internet\r\n\r\nWith Tailscale, you can share it from anywhere with just the people you want.\r\n\r\nIn this guide, we'll show how to set up a Minecraft `bedrock_server` and connect\r\nto the server from anywhere using Tailscale.\r\n\r\n## [Prerequisites](https://tailscale.com/docs/solutions/set-up-minecraft\\#prerequisites)\r\n\r\nYou will need a Linux server. These instructions assume a Linux server or VM\r\nrunning within the home, behind a firewall. Tailscale lets clients connect to\r\ncomputers wherever they are, so you do not need to worry about the\r\naccessibility of the machine. It just needs to be on the internet. If you sign\r\nup for a VM hosted by a cloud provider, make sure to\r\n[block almost all access in the firewall](https://tailscale.com/docs/reference/faq/firewall-ports).\r\n\r\nThe instructions in this guide assume you are using Ubuntu or Debian, though\r\nthe changes for other Linux distributions are small.\r\n\r\n## [Step 1: Set up `bedrock_server` on Linux](https://tailscale.com/docs/solutions/set-up-minecraft\\#step-1-set-up-bedrock_server-on-linux)\r\n\r\nThe `bedrock_server` supports both Windows and Linux. We'll cover Linux in\r\nthis guide.\r\n\r\nWe recommend creating a user to run the Minecraft server, and installing some\r\npackages we'll need later:\r\n\r\n```shell\r\nadduser --system --home /opt/minecraft minecraft\r\naddgroup --system minecraft\r\nadduser minecraft minecraft\r\nchsh --shell /bin/bash minecraft\r\napt install unzip curl tmux git wget\r\n```\r\n\r\nDownload the current version of the Linux `bedrock_server` binary from\r\n`https://www.minecraft.net/en-us/download/server/bedrock`. It is best to\r\ndo this as the `minecraft` user just created:\r\n\r\n```shell\r\nsu -s -u minecraft\r\ncd ~\r\nwget \"download path copied from https://www.minecraft.net/en-us/download/server/bedrock\"\r\n```\r\n\r\nMinecraft `bedrock_server` is updated relatively frequently, and when the\r\nMinecraft game app is updated it requires the new version of the server.\r\nSo we'll prepare for future updates by storing the server files in git:\r\n\r\n```shell\r\ngit init .\r\nunzip bedrock_server*.zip\r\nrm bedrock_server*.zip\r\ngit add -A\r\ngit commit -m \"Initial bedrock_server\"\r\n```\r\n\r\nEach successive `bedrock_server` update can be stored in git. Pay special attention\r\nto `permissions.json` and `server.properties`, where any future `bedrock_server`\r\nwill overwrite any customizations you may have made.\r\n\r\n### [systemd](https://tailscale.com/docs/solutions/set-up-minecraft\\#systemd)\r\n\r\n`systemd` is a way to automatically start services when the system boots. We'll\r\ncreate a few files to have `bedrock_server` start automatically.\r\n\r\n* * *\r\n\r\n`/etc/systemd/system/minecraft.service`\r\n\r\n```markup\r\n[Unit]\r\nDescription=Minecraft Service\r\nWants=network.target\r\nAfter=network.target\r\n\r\n[Service]\r\nUser=minecraft\r\nGroup=minecraft\r\n\r\nType=forking\r\n\r\nProtectHome=true\r\nProtectSystem=full\r\nPrivateDevices=true\r\nNoNewPrivileges=true\r\nInaccessibleDirectories=/root /sys /srv /media -/lost+found\r\nReadWriteDirectories=/opt/minecraft\r\nWorkingDirectory=/opt/minecraft\r\nExecStart=/opt/minecraft/start.sh\r\nExecStop=/opt/minecraft/stop.sh\r\nTimeoutStopSec=20\r\nRestart=on-failure\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n```\r\n\r\n* * *\r\n\r\n`/opt/minecraft/start.sh`\r\n\r\n```shell\r\n#!/bin/sh\r\n/usr/bin/tmux new-session -s minecraft -d\r\ntmux send -t minecraft \"LD_LIBRARY_PATH=. ./bedrock_server\" ENTER\r\ntmux send -t minecraft \"gamerule showcoordinates true\" ENTER\r\ntmux send -t minecraft \"gamerule keepInventory true\" ENTER\r\n```\r\n\r\n* * *\r\n\r\n`/opt/minecraft/stop.sh`\r\n\r\n```shell\r\n#!/bin/sh\r\n/usr/bin/tmux send -t minecraft save-all ENTER\r\n/usr/bin/tmux send -t minecraft stop ENTER\r\necho \"Killing minecraft session\"\r\n/usr/bin/tmux kill-session -t minecraft\r\n```\r\n\r\n* * *\r\n\r\nAlso make the shell scripts executable: `chmod +x /opt/minecraft/start.sh /opt/minecraft/stop.sh`\r\n\r\nAs root you should now `systemctl start minecraft` and voilà, you are running\r\na Minecraft bedrock edition server.\r\n\r\nAs the `minecraft` user, you can connect to tmux to access the server console:\r\n\r\n```shell\r\nsudo -s -u minecraft\r\ntmux attach\r\n```\r\n\r\nTo detach from tmux and leave `bedrock_server` running, press Ctrl-B\r\nthen \"d\" for detach.\r\n\r\n## [Step 2: Install Tailscale on the server](https://tailscale.com/docs/solutions/set-up-minecraft\\#step-2-install-tailscale-on-the-server)\r\n\r\nTailscale is available for essentially any modern Linux distribution, though the\r\ninstallation instructions may vary slightly.\r\n\r\n[Download Tailscale for Linux](https://tailscale.com/download/linux)\r\n\r\nOnce installed and active in the tailnet, the Minecraft `bedrock_server` can be\r\nreached from any of your other Tailscale clients.\r\n\r\n## [Step 3: Play Minecraft](https://tailscale.com/docs/solutions/set-up-minecraft\\#step-3-play-minecraft)\r\n\r\nYou'll need the Tailscale client installed, from the App Store for iOS devices\r\nand the Play Store for Android. You'll also need the Minecraft app.\r\n\r\nIn the Minecraft app, select **Play**, and then select the **Servers** tab. There will be a\r\nnumber of promoted third-party servers in the list, but scrolling to the\r\nbottom there will be a button to **Add Server**.\r\n\r\n![Minecraft Server list scrolled to the bottom with a button to Add Server](https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fadd-server.d1785c55.png&w=3840&q=75)\r\n\r\nAdd the details of the server just created, including the Tailscale IP address\r\n(the 100.x.y.z IP address, which can be looked up in the Tailscale app or in the [Machines](https://login.tailscale.com/admin/machines) page of the admin console).\r\n\r\n![Typing in the server name with a server address of 100.99.98.97](https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fserver-details.cbbed4d1.png&w=3840&q=75)\r\n\r\nYou'll be asked to login to XBox Live before being allowed to connect to the\r\nserver. `live.com` accounts are free, and you don't have to have an XBox to\r\ncreate one. Tailscale never receives the `live.com` account, Minecraft only\r\nrequires it before connecting.\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>Run a private Minecraft server with Tailscale</h1>\n<p>Last validated: Jan 5, 2026</p>\n<p>Minecraft is a popular multiplayer game, in which players can connect to\r\na Minecraft world hosted within one of the player's running game or can\r\nconnect to a standalone server hosting a world.</p>\n<p>Without Tailscale, setting up a Minecraft server to be reachable from outside\r\nthe home means either:</p>\n<ul>\n<li>paying for third-party hosting, or</li>\n<li>opening ports in the firewall, potentially allowing access to any person on the internet</li>\n</ul>\n<p>With Tailscale, you can share it from anywhere with just the people you want.</p>\n<p>In this guide, we'll show how to set up a Minecraft <code>bedrock_server</code> and connect\r\nto the server from anywhere using Tailscale.</p>\n<h2><a href=\"https://tailscale.com/docs/solutions/set-up-minecraft#prerequisites\">Prerequisites</a></h2>\n<p>You will need a Linux server. These instructions assume a Linux server or VM\r\nrunning within the home, behind a firewall. Tailscale lets clients connect to\r\ncomputers wherever they are, so you do not need to worry about the\r\naccessibility of the machine. It just needs to be on the internet. If you sign\r\nup for a VM hosted by a cloud provider, make sure to\r\n<a href=\"https://tailscale.com/docs/reference/faq/firewall-ports\">block almost all access in the firewall</a>.</p>\n<p>The instructions in this guide assume you are using Ubuntu or Debian, though\r\nthe changes for other Linux distributions are small.</p>\n<h2><a href=\"https://tailscale.com/docs/solutions/set-up-minecraft#step-1-set-up-bedrock_server-on-linux\">Step 1: Set up <code>bedrock_server</code> on Linux</a></h2>\n<p>The <code>bedrock_server</code> supports both Windows and Linux. We'll cover Linux in\r\nthis guide.</p>\n<p>We recommend creating a user to run the Minecraft server, and installing some\r\npackages we'll need later:</p>\n<pre><code class=\"language-shell\">adduser --system --home /opt/minecraft minecraft\r\naddgroup --system minecraft\r\nadduser minecraft minecraft\r\nchsh --shell /bin/bash minecraft\r\napt install unzip curl tmux git wget\n</code></pre>\n<p>Download the current version of the Linux <code>bedrock_server</code> binary from\r\n<code>https://www.minecraft.net/en-us/download/server/bedrock</code>. It is best to\r\ndo this as the <code>minecraft</code> user just created:</p>\n<pre><code class=\"language-shell\">su -s -u minecraft\r\ncd ~\r\nwget \"download path copied from https://www.minecraft.net/en-us/download/server/bedrock\"\n</code></pre>\n<p>Minecraft <code>bedrock_server</code> is updated relatively frequently, and when the\r\nMinecraft game app is updated it requires the new version of the server.\r\nSo we'll prepare for future updates by storing the server files in git:</p>\n<pre><code class=\"language-shell\">git init .\r\nunzip bedrock_server*.zip\r\nrm bedrock_server*.zip\r\ngit add -A\r\ngit commit -m \"Initial bedrock_server\"\n</code></pre>\n<p>Each successive <code>bedrock_server</code> update can be stored in git. Pay special attention\r\nto <code>permissions.json</code> and <code>server.properties</code>, where any future <code>bedrock_server</code>\r\nwill overwrite any customizations you may have made.</p>\n<h3><a href=\"https://tailscale.com/docs/solutions/set-up-minecraft#systemd\">systemd</a></h3>\n<p><code>systemd</code> is a way to automatically start services when the system boots. We'll\r\ncreate a few files to have <code>bedrock_server</code> start automatically.</p>\n<hr>\n<p><code>/etc/systemd/system/minecraft.service</code></p>\n<pre><code class=\"language-markup\">[Unit]\r\nDescription=Minecraft Service\r\nWants=network.target\r\nAfter=network.target\r\n\r\n[Service]\r\nUser=minecraft\r\nGroup=minecraft\r\n\r\nType=forking\r\n\r\nProtectHome=true\r\nProtectSystem=full\r\nPrivateDevices=true\r\nNoNewPrivileges=true\r\nInaccessibleDirectories=/root /sys /srv /media -/lost+found\r\nReadWriteDirectories=/opt/minecraft\r\nWorkingDirectory=/opt/minecraft\r\nExecStart=/opt/minecraft/start.sh\r\nExecStop=/opt/minecraft/stop.sh\r\nTimeoutStopSec=20\r\nRestart=on-failure\r\n\r\n[Install]\r\nWantedBy=multi-user.target\n</code></pre>\n<hr>\n<p><code>/opt/minecraft/start.sh</code></p>\n<pre><code class=\"language-shell\">#!/bin/sh\r\n/usr/bin/tmux new-session -s minecraft -d\r\ntmux send -t minecraft \"LD_LIBRARY_PATH=. ./bedrock_server\" ENTER\r\ntmux send -t minecraft \"gamerule showcoordinates true\" ENTER\r\ntmux send -t minecraft \"gamerule keepInventory true\" ENTER\n</code></pre>\n<hr>\n<p><code>/opt/minecraft/stop.sh</code></p>\n<pre><code class=\"language-shell\">#!/bin/sh\r\n/usr/bin/tmux send -t minecraft save-all ENTER\r\n/usr/bin/tmux send -t minecraft stop ENTER\r\necho \"Killing minecraft session\"\r\n/usr/bin/tmux kill-session -t minecraft\n</code></pre>\n<hr>\n<p>Also make the shell scripts executable: <code>chmod +x /opt/minecraft/start.sh /opt/minecraft/stop.sh</code></p>\n<p>As root you should now <code>systemctl start minecraft</code> and voilà, you are running\r\na Minecraft bedrock edition server.</p>\n<p>As the <code>minecraft</code> user, you can connect to tmux to access the server console:</p>\n<pre><code class=\"language-shell\">sudo -s -u minecraft\r\ntmux attach\n</code></pre>\n<p>To detach from tmux and leave <code>bedrock_server</code> running, press Ctrl-B\r\nthen \"d\" for detach.</p>\n<h2><a href=\"https://tailscale.com/docs/solutions/set-up-minecraft#step-2-install-tailscale-on-the-server\">Step 2: Install Tailscale on the server</a></h2>\n<p>Tailscale is available for essentially any modern Linux distribution, though the\r\ninstallation instructions may vary slightly.</p>\n<p><a href=\"https://tailscale.com/download/linux\">Download Tailscale for Linux</a></p>\n<p>Once installed and active in the tailnet, the Minecraft <code>bedrock_server</code> can be\r\nreached from any of your other Tailscale clients.</p>\n<h2><a href=\"https://tailscale.com/docs/solutions/set-up-minecraft#step-3-play-minecraft\">Step 3: Play Minecraft</a></h2>\n<p>You'll need the Tailscale client installed, from the App Store for iOS devices\r\nand the Play Store for Android. You'll also need the Minecraft app.</p>\n<p>In the Minecraft app, select <strong>Play</strong>, and then select the <strong>Servers</strong> tab. There will be a\r\nnumber of promoted third-party servers in the list, but scrolling to the\r\nbottom there will be a button to <strong>Add Server</strong>.</p>\n<p><img src=\"https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fadd-server.d1785c55.png&#x26;w=3840&#x26;q=75\" alt=\"Minecraft Server list scrolled to the bottom with a button to Add Server\"></p>\n<p>Add the details of the server just created, including the Tailscale IP address\r\n(the 100.x.y.z IP address, which can be looked up in the Tailscale app or in the <a href=\"https://login.tailscale.com/admin/machines\">Machines</a> page of the admin console).</p>\n<p><img src=\"https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fserver-details.cbbed4d1.png&#x26;w=3840&#x26;q=75\" alt=\"Typing in the server name with a server address of 100.99.98.97\"></p>\n<p>You'll be asked to login to XBox Live before being allowed to connect to the\r\nserver. <code>live.com</code> accounts are free, and you don't have to have an XBox to\r\ncreate one. Tailscale never receives the <code>live.com</code> account, Minecraft only\r\nrequires it before connecting.</p>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}