R
Railway

✋|help

Hosting a modded Minecraft server

Yyuval598/22/2023
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.
Bbrody1928/22/2023
@ThallesComH - you're up
Tthallescomh8/22/2023
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
Yyuval598/22/2023
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)
Bbrody1928/22/2023
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
Yyuval598/22/2023
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?
Bbrody1928/22/2023
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
Yyuval598/22/2023
ok so two questions; How do I access it and where do I mount the volume?
Bbrody1928/22/2023
access it from the railway domain the service is given, mount point doesn't matter at all
Yyuval598/22/2023
Ok, I'll check it out now
Bbrody1928/22/2023
it comes with a volume, but just unmount it and remount yours
Yyuval598/22/2023
It actually didn't, ngl
Bbrody1928/22/2023
it does
it's shown in the template
Yyuval598/22/2023
Dunno what to tell you, I added the service in my project and it came with no volume attached
Bbrody1928/22/2023
well then railway bug
Yyuval598/22/2023
Oh cool, I love finding those
I'll report it in a bit (unless you'd like to verify it and report it yourself)
Bbrody1928/22/2023
question, how would I verify it myself?
Yyuval598/22/2023
Create some other project, then add the service from template
Bbrody1928/22/2023
oh you're talking about that, nah railway will sort it out
Yyuval598/22/2023
Oh I'm sure they will, I'd like to report it anyways tho just to be safe
Bbrody1928/22/2023
if you can reproduce it, go for it
Yyuval598/22/2023
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
Bbrody1928/22/2023
sounds good
Yyuval598/22/2023
ok, crash loop achieved
Yyuval598/22/2023
Here's the error:
Yyuval598/22/2023
How fun
Bbrody1928/22/2023
alright we need @ThallesComH again
Yyuval598/22/2023
figures ¯\_(ツ)_/¯
Tthallescomh8/22/2023
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)
Yyuval598/22/2023
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.
Tthallescomh8/22/2023
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
see this https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/
Tthallescomh8/22/2023
does it work local?
Yyuval598/22/2023
Yeah
Tthallescomh8/22/2023
so yeah it's probably not the mod then, check the java version and mc version
Yyuval598/22/2023
Also, the server should be using Java 17 and according to the page you sent seems the docker should be using the same version
Yyuval598/22/2023
Yep, Java version 17
Yyuval598/22/2023
I am actually using v17 locally as well, so it really should work
Tthallescomh8/22/2023
did you set the mc version to 1.18?
Yyuval598/22/2023
How do I do that? I didn't know I needed to
Tthallescomh8/22/2023
it defaults to the latest version, which is 1.20 currently i think
let me get it for you
here https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/
Yyuval598/22/2023
ok, I set it to 1.18, waiting for the deployment
Yyuval598/22/2023
Seems to be much of the same?
Yyuval598/22/2023
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...

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

Looking for more? Join the community!

Recommended Posts
Can't connect to RedisThis is the error I am getting. What I have checked so far * Made sure I used the env variables provHello everyone, i'm trying to make a python websocket using websockets library also flaskso basically i have this -> ```py async def main(): url = os.environ.get('RAILWAY_URL', 'localExtension of Payment Due Date for SubscriptionIs there a way I can request for a brief extension of a few days for my upcoming payment?Hello Everyone! I am facing some problem related to deploying my nodejs application.I have deployed my nodejs application using github, but do not know how can I connect phpmyadmin so RedeployHey there, is there away to start a redploy using the Railway APIKafka Connectioncould anyone help me setup kafka cluster? I've went through the deployment process but getting a conHosting a monorepo with a Vite/Svelte Front and and a Fiber BackendI am trying to host my monorepo application within railway however I am facing some issues when tryiUnexpected timeouts and slow downsHey guys! I'm writing this post since we've been experimenting some slow downs and timeouts during tconfigure variable in VM ARGUMENTSI would like to know how do I create a variable "VM Arguments" in the railway environment? currentluhmm i think i filled the entire disk somehowservice id: 66b587c8-3c50-4dd0-8dfa-394ade04a0eci want to deploy a wordpres, is it possible?project id fb928ae2-62f0-4f8f-be68-9f7902efbebdBilled per usage plan with carryoverHey guys, I'm currently on a usage based plan but my app is only projected to use $1.70/month. Will How to use the Kafka project?I'm relatively new to Kafka and I want to publish and consume events to the Kafka running in a kafkaCannot login to Railway.app this morningHere's what I'm doing to login: I go to railway.app, and select Login enter my email address and preRelative path issueI am trying to read some Json files and parse them with one of my services. Locally it works fine. Can't run Railway CLI down command with project tokenhey , it is possible to run the railway down command with railway project token without logging in. Ruby on Rails Deployment with database and redisi had a few questions about linking my database and redis server within railway app ... I tried but Lost all my 20$ credits out of no whereSo i just got an email saying my projects needs 3$ in credits, but suddenly when i check? my whole 2any reason why my usage suddenly jumps to 4GB when there are no tasks running?The app had no requests for for the entire day but the usage jumped, any reason why this could happei want to dowload my post gre db locallyhow can i dowload my post-gre db locally