Guide How much Minecraft really costs in South Africa — every edition in rand
MinecraftSA

How to Host Your Own Minecraft Server (Java & Bedrock, Step by Step)

Java, Paper and Bedrock Dedicated Server set up from scratch, port forwarding explained without the jargon, and the tunnelling trick for South African ISPs that use CGNAT.

The short answer

Java Edition
Install Java 25, download Paper (or the vanilla server jar), accept the EULA, run it, forward TCP 25565 or use a tunnel.
Bedrock Edition
Download Bedrock Dedicated Server from minecraft.net, run it, forward UDP 19132 or use a tunnel.
Both at once
Run Paper and add the Geyser plugin. Bedrock players connect on 19132, Java on 25565, same world.
The South African catch
Many fibre ISPs use CGNAT, which makes port forwarding impossible. playit.gg or a public-IP add-on from your ISP fixes it.
Time needed
About 20 minutes for a working local server, plus however long your router takes to co-operate.

Before you start

This guide gets a server running on a machine you control — your own PC, a spare laptop, or a VPS you have rented. If you have not decided between those and a paid host, the hosting comparison comes first. You need:

  • A machine with at least 4 GB of RAM free beyond whatever else it is doing. If you also want to play on the same PC, 16 GB total is comfortable.
  • An ethernet connection to your router if at all possible. A server on Wi-Fi gives every player the jitter of your Wi-Fi.
  • About 500 MB of disk to begin with; worlds grow by a few gigabytes over a year of play.
  • An ordinary Minecraft account for yourself. The server software itself is free.

Java Edition: step by step

  1. Install Java 25. Minecraft 26.1 and later need Java 25 (older versions need older Java; see the FAQ below). Download a build from Adoptium (Eclipse Temurin), Amazon Corretto or Microsoft’s OpenJDK — all are free. On Windows, run the installer and tick the option to set the JAVA_HOME variable. Confirm by opening a terminal and typing java -version; it should print 25.
  2. Download the server. For most people that means Paper from papermc.io: pick the version matching what your players run and download the latest build. It is a faster, plugin-capable replacement for the official jar and plays like vanilla for almost everything, though Paper’s own documentation lists some differences — for example, some duplication exploits are disabled by default. If you want unmodified vanilla, the official server.jar is on minecraft.net under Download → Server.
  3. Make a folder. Something like C:\mcserver or ~/mcserver. Put the jar in it, renamed to server.jar for convenience. Everything the server creates will live here, so keep it out of your Downloads folder.
  4. Create a start script. On Windows, make start.bat in the folder containing:
    @echo off
    java -Xms2G -Xmx4G -jar server.jar nogui
    pause
    On macOS/Linux, start.sh with the same java line and no pause, then chmod +x start.sh. -Xmx4G is the maximum RAM; set it to what you can spare, and never to all of the machine’s memory.
  5. Run it once and accept the EULA. The first run stops almost immediately and writes eula.txt. Open it, change eula=false to eula=true, save. This is you agreeing to Mojang’s server terms.
  6. Run it again. The server generates a world, which takes a minute or two, and finishes with Done (…s)! For help, type "help". It is now running. Type stop in that window to shut it down cleanly — never just close the window, which can corrupt the world.
  7. Connect from the same PC. Open Minecraft, Multiplayer, Add Server, address localhost. If that joins, the server works and the rest is networking.
  8. Connect from another device in the house. Find the server PC’s local IP (ipconfig on Windows, look for IPv4 Address — usually 192.168.x.x) and use that as the address on the other device. If this works and the previous step worked, the server is fully functional on your LAN.
Advertisement

The settings worth changing

Stop the server and open server.properties in a text editor. Most of it can stay at the default; these are the lines that matter.

SettingDefaultWhat to do
online-modetrueLeave true. It makes the server verify accounts with Mojang, which stops anyone joining under someone else’s name. Setting it false lets cracked clients in and disables skins.
view-distance10The single biggest performance lever. 8 is plenty and halves the load compared with 12. Players’ own render distance is capped at this.
simulation-distance10How far from players the world actually ticks (crops, mobs). 6–8 is fine for most servers.
max-players20Set to what your RAM supports; it is a cap, not an allocation.
difficultyeasynormal is what most survival servers want; hard for tougher mobs and starvation that can kill (on Easy and Normal it stops short).
white-listtrue (since 26.3)New servers only admit whitelisted players and ops. Keep it on for a private server and add names with whitelist add Name; set it to false only for a public server.
motdA Minecraft ServerThe text shown in the server list. Keep it short.
spawn-protection16Radius around spawn that non-ops cannot build in. Set to 0 on a small friends server or it gets in the way.
level-seedblankSet before the first run if you want a specific seed. Changing it afterwards does nothing to the existing world.

Some settings that used to be here are now game rules, changed in-game with /gamerule: command blocks (command_blocks_work, on by default), PvP (pvp), monster spawning (spawn_monsters) and Nether access (allow_entering_nether_using_portals). Paper adds its own files in the config folder; the defaults are sensible and the one thing worth knowing about is that paper-world-defaults.yml is where per-world performance tuning lives if you ever need it.

Bedrock Dedicated Server

Bedrock players on phones, consoles and Windows cannot join a Java server directly. If everyone in your group is on Bedrock, run Mojang’s Bedrock Dedicated Server instead. It is a free download from minecraft.net (Download → Server → Bedrock), available for Windows and Ubuntu Linux, and it is lighter than the Java server.

  1. Unzip the download into its own folder.
  2. Windows: run bedrock_server.exe. Linux: LD_LIBRARY_PATH=. ./bedrock_server. There is no Java involved. Since Bedrock 26.50 the dedicated server uses Mojang’s newer NetherNet connection by default, so read the port notes in its server.properties before forwarding ports.
  3. Edit server.properties: server-name, gamemode, difficulty, max-players, and leave online-mode=true.
  4. To limit who can join, set allow-list=true and add players to allowlist.json by gamertag.
  5. Players add the server under Servers → Add Server with your address and port 19132. Console players cannot type a custom address in the normal UI; the workaround is a DNS trick or the BedrockTogether app, covered in the crossplay guide.

Bedrock Dedicated Server has no plugin system in the Java sense; add-ons and behaviour packs are how it is customised. If you want plugins, the crossplay setup below is the better path even for an all-Bedrock group.

Crossplay with Geyser

To let Java and Bedrock players share one world, run a Paper server and install two plugins: Geyser, which translates the Bedrock protocol into Java on the fly, and Floodgate, which lets Bedrock players join with their Xbox account instead of needing a separate Java account. Drop both jars into the plugins folder and restart. Geyser uses port 19132 over both TCP and UDP, so forward 19132 for both protocols in addition to TCP 25565 (Geyser’s docs explain the extra UDP port its optional NetherNet-and-RakNet mode needs). Bedrock players then connect to the same address on port 19132 and appear in the world alongside Java players. The crossplay guide explains what does and does not translate cleanly.

Advertisement

Letting people in: port forwarding and CGNAT

Everything above works on your home network. For people outside the house, incoming connections have to reach the server PC through your router, and there are two very different situations depending on your ISP.

Check first: do you have a public IP?

Log into your router (the address is on its label, commonly 192.168.0.1 or 192.168.1.1) and find the WAN or Internet IP address. Compare it with what a site like whatismyip.com shows from a browser on the same connection.

  • They match, and the router address does not start with 10. or 100. — you have a public IP. Port forwarding will work.
  • They differ, or the router shows an address in 100.64.0.0–100.127.255.255 or 10.x.x.x — you are behind CGNAT. Port forwarding cannot work, no matter how carefully you set it up, because the address you are forwarding on is not reachable from the internet. Skip to the tunnel section.

Port forwarding (public IP)

  1. Give the server PC a fixed local IP. Either reserve it in the router’s DHCP settings by MAC address (best) or set a static IP on the PC.
  2. In the router, find Port Forwarding (sometimes under NAT, Virtual Server or Applications). Add a rule: external port 25565, internal port 25565, protocol TCP, internal IP = the server PC. For Geyser add a second rule for 19132, TCP and UDP.
  3. Allow the port through the PC’s own firewall. Windows usually prompts the first time the server runs; if you clicked Cancel, add an inbound rule for Java manually.
  4. Give players your public IP. Because most home IPs change occasionally, set up a free dynamic DNS name (No-IP, DuckDNS, or your router’s built-in DDNS) so the address stays constant.

Tunnelling (CGNAT, or when you would rather not touch the router)

A tunnelling service runs a small program on the server PC that keeps an outbound connection open to the service’s own servers; players connect to an address the service gives you, and traffic is relayed through the tunnel to your PC. Because the connection is outbound from your side, CGNAT and firewalls are irrelevant. playit.gg is built specifically for game servers and has a free tier that is enough for a friends server; ngrok handles Java (TCP) but not Bedrock, which needs UDP, and Cloudflare Tunnel needs every player to install Cloudflare’s own client, so neither suits most friend groups. Install the agent, create a Minecraft Java (or Bedrock) tunnel, and it gives you a hostname to share. Check which relay you are routed through before you rely on it: every player’s traffic goes via that relay, and South African users of free tunnels have reported being routed through Frankfurt at 170–200 ms. If that happens, port forwarding with a public IP (below) or a paid tunnel with a closer relay is the fix.

The other CGNAT fix is to ask your ISP for a public or static IP. Some South African ISPs sell a static IP as a monthly add-on; ask yours whether it is available on your fibre network or LTE plan, and whether they can take you off CGNAT. Then port forwarding works as above.

Do not put the server in the DMZ

Some guides suggest the router’s DMZ option as a shortcut. It exposes every port on that PC to the internet. Forward the one or two ports you need instead.

Running it on Linux or a VPS

If you rented a VPS — say in Azure South Africa North or AWS Cape Town, as discussed in the hosting guide — the steps are the same with two additions: the server needs to survive you logging out, and it should restart itself after a crash. On Ubuntu:

# Java 25 from Amazon Corretto, as Paper's documentation recommends
sudo apt-get update && sudo apt-get install -y ca-certificates apt-transport-https gnupg wget
wget -O - https://apt.corretto.aws/corretto.key | sudo gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | sudo tee /etc/apt/sources.list.d/corretto.list
sudo apt-get update && sudo apt-get install -y java-25-amazon-corretto-jdk libxi6 libxtst6 libxrender1
sudo useradd -r -m -d /opt/minecraft minecraft
sudo -u minecraft mkdir -p /opt/minecraft/server
# put server.jar in /opt/minecraft/server, run once, accept the EULA, then:
sudo tee /etc/systemd/system/minecraft.service >/dev/null <<'EOF'
[Unit]
Description=Minecraft server
After=network.target

[Service]
User=minecraft
WorkingDirectory=/opt/minecraft/server
ExecStart=/usr/bin/java -Xms2G -Xmx3G -jar server.jar nogui
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo ufw allow 25565/tcp

On a 4 GB VPS, leave about a gigabyte for the operating system — hence -Xmx3G. Open the same port in the cloud provider’s own firewall or security group as well; the OS firewall alone is not enough on Azure or AWS. To type commands into a systemd-managed server you need a console: the simplest approach is to run it inside tmux instead of systemd, or install a lightweight panel. For backups, a nightly tar of the world folder copied off the machine is the minimum.

Admin basics: ops, whitelist, backups

  • Make yourself an operator by typing op YourName in the server console. Ops can run every command. Give it to as few people as possible.
  • Whitelist for a private server: whitelist on, then whitelist add Name for each friend. On a public server, keep it off and rely on moderation plugins.
  • Backups. The world is the folder named in level-name (default world; since 26.1, Paper keeps the Nether and End inside it, as vanilla does). Worlds opened in 26.x cannot be taken back to older versions, so back up before you update. Copy it while the server is stopped, or use save-off, copy, save-on while it runs. Do it before every plugin change and every game update.
  • Updating. Back up, stop, replace server.jar with the new version, start. Players must be on a matching version; Paper accepts the same client versions as vanilla.
  • Essential plugins for a friends server on Paper: a land-claiming plugin, a homes/teleport plugin, and a backup plugin. Resist adding fifty. Each one costs performance and is a potential update-day breakage.
  • Watch TPS. Type tps in the Paper console. 20 is perfect; sustained values under 18 mean the machine is struggling, and lowering view distance is the first fix.

Frequently asked questions

What version of Java do I need for a Minecraft server?

Minecraft 26.1 and newer (including 26.3) require Java 25. 1.20.5 to 1.21.11 need Java 21, 1.18 to 1.20.4 need Java 17, 1.17 needs Java 16, and 1.16 and earlier run on Java 8. Install the version that matches the server jar you are running.

Which port does a Minecraft server use?

Java Edition uses TCP port 25565 by default. Bedrock Dedicated Server uses UDP port 19132. If you run Geyser for crossplay, you open both.

Why can nobody connect to my server even though I forwarded the port?

Almost always CGNAT: your ISP has not given your router a public IP address, so the forwarded port is unreachable from the internet. Check the WAN IP on your router — if it starts with 100.64–100.127 or 10., you are behind CGNAT. Use a tunnelling service such as playit.gg or ask your ISP for a public IP.

Should I use vanilla or Paper?

Paper for almost everyone. It is a drop-in replacement for the vanilla server that runs faster, fixes long-standing bugs and supports plugins. Use vanilla only if you specifically want unmodified game behaviour, and Fabric or Forge if you want mods.

How do I make friends admins?

Type op PlayerName in the server console, or /op PlayerName in game if you are already an operator. Use it sparingly; operators can do anything, including deleting the world.

How do I keep the server running after I close the terminal?

On Windows, leave the window open or use a batch file with a restart loop. On Linux, run it as a systemd service or inside tmux/screen so it survives disconnecting from SSH and restarts on a crash.

Players getting errors?

Send them to the connection error guide — it covers every message they are likely to see, from the server owner’s side as well as theirs.

Advertisement
All guides →
Advertisement