> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using ngrok with Minecraft

> Learn how to share your Minecraft server with others using ngrok TCP endpoints, including free plan limitations and troubleshooting tips.

This guide explains how to share a Minecraft server using an ngrok TCP endpoint.
It covers starting a TCP tunnel on the default Minecraft port (`25565`), sharing the connection address, and troubleshooting common issues.

## What you'll need

* A Minecraft server running locally.
* The [ngrok agent](../agent/) installed.

## 1. Start a TCP tunnel

Use the ngrok agent to open a TCP endpoint on port `25565`:

```bash theme={null}
ngrok tcp 25565
```

## 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](../gateway/examples/minecraft/).

## Minecraft on ngrok's free plan

The [free plan](../pricing-limits/free-plan-limits/) 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](https://dashboard.ngrok.com/settings#id-verification) 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.

Static/unchanging addresses and increased bandwidth limits are available with the [Pay-as-you-go plan](https://ngrok.com/pricing).

## Troubleshooting

### Bandwidth limit exceeded

If you exceed the bandwidth limit on your account, players can no longer connect to your server.
Players attempting to connect may see a **Disconnected** message in the Minecraft client.
Your server logs may show a client connecting and immediately disconnecting.

Check your [usage](https://dashboard.ngrok.com/usage) page to ensure you haven't exceeded your "Bandwidth Limit Out" limit.
