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
Percy16mo ago
Project ID: a6b6f3d5-e3db-4176-8ddf-4f2ad846cfd2
Brody
Brody16mo ago
@ThallesComH - you're up
ThallesComH
ThallesComH16mo 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 PeterOP16mo 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
Brody16mo 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 PeterOP16mo 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
Brody16mo 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 PeterOP16mo ago
ok so two questions; How do I access it and where do I mount the volume?
Brody
Brody16mo ago
access it from the railway domain the service is given, mount point doesn't matter at all
Asseater Peter
Asseater PeterOP16mo ago
Ok, I'll check it out now
Brody
Brody16mo ago
it comes with a volume, but just unmount it and remount yours
Asseater Peter
Asseater PeterOP16mo ago
It actually didn't, ngl
Brody
Brody16mo ago
it does it's shown in the template
Asseater Peter
Asseater PeterOP16mo ago
Dunno what to tell you, I added the service in my project and it came with no volume attached
Brody
Brody16mo ago
well then railway bug
Asseater Peter
Asseater PeterOP16mo 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
Brody16mo ago
question, how would I verify it myself?
Asseater Peter
Asseater PeterOP16mo ago
Create some other project, then add the service from template
Brody
Brody16mo ago
oh you're talking about that, nah railway will sort it out
Asseater Peter
Asseater PeterOP16mo ago
Oh I'm sure they will, I'd like to report it anyways tho just to be safe
Brody
Brody16mo ago
if you can reproduce it, go for it
Asseater Peter
Asseater PeterOP16mo 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
Brody16mo ago
sounds good
Asseater Peter
Asseater PeterOP16mo ago
ok, crash loop achieved
Asseater Peter
Asseater PeterOP16mo ago
Here's the error:
Asseater Peter
Asseater PeterOP16mo ago
How fun
Brody
Brody16mo ago
alright we need @ThallesComH again
Asseater Peter
Asseater PeterOP16mo ago
figures ¯\_(ツ)_/¯
ThallesComH
ThallesComH16mo 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 PeterOP16mo 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
ThallesComH16mo 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
ThallesComH16mo ago
does it work local?
Asseater Peter
Asseater PeterOP16mo ago
Yeah
ThallesComH
ThallesComH16mo ago
so yeah it's probably not the mod then, check the java version and mc version
Asseater Peter
Asseater PeterOP16mo 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 PeterOP16mo ago
Yep, Java version 17
Asseater Peter
Asseater PeterOP16mo ago
I am actually using v17 locally as well, so it really should work
ThallesComH
ThallesComH16mo ago
did you set the mc version to 1.18?
Asseater Peter
Asseater PeterOP16mo ago
How do I do that? I didn't know I needed to
ThallesComH
ThallesComH16mo ago
it defaults to the latest version, which is 1.20 currently i think let me get it for you
Asseater Peter
Asseater PeterOP16mo ago
ok, I set it to 1.18, waiting for the deployment
Asseater Peter
Asseater PeterOP16mo ago
Seems to be much of the same?
Asseater Peter
Asseater PeterOP16mo 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
ThallesComH16mo ago
yeah that i was going to say set it to 1.18.2 you can change that
Asseater Peter
Asseater PeterOP16mo ago
Done. Waiting for deployment
ThallesComH
ThallesComH16mo ago
Asseater Peter
Asseater PeterOP16mo ago
It seems to be up? Where do I make a public domain, Minecraft Server or Ngrok
ThallesComH
ThallesComH16mo ago
the public domain is printed in the ngrok service
Asseater Peter
Asseater PeterOP16mo ago
It wasn't there, but I generated one I'm launching minecraft to see if it's up, one second
ThallesComH
ThallesComH16mo 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 PeterOP16mo 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 PeterOP16mo ago
ThallesComH
ThallesComH16mo ago
is that the full logs? oh you're trying to load a mod that is only client side
ThallesComH
ThallesComH16mo ago
ThallesComH
ThallesComH16mo ago
usually mods have a dedicated jar only for servers
Asseater Peter
Asseater PeterOP16mo ago
Yeah I'm removing it now It's weird tho, I copied the mods folder from my local server which was running
ThallesComH
ThallesComH16mo ago
you didn't added that mods env right?
Asseater Peter
Asseater PeterOP16mo ago
I did not, no Could've been remnants of the auto-download thing
ThallesComH
ThallesComH16mo ago
ok, maybe some mod that auto-downloaded was client only?
Asseater Peter
Asseater PeterOP16mo ago
Maybe because I linked it the normal modpack? Could it just not know to grab the server pack from curseforge?
ThallesComH
ThallesComH16mo ago
yeah, it probably just download the most recent one or something like that
Asseater Peter
Asseater PeterOP16mo ago
New error:
ThallesComH
ThallesComH16mo ago
start from the zero, will probably solve that lock file
Asseater Peter
Asseater PeterOP16mo ago
What?
ThallesComH
ThallesComH16mo 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 PeterOP16mo 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 PeterOP16mo ago
!!!
Asseater Peter
Asseater PeterOP16mo ago
Thank you so so much! to both of you guys!
ThallesComH
ThallesComH16mo ago
:)
Want results from more Discord servers?
Add your server