NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Hosting a Minecraft Server Without Extra Hardware

I want to play Minecraft with my buddies, and I already have a server connected to the internet. My server is not powerful enough to run a Minecraft server instance. However, I do have a spare, powerful laptop that can take the load. Port forwarding is not feasible. Both the server and laptop are on my Tailscale network. Can I make use of this to create an Minecraft server that has an IP public? Yes, and I was pleasantly surprised by how easy it was. In addition, the server is very playable and the latency was less than trying out random "free hosting" services.



Tailscale Halfway to Tailscale



I already use Tailscale on all my devices, so of course when I create a Minecraft server instance on one device I can connect immediately to it from all my other devices. Minecraft-servers.one However , my friends don't have Tailscale (yet! Node sharing isn't possible for my friends right now. However, I still have the advantage of Tailscale in that my laptop will always have a static IP in relation to the server, and the server will always have a static IP in relation to the public internet. The connection will be deterministic and I won't need to resort to any dynamic shenanigans.



Let's test the theory.



Let's check if Minecraft can recognize it if I enter the Tailscale IP...



It's been an enormous success! We need to make it accessible via the internet.



iptables to the rescue!



Basically, iptables allows you to set up the rules for the Linux kernel firewall. It's a simple concept. The user creates tables, and packets are routed through the tables. Java edition Minecraft servers utilize TCP port 25565.



NixOS configuration



It was very straightforward to enable IP forwarding and add 25565 to the list of open TCP ports for my server:



The rule is designed



We can now include the following commands into our firewall configuration. Let dest_ip represent the Tailscale IP address of the server. The first command adds a new rule to the PREROUTING chain which is where packets arrive before being processed. We basically forward the packet to Tailscale's IP address. The second command basically allows the IP address of the packet remain the same, which means the server just acts as an intermediary.



We have the following setup:



Now we rebuild the server configuration, before testing again in Minecraft, this time using the public server IP. It all is working exactly as we was expected!



Final touches Final touches: a DNS record



An A record was added to my configuration to give people an appealing URL instead of an IP address.



Performance



In terms of performance it's pretty good! The proxy server is on the East coast and even though the Minecraft server is on the West coast, having played for a few hours today my group of friends and I had no problems whatsoever. I was able pin people through the connection, and latency was not too bad (77 milliseconds for a player from New York).



References



This post was inspired by Xe's article about Tailscale, NixOS, and Minecraft. However, my requirements were different. I did not want to require my friends to install Tailscale to play on my server, and wanted to make use of the hardware I had access to, essentially making my server as a basic router.


Website: https://minecraft-servers.one/
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.