RSSAmplifier

VidhuKant's Blog · Jul 19, 2024

Minecraft: Java Edition online multiplayer (with OpenVPN)

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Minecraft: Java Edition only supports multiplayer through LAN, a server or through the newly introduced realms. That's pretty bad! I just want to play with friends without renting a server or something. Port forwarding isn't an option for me because I'm behind like multiple layers of NAT. So what's the solution, you ask? Your local hackerman has everything in check. Here's what to do: Have a VPS…

Minecraft: Java Edition only supports multiplayer through LAN, a server or through the newly introduced realms. That's pretty bad! I just want to play with friends without renting a server or something. Port forwarding isn't an option for me because I'm behind like multiple layers of NAT.

So what's the solution, you ask?

Your local hackerman has everything in check. Here's what to do:

  • Have a VPS configured with firewall and shit.
  • Install OpenVPN with this wonderful script.
    • Install the openvpn package on Debian, probably Ubuntu and maybe any other distro
    • Clone above repo and cd into it
    • Run sudo ./openvpn-install.sh
    • Select just the default options
  • After the setup is complete the script would help you add a new user. Enter a descriptive client name and password (optional) and then move the .ovpn file to your local machine.
  • To add/remove users, just run the script again. You need as many users as many friends you have; Linux users may skip this step.
  • Transfer the .ovpn client files to each of your friends' machines respectively.
    Maybe encrypt them or something if they have to travel through the interwebs!
  • Now install the OpenVPN client for your operating system. (on Arch it's, you guessed it, openvpn)
  • Just follow the GUI and load the .ovpn file. On Arch, you guessed it right again, I just run openvpn vidhukant.ovpn

Now one of you must host the minecraft game, and open the world to LAN. Others just need to connect to the VPN, enter your IP address (on the VPN) and the port, and have some quality mining and, of course, crafting time.

When I was setting up everything (which btw took like 20 minutes) I was wondering if it'd be playable. And my answer to that is: Yes! It felt like we were playing on LAN, not through the internet. Your mileage may vary though.

I guess next I'll try to set up my old potato as a minecraft server that is only accessible through my private VPN (I know that the "private" is redundant fuck off)

This is post 07 of #100DaysToOffload

Reply to this post via email

Read on /blog/minecraft-java-multiplayer-over-openvpn/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.