/mcsw

Minecraft Server Workflow

Primary LanguageShell

mcsw

Host Minecraft: Java Edition server via GitHub Workflows!

screen

Hello world!

  • Use this template or fork it
  • Now choose your tunneling method:
playit.gg 1. Note: If you used ngrok before playit, remove NGROKAUTHTOKEN secret or set method=playit in settings.cfg
2. In Actions tab select Minecraft Server workflow, Run workflow
3. Go to Actions tab, choose running workflow, then host job, Setup tunnel step, click claim URL. This will redirect you to playit.gg panel
4. Register/login
5. Create Minecraft Java tunnel, "Can you connect to your..." - Yes, Add tunnel
6. Tunnel address is the IP!
ngrok 1. Register/login at https://dashboard.ngrok.com/login
2. Copy your authtoken (from step 2 on Setup page, or at Authentication, Your authtoken)
3. Go to repo's Settings, Secrets, create NGROKAUTHTOKEN secret, paste your authtoken in value and save it
4. In Actions, select Minecraft Server workflow and run it manually
5. 2 ways to get your server's IP:
5.1 At ngrok dashboard: go to Status, Tunnels - you'll see it under URL column unavailable?
5.2 In Actions run: go to Actions tab, choose running workflow, then host job, Setup tunnel step
6. Have fun!

Fun facts

  • After cancelling run, it will upload server artifact, archive with server world and properties. You can download it, edit jsons, add mods, whatever, then upload it back in repo as server.zip (max file size upload from browser is 25mb, so I've excluded server.jar and fabric; you can upload large files with git lfs anyway)
  • Workflow will unpack server.zip and remove it from repository later, or download artifact from last run if zip is gone.
  • By default, it will download latest vanilla server. In settings.cfg you can set it to fabric, forge, custom, or none. Note: for custom/modded server you will have to specify installer jar link
  • Job timeout - 6 hours
  • Your repository must be public to have unlimited actions time, else it will have 2000 minutes (33.3hrs) limit in a month for free account.