Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
TunnelMC ๐
Expose any local port to the internet via ngrok or cloudflared โ no port allocations needed. Includes a full browser-based management dashboard.
TunnelMC is a Bukkit/Spigot/Paper plugin that automatically downloads and manages ngrok and/or cloudflared, creates tunnels for any local port, and broadcasts the public URL to console and online OPs the moment the tunnel is ready.
๐ What's New in 1.3.0
Java 25 & Build Modernization
- Upgraded to Java 25 โ compiled with Java 25 bytecode for the latest JVM performance and language features.
- Gradle 9.5.1 โ build system upgraded from Gradle 8.x to 9.5.1 for native Java 25 support.
- Virtual thread executor โ the dashboard HTTP server now uses
newVirtualThreadPerTaskExecutor()for non-blocking I/O scaling on Java 25. plugin.ymlapi-version updated from1.13to1.21to match the target platform and suppress Paper deprecation warnings.
Security Hardening
- CSRF protection โ all mutating API endpoints now require an
X-TM-Requestheader. - Brute-force login protection โ lockout after 5 failed attempts with 500ms delay per failure.
- Timing-safe password comparison โ login now uses
MessageDigest.isEqual()to prevent timing attacks. - CSP headers โ Content-Security-Policy added to all dashboard responses to mitigate XSS risks.
- Session sweep โ expired sessions and stale lockout entries are automatically cleaned up hourly.
Stability
volatilesingleton โ static plugin instance is nowvolatileand nulled on disable to prevent classloader leaks during reloads.- Config bounds checking โ all numeric config getters now clamp to valid ranges via
Math.max. - Default password warning โ a prominent console warning at startup if the dashboard password is still
"changeme".
Compatibility
- Minecraft 1.21.x โ 26.1.x โ compiled against Paper 1.21.1 API, which is forward-compatible with all Paper versions through 26.1.x.
Existing configs remain fully compatible โ no config changes required.
โจ Features
๐ Two Tunnel Providers โ ngrok and cloudflared, configurable per tunnel. Mix them freely.
๐ Multiple ngrok Accounts โ Each ngrok tunnel has its own authtoken (required for v3). Run different accounts simultaneously.
๐ Zero-Setup Quick Tunnels โ Cloudflared quick tunnels work out of the box with no account.
๐ Custom Domains โ Cloudflared named tunnels give you persistent custom hostnames via Cloudflare Zero Trust.
๐ฅ๏ธ Web Dashboard โ Full management UI. Create/edit/delete tunnels live, download binaries, change settings โ all from a browser.
โก Auto-Download โ Detects OS and CPU arch, downloads the right binary on first use. Cached forever after.
๐ Instant URL Broadcast โ URL goes to console and all online OPs the moment the tunnel is ready.
๐ฎ Full Command Support โ /tunnel with tab completion for everything.
๐ Auto-Restart & Crash Loop Protection โ Tunnels restart after failure. Stops retrying if it fails too many times in a short window.
๐ฉบ Health Checks โ ngrok tunnels get API-level checks; cloudflared tunnels get process-alive checks.
๐ Pterodactyl Compatible โ Tunnels are outbound connections, so no extra port allocations are ever needed.
๐ฅ Installation
- Drop
TunnelMC.jarintoplugins/ - Start the server โ TunnelMC generates config and auto-exposes the dashboard via cloudflared if no tunnels are configured
- Open the printed URL in your browser
- Configure tunnels from the dashboard, or edit
config.ymland run/tunnel reload
โ๏ธ Configuration
auto-start: false
default-region: "us" # fallback region for ngrok tunnels
notify-ops: true
auto-restart: true
restart-delay-seconds: 10
max-restarts: 5
crash-window-seconds: 60
health-check-interval-seconds: 30
dashboard:
enabled: true
port: 8090
bind-address: "127.0.0.1"
password: "changeme"
auto-expose-on-first-run: true
tunnels:
# Cloudflared quick tunnel โ no account, random URL, HTTP only
- name: "dashboard"
port: 8090
provider: "cloudflared"
auto-start: true
# ngrok HTTP tunnel with its own account token
- name: "noderunner"
port: 8080
provider: "ngrok"
protocol: "http"
region: "us"
authtoken: "your-ngrok-token-here"
# ngrok TCP tunnel from a different account
- name: "gameserver"
port: 25565
provider: "ngrok"
protocol: "tcp"
region: "eu"
authtoken: "another-account-token"
# Cloudflared named tunnel โ persistent custom domain
- name: "mc"
port: 25565
provider: "cloudflared"
token: "your-cloudflare-zero-trust-token"
hostname: "mc.yourdomain.com"
๐ฎ Commands & Permissions
Permission: tunnelmc.admin (default: OP)
| Command | Description |
|---|---|
/tunnel start [name] |
Start all or a specific tunnel |
/tunnel stop [name] |
Stop all or a specific tunnel |
/tunnel restart [name] |
Restart all or a specific tunnel |
/tunnel url [name] |
Show public URL(s) |
/tunnel status |
Show all tunnel status |
/tunnel download ngrok |
Download ngrok binary |
/tunnel download cloudflared |
Download cloudflared binary |
/tunnel dashboard |
Show dashboard port info |
/tunnel reload |
Reload config and restart tunnels |
๐ Provider Comparison
| ngrok | Cloudflared Quick | Cloudflared Named | |
|---|---|---|---|
| Account required | โ free | โ none | โ free |
| HTTP tunnels | โ | โ | โ |
| TCP tunnels | โ | โ | โ |
| Persistent URL | paid only | โ | โ |
| Multiple accounts | โ per-tunnel | โ | โ |
โ ๏ธ Free Plan Notes
ngrok free: one active tunnel at a time, random URL on each restart, bandwidth limits. Authtoken is required for all ngrok v3 tunnels. Per-tunnel authtokens let you use multiple free accounts to work around the one-tunnel limit.
Cloudflared quick tunnels: HTTP only, random *.trycloudflare.com URL, no bandwidth limits.
Cloudflared named tunnels: require a Cloudflare account (free), any protocol, persistent custom domain.
๐ Pterodactyl
No extra port allocations needed โ tunnels are outbound connections only. The dashboard also binds locally and doesn't need an allocated port.
Slow download? TunnelMC will warn after 30 seconds with manual install steps. Place the binary at plugins/TunnelMC/ngrok/ngrok or plugins/TunnelMC/cloudflared/cloudflared and restart.
๐ Compatibility
| Platforms | Bukkit, Spigot, Paper, Purpur |
| Minecraft | 1.21.x โ 26.1.x |
| Java | 25+ (compiled with Java 25) |
| OS | Linux, macOS, Windows |
| Arch | x64, ARM64 |
๐ Related
NodeRunner โ Run a Node.js Discord bot inside your Minecraft server.
PyRunner โ Run a Python Discord bot inside your Minecraft server.
TunnelMC pairs perfectly with both โ a cloudflared quick tunnel to port 8080 makes their dashboards publicly accessible with zero port allocation.
Developed by Spider


