Hosting a modded Minecraft server

Hi guys! I'm trying to host a modded minecraft server through Railway using the Minecraft Server template and I am running into a couple roadblocks: - First off, after reading the documentation for itzg/minecraft-server I've set up forge to auto-download, and it downloads most mods but some need to be added manually, which leads me to my first problem: How do I edit files on a volume? - My second issue is that the process crashes, but it could be caused by the first issue so I'm gonna assume I need to resolve the first problem first.
72 Replies
Percy
Percy10mo ago
Project ID: a6b6f3d5-e3db-4176-8ddf-4f2ad846cfd2
Brody
Brody10mo ago
@ThallesComH - you're up
ThallesComH
ThallesComH10mo ago
for downloading other mods, you'll have to upload it somewhere and provide a direct download link through the MODS= environment variable. example:
EULA=TRUE
TYPE=FORGE
VERSION=1.19.4
MODS=https://cdn.discordapp.com/attachments/1132868851927896105/1133203094474338375/MTR-forge-1.19.4-3.2.2-hotfix-1.jar,https://cdn.discordapp.com/attachments/1132868851927896105/1133203094876987502/architectury-8.2.89-forge.jar
EULA=TRUE
TYPE=FORGE
VERSION=1.19.4
MODS=https://cdn.discordapp.com/attachments/1132868851927896105/1133203094474338375/MTR-forge-1.19.4-3.2.2-hotfix-1.jar,https://cdn.discordapp.com/attachments/1132868851927896105/1133203094876987502/architectury-8.2.89-forge.jar
Asseater Peter
Asseater Peter10mo ago
The mods I'm referring to are on Forge, some are just set to not auto-download But ok, I'll try that I do have a server set up on my machine currently, is there any way to upload my files directly to the volume? (I'd like to have my world as well, which is why I'm asking)
Brody
Brody10mo ago
railway doesn't provide any upload interface for the volume, interacting with the volume is only done by the service that's connected to it
Asseater Peter
Asseater Peter10mo ago
The way I thought to get around it was detaching the volume and connecting some s3/ftp service or something along those lines, do you think that'd work?
Brody
Brody10mo ago
yes that would work, as long as you are already okay with doing something like that, use this https://railway.app/template/Nan7Bs with a service variable USE_VOLUME_ROOT set to 1
Asseater Peter
Asseater Peter10mo ago
ok so two questions; How do I access it and where do I mount the volume?
Brody
Brody10mo ago
access it from the railway domain the service is given, mount point doesn't matter at all
Asseater Peter
Asseater Peter10mo ago
Ok, I'll check it out now
Brody
Brody10mo ago
it comes with a volume, but just unmount it and remount yours
Asseater Peter
Asseater Peter10mo ago
It actually didn't, ngl
Brody
Brody10mo ago
it does it's shown in the template
Asseater Peter
Asseater Peter10mo ago
Dunno what to tell you, I added the service in my project and it came with no volume attached
Brody
Brody10mo ago
well then railway bug
Asseater Peter
Asseater Peter10mo ago
Oh cool, I love finding those I'll report it in a bit (unless you'd like to verify it and report it yourself)
Brody
Brody10mo ago
question, how would I verify it myself?
Asseater Peter
Asseater Peter10mo ago
Create some other project, then add the service from template
Brody
Brody10mo ago
oh you're talking about that, nah railway will sort it out
Asseater Peter
Asseater Peter10mo ago
Oh I'm sure they will, I'd like to report it anyways tho just to be safe
Brody
Brody10mo ago
if you can reproduce it, go for it
Asseater Peter
Asseater Peter10mo ago
That's the plan :) Anyways thanks for the help, I'm currently uploading all the files and restarting the service, then I'll see about if it crashes and so on
Brody
Brody10mo ago
sounds good
Asseater Peter
Asseater Peter10mo ago
ok, crash loop achieved
Asseater Peter
Asseater Peter10mo ago
Here's the error:
Asseater Peter
Asseater Peter10mo ago
How fun
Brody
Brody10mo ago
alright we need @ThallesComH again
Asseater Peter
Asseater Peter10mo ago
figures ¯\_(ツ)_/¯
ThallesComH
ThallesComH10mo ago
usually this kinda of problems appear because of wrong java version or wrong mc version. what mc version are u using? and btw, im seeing somethings from sponge (another server software)
Asseater Peter
Asseater Peter10mo ago
Good question about the Java version, I just cloned the Minecraft Server template so I'm not really sure - how would I check? I set TYPE to FORGE in the environment variables, so this shouldn't be happening. That's weird.
ThallesComH
ThallesComH10mo ago
i was talking more about the mod being a sponge only, but that's just a guess, maybe they're just using a library from sponge
ThallesComH
ThallesComH10mo ago
does it work local?
Asseater Peter
Asseater Peter10mo ago
Yeah
ThallesComH
ThallesComH10mo ago
so yeah it's probably not the mod then, check the java version and mc version
Asseater Peter
Asseater Peter10mo ago
Also, the server should be using Java 17 and according to the page you sent seems the docker should be using the same version
Asseater Peter
Asseater Peter10mo ago
Yep, Java version 17
Asseater Peter
Asseater Peter10mo ago
I am actually using v17 locally as well, so it really should work
ThallesComH
ThallesComH10mo ago
did you set the mc version to 1.18?
Asseater Peter
Asseater Peter10mo ago
How do I do that? I didn't know I needed to
ThallesComH
ThallesComH10mo ago
it defaults to the latest version, which is 1.20 currently i think let me get it for you
Asseater Peter
Asseater Peter10mo ago
ok, I set it to 1.18, waiting for the deployment
Asseater Peter
Asseater Peter10mo ago
Seems to be much of the same?
Asseater Peter
Asseater Peter10mo ago
Also on startup it's setting the max RAM to 1G which is probably not a great idea
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 13 1000 1000 4096 Aug 22 14:38 /data'

[init] Resolving type given FORGE

[mc-image-helper] 14:38:52.100 INFO : Re-installing Forge due to version change from MC 1.18.2/Forge 40.2.0 to MC 1.18/Forge 38.0.17

[mc-image-helper] 14:38:52.103 INFO : Downloading Forge installer 38.0.17 for Minecraft 1.18

[mc-image-helper] 14:38:53.101 INFO : Running Forge installer. This might take a while...

[init] Setting initial memory to 1G and max to 1G

[init] Using Forge supplied run.sh script...
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 13 1000 1000 4096 Aug 22 14:38 /data'

[init] Resolving type given FORGE

[mc-image-helper] 14:38:52.100 INFO : Re-installing Forge due to version change from MC 1.18.2/Forge 40.2.0 to MC 1.18/Forge 38.0.17

[mc-image-helper] 14:38:52.103 INFO : Downloading Forge installer 38.0.17 for Minecraft 1.18

[mc-image-helper] 14:38:53.101 INFO : Running Forge installer. This might take a while...

[init] Setting initial memory to 1G and max to 1G

[init] Using Forge supplied run.sh script...
Wait, seems as though I need to specify 1.18.2 and not just 1.18?
ThallesComH
ThallesComH10mo ago
yeah that i was going to say set it to 1.18.2 you can change that
Asseater Peter
Asseater Peter10mo ago
Done. Waiting for deployment
ThallesComH
ThallesComH10mo ago
Asseater Peter
Asseater Peter10mo ago
It seems to be up? Where do I make a public domain, Minecraft Server or Ngrok
ThallesComH
ThallesComH10mo ago
the public domain is printed in the ngrok service
Asseater Peter
Asseater Peter10mo ago
It wasn't there, but I generated one I'm launching minecraft to see if it's up, one second
ThallesComH
ThallesComH10mo ago
no, it's in the logs of ngrok service i've to make that clear, people dont know about the readme in the template
Asseater Peter
Asseater Peter10mo ago
Yeah I just assumed it'd use the "public domains" thing in Railway I do see it tho, checking now It was definitely not up, but it didn't crash either it seems? I'm trying to restart the service and see if that works
Asseater Peter
Asseater Peter10mo ago
ThallesComH
ThallesComH10mo ago
is that the full logs? oh you're trying to load a mod that is only client side
ThallesComH
ThallesComH10mo ago
ThallesComH
ThallesComH10mo ago
usually mods have a dedicated jar only for servers
Asseater Peter
Asseater Peter10mo ago
Yeah I'm removing it now It's weird tho, I copied the mods folder from my local server which was running
ThallesComH
ThallesComH10mo ago
you didn't added that mods env right?
Asseater Peter
Asseater Peter10mo ago
I did not, no Could've been remnants of the auto-download thing
ThallesComH
ThallesComH10mo ago
ok, maybe some mod that auto-downloaded was client only?
Asseater Peter
Asseater Peter10mo ago
Maybe because I linked it the normal modpack? Could it just not know to grab the server pack from curseforge?
ThallesComH
ThallesComH10mo ago
yeah, it probably just download the most recent one or something like that
Asseater Peter
Asseater Peter10mo ago
New error:
ThallesComH
ThallesComH10mo ago
start from the zero, will probably solve that lock file
Asseater Peter
Asseater Peter10mo ago
What?
ThallesComH
ThallesComH10mo ago
i'll see after if there's a dashboard for mc servers, will facilitate the process delete everything and start from ground up
Asseater Peter
Asseater Peter10mo ago
Oh ok, lemme try Ok I deleted the world folder, it's currently generating (which seems to be a good sign)
Asseater Peter
Asseater Peter10mo ago
!!!
Asseater Peter
Asseater Peter10mo ago
Thank you so so much! to both of you guys!
ThallesComH
ThallesComH10mo ago
:)