Engrok

Engrok

Automatic Ngrok tunnel opener for Dedicated Servers. Includes integration with GitHub for saving the Ngrok tunnel IP in a Gist for players to use with EverChanging.

by
699 Downloads
fabricmanagementsocialutility
Rent Server with this Mod

About this Mod

Engrok Thumbnail

Engrok

Requires Cloth Config Requires Fabric API

Engrok is a server-side mod for dedicated servers which opens an Ngrok tunnel automatically once the server starts. There's an integration for GitHub Gists which uploads the Ngrok tunnel IP to a GitHub Gist (an existing one or a new one, depending on the mod's config - if there isn't an existing one, a new one will be created and saved to the config file automatically) so users can either retreive the IP from the Gist directly, or, using the mod Ever Changing on their clients to automatically retrieve it for them.

How to use

For the mod to create a config file you can modify you need to run the server with the mod loaded first. Then make sure to stop the server, then head to the folder "config" and open the file "engrok.json5" with a text editor.
The config'll probably look like this at the beginning:

{
	"enabled": true,
	"ngrokAuthToken": "",
	"regionSelect": "AUTO",
	"gitHubAuthToken": "",
	"gistId": ""
}

Config File

  • Enabled: Self explanatory. Controls the mod.
  • Ngrok Auth Token: If you want the mod to do automatically open an Ngrok tunnel, you'll have to provide it your Ngrok Authentication Token, which you can get from the Ngrok Website Dashboard. You need an Ngrok account in order to acquire an auth token.
  • Region Select: Ngrok is capable of automatically selecting the tunnel location with the least amount of latency relative to you, so you should probably leave it at its default value. Otherwise, you can choose from this list.
  • GitHub Auth Token: In case you want to automatically update the tunnel's address for your friends, I have made a GitHub integration which either makes a new Gist and saves its ID in the next field, or edits the existing gist in the following field. To get a GitHub Authentication Token, you'll need to make sure you're logged into GitHub, then press your profile picture on the top right, head into Settings » Developer Settings » Personal access tokens » Tokens (classic) and press Generate new token, then Generate new token (classic). Then set Expiration to No expiration (or shorter, if you'd like), and under the Select scopes list make sure gist is ticked/enabled, then press Generate Token. Make sure to copy the token, because you'll need to regenerate a new one if you don't, then copy it into the config file.
  • Gist ID: If you have already made a gist, you can change this ID to the gist's ID to have the mod edit it everytime the tunnel is opened (How to find a gist ID: Let's take this gist link for example https://gist.github.com/MagicQuartz/3bef909cddbfbb117f0bcf101222a5dc. You can copy the part after the last slash to have your ID, in this case it's 3bef909cddbfbb117f0bcf101222a5dc).

In-game Commands

/engrok

This command essentially manipulates the config file. Leaving any of these commands without their parameters will empty the config from them and leave a blank "".

  • /engrok setNgrokAuth <token> - Sets the Ngrok Authentication Token in the config file.
  • /engrok setGitHubAuth <token> - Sets the GitHub Authentication Token in the config file.
  • /engrok setGistId <id> - Sets the Gist ID in the config file.

/tunnel

This command controls the Ngrok tunnel.

  • /tunnel open - Opens the tunnel if it's closed
  • /tunnel close - Closes the tunnel if it's open.
  • /tunnel status - Tells you wether the tunnel is open or close and its IP address if it's open.

/gist

Displays data relating to the gist.

  • /gist getIp - Provides you with the IP of the tunnel as shown in the gist online, to make sure it is updated to be like the actual tunnel address you can see using /tunnel status.
  • /gist getUrl - Provides you with the url of the gist, which you can share with friends to use with the Ever Changing mod (More on that soon) to automatically receive the IP every time it changes.

This mod is inspired by Ngrok LAN by Alujjdnd and a big chunk of this mod's code has been taken from Ngrok LAN.
Please keep in mind this mod was made in about 12 hours so it may not work perfectly, but I did my best to patch everything, so please do not try to intentionally break things.

Available Versions

Release 1.0 (1.21.1)release
MC 1.21.1fabric
September 21, 2024
Release 1.0 (1.20.1)release
MC 1.20.1fabric
February 9, 2024

How to Install Engrok on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.1).

3

Install Mod

Open the mod browser in the dashboard and search for "Engrok". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.1, 1.20.1

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Engrok server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.

Is Engrok compatible with fabric?

Engrok officially supports fabric for Minecraft 1.21.1, 1.20.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Engrok – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Engrok consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Engrok with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

1.21.11.20.1