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
Percy
Percy17mo ago
Project ID: N/A
Leon Adato
Leon AdatoOP17mo ago
N/A
MantisInABox
MantisInABox17mo ago
@thallescomh this one’s for you bud! He made the Minecraft template
ThallesComH
ThallesComH17mo ago
If you're using the template, you can just add an environment variable with that config
Leon Adato
Leon AdatoOP17mo ago
(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?
ThallesComH
ThallesComH17mo ago
yes, railway will handle it automatically
Leon Adato
Leon AdatoOP17mo ago
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.
ThallesComH
ThallesComH17mo ago
no problem, any help just ping me :)
Leon Adato
Leon AdatoOP17mo ago
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
Leon Adato
Leon AdatoOP17mo ago
Take your time on this (meaning feel free to answer me tomorrow.). I'm packing it in for the night.
ThallesComH
ThallesComH17mo ago
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
TYPE=FORGE
EULA=TRUE
MODS=https://cdn-149.anonfiles.com/IdQfT039z2/bf8b9092-1690171638/MTR-forge-1.19.4-3.2.2-hotfix-1.jar
TYPE=FORGE
EULA=TRUE
MODS=https://cdn-149.anonfiles.com/IdQfT039z2/bf8b9092-1690171638/MTR-forge-1.19.4-3.2.2-hotfix-1.jar
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#L144
Leon Adato
Leon AdatoOP17mo ago
Set 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
ThallesComH
ThallesComH17mo ago
@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
Leon Adato
Leon AdatoOP17mo ago
did you mean "consider NOT doing this"?
ThallesComH
ThallesComH17mo ago
any reason on why not doing this?
Leon Adato
Leon AdatoOP17mo ago
Sorry, I wasn't following the threading correclty. I did try that, but got an error. Let me try it again...
ThallesComH
ThallesComH17mo ago
ah ok, just make sure to not use any url from curseforge. for now, the docker image seems to only support modpacks
Leon Adato
Leon AdatoOP17mo ago
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
Dropbox
MTR-forge-1.19.4-3.2.2-hotfix-1.jar
Shared with Dropbox
Leon Adato
Leon AdatoOP17mo ago
That's why I went down the rabbit hole of CF_SERVER_MOD and/or FTB_SERVER_MOD
ThallesComH
ThallesComH17mo ago
the mod is forge mod, right?
Leon Adato
Leon AdatoOP17mo ago
MTR-forge-1.19.4-3.2.2-hotfix-1.jar
ThallesComH
ThallesComH17mo ago
if yes, you'll change the type from curseforge to forge and use the mods property.
EULA=TRUE
TYPE=FORGE
VERSION=LATEST
MODS=https://www.dropbox.com/s/fxbe8pdg3thwdga/MTR-forge-1.19.4-3.2.2-hotfix-1.jar?dl=0
EULA=TRUE
TYPE=FORGE
VERSION=LATEST
MODS=https://www.dropbox.com/s/fxbe8pdg3thwdga/MTR-forge-1.19.4-3.2.2-hotfix-1.jar?dl=0
Leon Adato
Leon AdatoOP17mo ago
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
ThallesComH
ThallesComH17mo ago
that's weird, mine worked without any problems
Leon Adato
Leon AdatoOP17mo ago
Let me try your link and see. If that's OK.
ThallesComH
ThallesComH17mo ago
your link doesnt seem to be direct link
Leon Adato
Leon AdatoOP17mo ago
AH
ThallesComH
ThallesComH17mo ago
https://cdn-147.anonfiles.com/IdQfT039z2/376071bf-1690245702/MTR-forge-1.19.4-3.2.2-hotfix-1.jar
Leon Adato
Leon AdatoOP17mo ago
Same error.
Leon Adato
Leon AdatoOP17mo ago
NOW things are getting weird.
ThallesComH
ThallesComH17mo ago
maybe a clean volume would make it work? probably there's some file corrupted in there that is causing problem
Leon Adato
Leon AdatoOP17mo ago
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.
ThallesComH
ThallesComH17mo ago
yeah, the other one is dead
Leon Adato
Leon AdatoOP17mo ago
redeploying COME ON BABY GO!
ThallesComH
ThallesComH17mo ago
poggers
Leon Adato
Leon AdatoOP17mo ago
Forge already installed. <twiddling thumbs dot gif> this pause is taking MUCH longer than any other deploy, which oddly makes me feel better.
ThallesComH
ThallesComH17mo ago
it's probably downloading, anonfiles cdn are shit about 500kbp/s
Leon Adato
Leon AdatoOP17mo ago
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
ThallesComH
ThallesComH17mo ago
🎉 just watch out that the mod is for 1.19.4 and you're on 1.20.1
Leon Adato
Leon AdatoOP17mo ago
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?
ThallesComH
ThallesComH17mo ago
the ip is in the "Ngrok" service
Leon Adato
Leon AdatoOP17mo ago
(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.
ThallesComH
ThallesComH17mo ago
that's weird, could you send me the ngrok ip? also, in the minecraft server settings in railway, what's the internal domain?
Leon Adato
Leon AdatoOP17mo ago
0.tcp.ngrok.io:13246 internal domain (private networking?) is minecraft-server.railway.internet Let me know before I blow this away.
ThallesComH
ThallesComH17mo ago
i tried to deploy your mod and it requires another mod to work
ThallesComH
ThallesComH17mo ago
btw, let's use discord cdn now
ThallesComH
ThallesComH17mo ago
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
Leon Adato
Leon AdatoOP17mo ago
Just for clarity, the MODS variable is a comma-delimited list?
ThallesComH
ThallesComH17mo ago
yes and by doing that the server works 🎉
Leon Adato
Leon AdatoOP17mo ago
redeploying...
ThallesComH
ThallesComH17mo ago
i'll add a health check later instead of "failing silently"
Leon Adato
Leon AdatoOP17mo ago
Still hanging on connecting to the lfg 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)
ThallesComH
ThallesComH17mo ago
send me server logs
Leon Adato
Leon AdatoOP17mo ago
This is more than just this startup, but I can't find the start point for the latest restart:
ThallesComH
ThallesComH17mo ago
try clean installation, should work
Leon Adato
Leon AdatoOP17mo ago
Sounds good. Stay tuned.
ThallesComH
ThallesComH17mo ago
btw, the env variables i used:
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
Leon Adato
Leon AdatoOP17mo ago
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.
Want results from more Discord servers?
Add your server