# https://tunnels.io/use-cases/minecraft-server

[Home](https://tunnels.io/) / [Use cases](https://tunnels.io/use-cases) / Minecraft server

Use case

# Run a Minecraft Java server without touching your router.

Your world runs on your machine. One command gives port 25565 a public address, and your friends join from anywhere with no forwarded port and no static IP. Java Edition only: Bedrock speaks UDP and we do not carry UDP. Raw TCP starts on Professional at $4 a month.

[Get started →](https://tunnels.io/get-started) [See pricing](https://tunnels.io/pricing)

## Java Edition works. Bedrock Edition does not.

Two editions, two transports, and only one of them can ride this. Java Edition speaks TCP on port 25565, so a raw TCP tunnel carries it as the byte stream it already is. Bedrock Edition speaks UDP on port 19132. We carry HTTPS and raw TCP only, and reject everything else by name.

That is not a gap a higher plan fills. No plan carries UDP. If your friends play on phones, consoles or the Windows edition, rent a host instead, because signing up here would waste your money.

| | Java Edition | Bedrock Edition |
| --- | --- | --- |
| Transport protocol | TCP | UDP |
| Default port | 25565 | 19132 |
| Works through tunnels.io | Yes, on Professional and above | No, on any plan |
| Why | A TCP tunnel forwards it untouched, port to port. | There is no UDP tunnel to put it in. |

## What do you and your friends actually run?

One command, on the machine holding the world. The server is already listening on 25565 and the client publishes that port. It dials outward and holds the connection open, so nothing inbound has to be permitted on your network and your home address is never handed out.

```
# on the machine running the world
$ tunnels tcp 25565
Active Tunnels:
▸ tcp://tunnels.host:41273 → localhost:25565  [tcp]
# what your friends paste into Multiplayer, Add Server
#   tunnels.host:41273
```

What comes back is a hostname and a port, not a URL, and both halves matter. The Java client takes an address in the form `host:port`. Drop the port and it tries 25565 at our edge, finds nothing, and reports that it cannot connect. Send the whole line, colon included.

Nothing about the world changes. You still edit `server.properties`, you still keep `online-mode` on, and your plugins are untouched. The tunnel is wire, not middleware.

## Which plan you need

Professional, at $4 a month or $40 a year. That is the first plan with raw TCP, and a Minecraft server needs raw TCP. The free Basic plan and the Student plan carry HTTPS only, so `tunnels tcp 25565` is refused when the tunnel registers. Better to read that here than to find it at checkout.

Professional gives five concurrent tunnels, but only **one of them may be raw TCP**, so it is the Minecraft server or an SSH tunnel, not both. Gold at $10 a month drops that split. Professional also carries 128 GB of transfer a month and three reserved subdomains for the HTTPS things you run beside the game. Gold at $10 a month raises that to ten tunnels and 256 GB and adds your own domain. Premium at $20 a month is unlimited tunnels and 512 GB. [Pricing](https://tunnels.io/pricing) is the authoritative copy.

## Why does the address matter more for a game server?

Because a game address gets saved and then forgotten. Friends add it to their server list once, then click a row rather than read a hostname. An address that changes under them does not produce a helpful error; it produces six people asking what happened.

A TCP tunnel is identified by its port on `tunnels.host`. The port is assigned rather than chosen, and on reconnect the server tries to hand back the one you held, falling back to a new port if something else has claimed it. Treat that as a convenience, not a reservation, and read the line the client prints after a restart.

The free plan is doubly wrong here: it cannot open a TCP tunnel at all, and the random 16-character name it issues for HTTPS is released the moment the client disconnects. Reserved subdomains start on Professional and shape HTTPS hostnames rather than TCP ports, so what they earn on a Minecraft box is the web side of it, a live map or an admin panel on a name that stays put. Our note on [holding one hostname across restarts](https://tunnels.io/learn/what-is-a-reserved-subdomain) covers the rest.

## How do you keep the tunnel running alongside the server?

Supervise it next to the world, so the two come up and go down together. The client reconnects on its own with exponential backoff and jitter, and honours a server-directed reconnect delay so a restart on our side does not stampede. What it cannot survive is its own process disappearing.

```
# /etc/systemd/system/minecraft-tunnel.service
[Unit]
Description=tunnels.io TCP tunnel for the Minecraft server
After=network-online.target minecraft.service
Wants=network-online.target
BindsTo=minecraft.service
[Service]
User=minecraft
ExecStart=/usr/local/bin/tunnels --log stdout tcp 25565
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
```

The ordering is the point. `BindsTo` ties the tunnel to the server, so a published port never sits there with nothing behind it. The authtoken lives in the config of whoever ran `tunnels config add-authtoken`, so the unit must run as that user or it will fail to authenticate. For a map alongside the game, name both tunnels in the config and use `tunnels start-all`.

A closed laptop lid is a dead tunnel and a dead world, and the client may not get the same port back afterwards. Anything your friends rely on belongs on a machine that stays awake.

## What does a tunnel do to latency?

It adds a hop, and a hop costs time. With a forwarded port, a player's packets reach your router and stop. Through a tunnel they reach our edge first, then travel down the connection your machine opened, then make the same journey back. No engineering makes that shorter than a straight line.

For what most people are doing, it is fine. Survival with friends, building, farming: the game is forgiving and nobody notices. For anything competitive it is the wrong tool. PvP and minigames will feel worse than a direct connection and worse than a rented box near your players, and we are not going to argue otherwise to make a sale.

The other half of the picture is not ours. A home connection's upload speed is the ceiling for everyone connected, and a tunnel does not lift it.

## How does this compare with port forwarding, a VPS or Realms?

| Approach | Needs router access | Monthly cost shape | Who administers the world |
| --- | --- | --- | --- |
| Router port forwarding | Yes, plus a static IP or dynamic DNS | Nothing beyond your own power and hardware | You, on your own machine |
| A rented VPS or game host | No | A recurring bill that grows with memory and players | You, on someone else's machine, and you patch it |
| Minecraft Realms | No | A subscription from Mojang | Mojang hosts it; you get the settings they expose |
| A TCP tunnel on tunnels.io | No | $4 a month on Professional | You, on your own machine |

Realms is the honest answer if you want nothing to administer and can live with its limits on mods and world size. A rented host is the honest answer if latency matters most. A tunnel wins when the world already lives on hardware you own and the only missing piece is an address.

Cloudflare Tunnel deserves a straight word here. It can carry arbitrary TCP, but the person connecting has to run Cloudflare's own client to open the local end, which is fine for you and a colleague and not something you can ask six friends to install. Our [side by side with Cloudflare Tunnel](https://tunnels.io/compare/cloudflare-tunnel) covers the rest, and [the four ways to put a local port online](https://tunnels.io/learn/how-to-expose-localhost) widens the field.

## What this does not do

Read this before you take money off a friend for a slot. If one line here is a dealbreaker, a game host is the better answer.

### No UDP, so no Bedrock

Bedrock cannot be published here on any plan. Nor can a voice-chat mod that carries audio over UDP. There is no SMTP tunnel type, though SMTP is TCP and rides a raw TCP tunnel like any other TCP service. Neither either.

### Bandwidth is metered

Every plan has a monthly transfer allowance. The 4 GB on the free plan is not a server budget; 128 GB on Professional is the realistic floor.

### We do not run the world

We are not a game host. The jar, the world files, the mods and the backups are yours. If that disk dies, we have nothing.

### The tunnel authenticates nobody

Whatever reaches the assigned port is talking to your server. The basic-auth flag covers HTTPS only, so your whitelist and online-mode setting are the door.

### The port is assigned

You get a port on tunnels.host, and the command line gives you whatever the server assigns. A specific public port can be asked for only with the `remote_port` key on a named tunnel in the config file; there is no flag for it. Custom domains and reserved subdomains shape HTTPS hostnames only.

### Tunnel counts are per plan

Each published port is one tunnel. Professional allows five at once, enough for the game, a map and a panel. Gold allows ten.

## Related reading

[Four ways to put a local port online Tunnels, SSH forwarding, router rules and deploying it, with the trade-offs of each.](https://tunnels.io/learn/how-to-expose-localhost) [Holding one hostname across restarts What a static name buys on the HTTPS side, and why a random one breaks whatever was saved.](https://tunnels.io/learn/what-is-a-reserved-subdomain) [tunnels.io vs Cloudflare Tunnel Where each fits, and what the person on the other end has to install first.](https://tunnels.io/compare/cloudflare-tunnel) [Reaching a homelab from outside The other services on the same box, and keeping them addressable across reboots.](https://tunnels.io/use-cases/homelab) [SSH into a machine with no public IP Administering the box your world sits on, over the same kind of TCP tunnel.](https://tunnels.io/use-cases/ssh) [Reach a database from anywhere Another TCP service published the same way, and who does the authenticating.](https://tunnels.io/use-cases/database)

More explainers in [Learn](https://tunnels.io/learn), or go to [pricing](https://tunnels.io/pricing) and [get started](https://tunnels.io/get-started).

## Questions

### Can I run a Minecraft server without port forwarding?

Yes, for Java Edition. Run the client on the machine holding the world and it publishes port 25565 over a raw TCP tunnel. The connection is dialled outward, so nothing inbound has to be permitted on your router and you do not need a static IP. Friends connect to the host and port the client prints.

### Does this work with Minecraft Bedrock Edition?

No, and it never will on this platform. Bedrock speaks UDP on port 19132, and we carry HTTPS and raw TCP only. No plan adds UDP. If your players are on phones, consoles or the Windows edition, you need a host that speaks UDP instead.

### Do I need a paid plan to host a Minecraft server?

Yes. Minecraft Java needs a raw TCP tunnel, and TCP starts on Professional at $4 a month or $40 a year. The free Basic plan and the Student plan carry HTTPS only, so the tunnel is refused when it registers. Professional also includes five tunnels and 128 GB a month.

### What address do my friends type in?

The hostname and the port together, in the form tunnels.host:41273, pasted into the server address field. The port is not optional. Without it the client assumes 25565 at our edge, finds nothing listening, and reports that it cannot connect.

### Will a tunnel add lag to my server?

It adds a hop, so round trips are longer than on a directly forwarded port. In practice that goes unnoticed on a survival world and is noticeable in PvP and minigames. If competitive play is the point of your server, rent a host near your players. Your home upload speed is the other limit, and a tunnel does not change it.

One command, and 25565 has an address your friends can reach.

Professional is $4 a month, includes raw TCP, and cancels whenever you like. Java Edition only, and we said so before you paid.

[Get started →](https://tunnels.io/get-started) [See plans and limits](https://tunnels.io/pricing)
