Run Minecraft as a public server on Ubuntu without public ip
or port forward
over ZeroTier Network or via mods
- Docker
- Java 21 (JDK)
- ZeroTier (optional)
I use Google Cloud Shell as a server in this guide
- Create ZeroTier Network (you need an account), see docs
- On your local machine, install ZeroTier and join the network you just created
- Log in to your google cloud shell and run:
git clone https://github.com/TTlaugh/mcsv.git
By default, e4mc mod is already added to fabric server, so you don't need to do anything.
- Inside mcsv folder, run:
chmod +x mcsv && ./mcsv -z fabric/1.20.1
- Then you need to authenticate every time you join a device to a ZeroTier Network if the network you created is private.
- Finally, follow the console log to get the address of your server, it should look like this:
╭─────────────────────────╮ │ ZeroTier ip: 172.25.0.1 │ ╰─────────────────────────╯ # .... Some log lines ╭─────────────────────────────────────────╮ │ e4mc address: pyramid-news.ap.e4mc.link │ ╰─────────────────────────────────────────╯
Run:
mcsv [OPTIONS...] PATH
PATH:
The path of the folder contain server .jar file
OPTION:
-z start and join the Server to ZeroTier-Network
-r delete existing world and start Server