25565), sharing the connection address, and troubleshooting common issues.
What you’ll need
- A Minecraft server running locally.
- The ngrok agent installed.
1. Start a TCP tunnel
Use the ngrok agent to open a TCP endpoint on port25565:
2. Share the connection address
Connect to your Minecraft server using the TCP address shown in the ngrok agent output (for example,tcp://1.tcp.ngrok.io:12345).
If you need to restrict access to specific public IP addresses, follow the secure Minecraft server example.
Minecraft on ngrok’s free plan
The free plan has the following restrictions:- A valid credit or debit card is required.
- To help combat abuse on the platform, a valid credit or debit card must be added to your account before using TCP endpoints on the free tier.
- This card is not charged.
- There is no permanent TCP address.
- When you restart the agent, you need to send a new TCP address to your players.
- Paid accounts let you reserve a TCP address for reuse.
- For example, start the TCP endpoint with
ngrok tcp --url tcp://1.tcp.ngrok.io:12345 25565.
- Bandwidth is limited.
- The free plan includes a limited amount of bandwidth per month.
- When you exceed it, players can’t connect to your server.