Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
Blog

How to Set Up a Minecraft Java Server with Hamachi

Use Hamachi with Minecraft Java Edition to avoid ordinary router port forwarding. This guide covers quick Open-to-LAN worlds, persistent dedicated servers, connection details, and troubleshooting.
Length7 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a quick private game, use Hamachi with Minecraft Java Edition’s Open to LAN feature. For a persistent world, run the official Java server software and have friends connect through the host’s Hamachi IPv4 address. Hamachi provides the virtual network; it does not host or run Minecraft for you.

This guide is for Minecraft: Java Edition. Bedrock Edition uses different server software and connection methods. Every player must use the same Minecraft release as the host or server, including the same mod loader and mods when playing modded Minecraft.

As an Amazon Associate I earn from qualifying purchases.

What you need

  • Minecraft: Java Edition and a Microsoft account signed in for multiplayer.
  • Hamachi installed and running on every computer.
  • The same Minecraft version for everyone.
  • A world backup before making changes.
  • Java installed if you are running a dedicated server.
  • Permission to install software and allow Java or Hamachi through your firewall.

Hamachi is a hosted VPN that creates a LAN-like virtual network between computers in different locations. It usually avoids ordinary router port forwarding, but it does not remove the need for firewall permissions, a running Minecraft world or server, matching versions, and a host computer that stays online.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the Hamachi network private. Share its ID and password only with people you trust. Hamachi’s free tier is advertised for up to five computers in a network; that is not the same as a guaranteed Minecraft player limit.

#1 Best Overall
Minecraft | 1720 Minecoins Pack | Digital Code
  • Minecoins let you buy Minecraft content you can enjoy on your Android, iOS, Windows 10, Xbox One and Nintendo Switch devices*
  • Visit the in-game Minecraft marketplace, where you'll discover a constantly updating library of exciting new Minecraft content - from a community whose imagination knows no limits.
  • Once you've redeemed your Minecoins, they'll be linked with your Xbox Live account, so you can access your coins and purchases through all of your supported devices that run Minecraft.
  • Minecoins are a perfect gift for Minecraft players!

The easiest method: Hamachi plus Open to LAN

Use this option for a temporary session with a few friends. The host must open the world each time and remain in it while friends play.

Host: create the Hamachi network

  1. Download Hamachi from the official Hamachi site.
  2. Install it, launch it, and sign in or create an account if prompted.
  3. Choose Network → Create a new network.
  4. Set a network ID and password, then give those credentials only to your friends.

Friends: join the Hamachi network

  1. Install and open Hamachi.
  2. Choose Network → Join an existing network.
  3. Enter the host’s network ID and password.
  4. Confirm that the host appears online and reachable.

Host: open the Minecraft world

  1. Launch the same Minecraft Java Edition release your friends are using.
  2. Choose Singleplayer and open the world.
  3. Press Esc, then select Open to LAN.
  4. Choose the game mode and whether commands are allowed. Select a port, or let Minecraft choose one.
  5. Click Start LAN World.
  6. Read the message Minecraft posts in chat. It contains the temporary LAN port.
  7. In Hamachi, copy or record the host’s Hamachi IPv4 address.

Give friends the address in this format:

Hamachi-IPv4-address:LAN-port

For example:

25.18.42.7:54321

Friends: connect directly

  1. Launch the matching Minecraft Java Edition version.
  2. Choose Multiplayer → Direct Connection.
  3. Enter the host’s Hamachi IPv4 address, a colon, and the port shown in Minecraft chat.
  4. Select Join Server.

The world may appear automatically in the multiplayer list, but discovery is unreliable across virtual networks. Direct Connection using address:port is the dependable fallback. See Minecraft’s official multiplayer guidance for the standard LAN and server connection flow.

Limits of Open to LAN

  • The host must open the world every time.
  • The host must remain in the world.
  • The LAN port can change from session to session.
  • It is not an always-online server.
  • It offers fewer server-wide settings than a dedicated server.

The persistent method: a dedicated Java server through Hamachi

Choose this method for a persistent world folder, a whitelist, operators, scheduled backups, server settings, or server-side customization. The host still needs to keep the computer and server process running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Create a server folder

On Windows, create a folder such as:

C:MinecraftServer

Avoid storing the active world in a folder synchronized by cloud-storage software, where simultaneous file changes can cause conflicts.

2. Download the official server software

Download the Java Edition server JAR from the official Minecraft server download page. Place it in the server folder. If you rename it to server.jar, use that exact filename in your launch command.

The required Java version depends on the Minecraft release. Check the server release requirements rather than assuming one Java version works for every version.

3. Check Java

Open PowerShell or Command Prompt in the server folder and run:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Minecraft | 8,800 Minecoins Pack | Digital Code
  • 8,800 MINECOINS — Get 8,800 Minecoins to spend on creator-made content in the Minecraft Marketplace.
  • MINECRAFT MARKETPLACE — Browse a constantly updating library of content from Minecraft creators, with new content available every week.
  • CREATOR-MADE CONTENT — Use Minecoins to get Marketplace content such as skin packs, mash-up packs, mini-games, and adventure maps.
  • ACCESS ACROSS DEVICES — Once redeemed and linked to your Microsoft account, your Minecoins and purchases are available on supported devices that run Minecraft, including Android, iOS, Windows, and Xbox.
  • A GIFT FOR PLAYERS — Give Minecraft players Minecoins to spend on content in the in-game Marketplace.
java -version

If Windows says that java is not recognized, install a compatible Java runtime or JDK for the selected Minecraft release, reopen the terminal, and run the command again.

4. Launch the server once

For a file named server.jar, run:

java -Xms2G -Xmx4G -jar server.jar nogui
  • -Xms2G sets the initial memory allocation.
  • -Xmx4G sets the maximum memory allocation.
  • -jar server.jar launches the server file.
  • nogui runs the server without its graphical interface.

The memory values are examples, not universal requirements. Do not allocate all system RAM; Windows, Hamachi, and other applications also need memory.

The first launch normally creates configuration files and stops because the EULA has not been accepted.

5. Accept the EULA

Open the generated eula.txt, read the Minecraft EULA and Usage Guidelines, and change:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
eula=false

to:

eula=true

Save the file and run the same startup command again.

6. Configure server.properties

These are sensible starting settings for a small private server:

motd=Private Hamachi Minecraft Server
gamemode=survival
difficulty=normal
max-players=5
online-mode=true
white-list=true
server-ip=
server-port=25565

Leave server-ip= blank in a typical setup. Do not automatically enter the Hamachi address: binding to the wrong interface or to an outdated address can stop the server from accepting connections. Port 25565 is the normal Java server port, but friends must use whatever port is configured.

Rank #3
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

Keep online-mode=true for normal authenticated accounts, and use the whitelist for a private group.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

7. Start and administer the server

Start it with:

java -Xms2G -Xmx4G -jar server.jar nogui

Enter these commands in the server console without a leading slash:

op PlayerName
whitelist on
whitelist add PlayerName
whitelist remove PlayerName
list
save-all
stop

Use stop instead of closing the terminal so the server can save cleanly. In in-game chat, players generally use the slash form, such as /whitelist add PlayerName.

8. Connect through Hamachi

  1. Make sure Hamachi is running and the server has finished loading.
  2. Give friends the host’s Hamachi IPv4 address.
  3. Have them open Multiplayer → Direct Connection.
  4. They should enter the address and server port:
25.18.42.7:25565

The host can test the dedicated server locally with localhost. Friends should use the numeric Hamachi IPv4 address—not the Hamachi network ID, the host’s ordinary home-network address, or the public IP address.

Which address and port should players use?

Situation Address
Server on the same computer localhost
Open to LAN through Hamachi HamachiIPv4:port-shown-in-chat
Dedicated server through Hamachi HamachiIPv4:server-port, commonly :25565
Normal same-home-network connection Host’s local IPv4 address and server port
Public port-forwarded server Public address and server port
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix common connection problems

The world does not appear

Use Multiplayer → Direct Connection and enter HamachiIPv4:port. Automatic LAN discovery often does not cross virtual adapters reliably.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Connection timed out”

  1. Confirm Hamachi is running on every computer.
  2. Confirm the friend joined the correct Hamachi network and sees the host as reachable.
  3. Confirm the world or dedicated server is currently running.
  4. Check the correct address and port. Open-to-LAN uses the port displayed in chat; a dedicated server uses its configured port.
  5. Check that Minecraft versions match.
  6. Allow Hamachi and Java through Windows Firewall or other security software.
  7. Confirm server-ip= is blank.

Minecraft’s Java multiplayer troubleshooting guide also recommends checking firewall, antivirus, VPN, connection stability, bandwidth, and router or NAT conditions.

“Connection refused”

The server is usually stopped, still starting, using the wrong port, or being blocked by a firewall. The first server launch may also have stopped at the EULA step.

Rank #4
Minecraft | Standard Edition | XBOX Digital Code
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
  • SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
  • COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.

“Unknown host”

Check the spelling. Enter the numeric Hamachi IPv4 address, not the network ID or an unresolvable computer name.

Hamachi shows a blue or relayed connection

A relayed connection may work but can introduce latency or connection failures. Allow Hamachi through the firewall, restart Hamachi, and check that its virtual adapter is enabled. A temporary firewall exception can help diagnose the problem, but restore normal protection afterward.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Incompatible version” or “Outdated server”

Install the exact server release on the client. Snapshot versus full release, mod loader versions, modpacks, and required mod versions must also match.

Mods work for the host but not friends

Compare the Minecraft version, loader, mod list, mod versions, configuration files, Java version, and server pack. Do not place a client-only mod on the server unless its documentation says it is supported there.

Hamachi security and privacy

  • Invite only trusted people to the Hamachi network.
  • Do not publish its ID and password.
  • Keep online-mode=true unless you understand the consequences of changing it.
  • Use the Minecraft whitelist.
  • Do not permanently disable your firewall to make a connection work.
  • Back up the world regularly.
  • Stop the server cleanly with stop.

Hamachi is a networking layer, not a guarantee that the Minecraft server, accounts, or participants are safe. Account security and who receives access remain your responsibility.

Is Hamachi the best option?

Option Best for Trade-off
Hamachi plus Open to LAN Quick private sessions Everyone installs Hamachi; the host must stay in the world
Dedicated server plus Hamachi Control, backups, whitelist, and mods More setup and the host computer must remain online
Minecraft Realms for Java Official always-online play with minimal setup Monthly fee and less server-level control
Managed hosting Always-online play without using a personal PC Monthly cost and provider-specific limits
Port forwarding Normal server connections without VPN software Router setup and greater public exposure

Hamachi is a practical workaround when the host cannot configure a router. It is not automatically the most convenient choice: every player needs the client, and the host still supplies the actual Minecraft server. For a small, temporary Java session, Open to LAN plus Hamachi is the fastest route. For a persistent world, use a dedicated server—or choose Realms or managed hosting if you want the world available while the owner is offline.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
Minecraft | 1720 Minecoins Pack | Digital Code
Minecraft | 1720 Minecoins Pack | Digital Code
Minecoins are a perfect gift for Minecraft players!
$9.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.