Help using auto curseforge with minecraft template
I've got a minecraft server up and running, but want to configure auto curseforge to add some mods by adding "-e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/mc-mods/minecraft-transit-railway" into the Dockerfile. The problem is that I can't figure out where the Dockerfile for that service resides. Just looking for a pointer in the right direction.
59 Replies
Project ID:
N/A
N/A
@thallescomh this one’s for you bud!
He made the Minecraft template
If you're using the template, you can just add an environment variable with that config
(I think I) Gotcha. So CF_API_Key (and the actual key), TYPE=AUTO_CURSEFORGE, CF_PAGE_URL=(and the url of the mod page), etc?
And for the API key (which has $, /, and .) do I need to single quote, double quote, or escape (add a $)? Or will the railway.app interface handle that?
yes, railway will handle it automatically
AWESOME! Gonna try it now, but may have more questions. But probably not until tomorrow (it's late already).
Thank you for the quick answers.
no problem, any help just ping me :)
OK so here's where I'm at:
Getting a build error:
Unexpected URL structure: https://www.curseforge.com/minecraft/mc-mods/minecraft-transit-railway
Using the instructions from here:
https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/
I've got the following extra variables:
I changed the TYPE:
TYPE=AUTO_CURSEFORGE
CF_API_KEY=(and my key)
CF_PAGE_URL=https://www.curseforge.com/minecraft/mc-mods/minecraft-transit-railway
Auto CurseForge - Minecraft Server on Docker (Java Edition)
Documentation for Minecraft Server on Docker
Take your time on this (meaning feel free to answer me tomorrow.). I'm packing it in for the night.
after taking a look, seems that the docker image doesn't support that specific curseforge URL for some reason.
as a workaround you could download the mod yourself, upload to a cdn (for example anonfiles) and then use the
MODS=
property.
it would look like this
i'll make an issue on the repo, the line seems to be this
https://github.com/itzg/mc-image-helper/blob/4002bbf628c4bbb50e1acf63ab72d13313217d5b/src/main/java/me/itzg/helpers/curseforge/InstallCurseForgeCommand.java#L144Set VERSION = LATEST just to skip that error, but still hung up on
CF_SERVER_MOD or FTB_SERVER_MOD is required to be set
I've tried pointing it to the .jar file (nope, has to be a .ZIP) and to the download page https://www.curseforge.com/minecraft/mc-mods/minecraft-transit-railway/files/4505555
That generated this error
ERROR : 'get' command failed. Version is 1.32.8
me.itzg.helpers.get.RequestFailedException: Failed to download https://www.curseforge.com/minecraft/mc-mods/minecraft-transit-railway/files/4505555: status code: 403, reason phrase: Forbidden
at me.itzg.helpers.get.GetCommand.resolveExpectedFilename(GetCommand.java:364)
at me.itzg.helpers.get.GetCommand.needsDownload(GetCommand.java:329)
at me.itzg.helpers.get.GetCommand.processUrisForDirectory(GetCommand.java:303)
at me.itzg.helpers.get.GetCommand.call(GetCommand.java:198)
at me.itzg.helpers.get.GetCommand.call(GetCommand.java:55)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at me.itzg.helpers.McImageHelper.main(McImageHelper.java:149)
Caused by: org.apache.hc.client5.http.HttpResponseException: status code: 403, reason phrase: Forbidden
at me.itzg.helpers.http.FilenameExtractor.extract(FilenameExtractor.java:73)
at me.itzg.helpers.http.DeriveFilenameHandler.handleResponse(DeriveFilenameHandler.java:21)
at me.itzg.helpers.http.DeriveFilenameHandler.handleResponse(DeriveFilenameHandler.java:10)
at
@leonadato your mod is really not supported by the docker image, you should consider doing this
i've opened an issue on the repository, let's see what will happen.
https://github.com/itzg/mc-image-helper/issues/268#issuecomment-1647843580
did you mean "consider NOT doing this"?
any reason on why not doing this?
Sorry, I wasn't following the threading correclty. I did try that, but got an error. Let me try it again...
ah ok, just make sure to not use any url from curseforge.
for now, the docker image seems to only support modpacks
OK. So with the following variables:
EULA = TRUE
TYPE = CURSEFORGE
VERSION = LATEST
MODS = https://www.dropbox.com/s/fxbe8pdg3thwdga/MTR-forge-1.19.4-3.2.2-hotfix-1.jar?dl=0
I get the following errors:
ERROR: CF_SERVER_MOD or FTB_SERVER_MOD is required to be set
WARNING for the old TYPE=CURSEFORGE mechanism it is best to set VERSION to a specific value
That's why I went down the rabbit hole of CF_SERVER_MOD and/or FTB_SERVER_MOD
the mod is forge mod, right?
MTR-forge-1.19.4-3.2.2-hotfix-1.jar
if yes, you'll change the
type
from curseforge
to forge
and use the mods
property.
It looks like it's expecting a ZIP file?
Exception in thread "main" cpw.mods.niofs.union.UnionFileSystem$UncheckedIOException: java.util.zip.ZipException: zip END header not found
Caused by: java.util.zip.ZipException: zip END header not found
that's weird, mine worked without any problems
Let me try your link and see. If that's OK.
your link doesnt seem to be direct link
AH
https://cdn-147.anonfiles.com/IdQfT039z2/376071bf-1690245702/MTR-forge-1.19.4-3.2.2-hotfix-1.jar
Same error.
NOW things are getting weird.
maybe a clean volume would make it work? probably there's some file corrupted in there that is causing problem
hagn on...
I was using your link from last night, not the one you just sent. I presumed it was the same, but it's not.
yeah, the other one is dead
redeploying
COME ON BABY GO!
Forge already installed.
<twiddling thumbs dot gif>
this pause is taking MUCH longer than any other deploy, which oddly makes me feel better.
it's probably downloading, anonfiles cdn are shit
about 500kbp/s
still loading. Just FYI.
I know you have NOTHING ELSE going on.
still sitting on:
[mc-image-helper] 00:35:15.585 INFO : Forge version 47.1.0 for minecraft version 1.20.1 is already installed
🎉
just watch out that the mod is for 1.19.4 and you're on 1.20.1
ah. So let's see. But that's easily fixed.
welp, it looks like the server is running, but I can't connect my minecraft client to it.
I did railway link <project ID>. Am I missing something stupid simple?
the ip is in the "Ngrok" service
(and for completeness:
Multiplayer
direct link
link that I got from teh NGrok agent.
lemme redeploy the ngrok since the minecraft was bouncing so much.
Nope. OK, I'm going to rebuild this whole thing now that I know all the pieces. Stay tuned.
Are you OK leaving the mod on anonfiles until I find an alternative? I'll let you know asap once I have it.
that's weird, could you send me the ngrok ip?
also, in the minecraft server settings in railway, what's the internal domain?
0.tcp.ngrok.io:13246
internal domain (private networking?) is
minecraft-server.railway.internet
Let me know before I blow this away.
i tried to deploy your mod and it requires another mod to work
btw, let's use discord cdn now
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
Just for clarity, the MODS variable is a comma-delimited list?
yes and by doing that the server works 🎉
redeploying...
i'll add a health check later instead of "failing silently"
Still hanging on connecting to the the minecraft server.
minecraft started nice and fast, but still not connecting.
FWIW, I also can't ping 0.tcp.ngrok.io:11426 (the new ngrok IP)
send me server logs
This is more than just this startup, but I can't find the start point for the latest restart:
try clean installation, should work
Sounds good. Stay tuned.
btw, the env variables i used:
redeploying now.
Running forge installer
server is running. Now I need to figure out how to get the client-side installed.
But that's on me.