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
Percy16mo ago
Project ID: N/A
Leon Adato
Leon Adato16mo ago
N/A
MantisInABox
MantisInABox16mo ago
@thallescomh this one’s for you bud! He made the Minecraft template
ThallesComH
ThallesComH16mo ago
If you're using the template, you can just add an environment variable with that config
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
yes, railway will handle it automatically
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
no problem, any help just ping me :)
Leon Adato
Leon Adato16mo 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 Adato16mo ago
Take your time on this (meaning feel free to answer me tomorrow.). I'm packing it in for the night.
ThallesComH
ThallesComH16mo 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 Adato16mo 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
ThallesComH16mo 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 Adato16mo ago
did you mean "consider NOT doing this"?
ThallesComH
ThallesComH16mo ago
any reason on why not doing this?
Leon Adato
Leon Adato16mo ago
Sorry, I wasn't following the threading correclty. I did try that, but got an error. Let me try it again...
ThallesComH
ThallesComH16mo 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 Adato16mo 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 Adato16mo ago
That's why I went down the rabbit hole of CF_SERVER_MOD and/or FTB_SERVER_MOD
ThallesComH
ThallesComH16mo ago
the mod is forge mod, right?
Leon Adato
Leon Adato16mo ago
MTR-forge-1.19.4-3.2.2-hotfix-1.jar
ThallesComH
ThallesComH16mo 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 Adato16mo 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
ThallesComH16mo ago
that's weird, mine worked without any problems
Leon Adato
Leon Adato16mo ago
Let me try your link and see. If that's OK.
ThallesComH
ThallesComH16mo ago
your link doesnt seem to be direct link
Leon Adato
Leon Adato16mo ago
AH
ThallesComH
ThallesComH16mo ago
https://cdn-147.anonfiles.com/IdQfT039z2/376071bf-1690245702/MTR-forge-1.19.4-3.2.2-hotfix-1.jar
Leon Adato
Leon Adato16mo ago
Same error.
Leon Adato
Leon Adato16mo ago
NOW things are getting weird.
ThallesComH
ThallesComH16mo ago
maybe a clean volume would make it work? probably there's some file corrupted in there that is causing problem
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
yeah, the other one is dead
Leon Adato
Leon Adato16mo ago
redeploying COME ON BABY GO!
ThallesComH
ThallesComH16mo ago
poggers
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
it's probably downloading, anonfiles cdn are shit about 500kbp/s
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
🎉 just watch out that the mod is for 1.19.4 and you're on 1.20.1
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
the ip is in the "Ngrok" service
Leon Adato
Leon Adato16mo 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
ThallesComH16mo 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 Adato16mo ago
0.tcp.ngrok.io:13246 internal domain (private networking?) is minecraft-server.railway.internet Let me know before I blow this away.
ThallesComH
ThallesComH16mo ago
i tried to deploy your mod and it requires another mod to work
ThallesComH
ThallesComH16mo ago
btw, let's use discord cdn now
ThallesComH
ThallesComH16mo 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 Adato16mo ago
Just for clarity, the MODS variable is a comma-delimited list?
ThallesComH
ThallesComH16mo ago
yes and by doing that the server works 🎉
Leon Adato
Leon Adato16mo ago
redeploying...
ThallesComH
ThallesComH16mo ago
i'll add a health check later instead of "failing silently"
Leon Adato
Leon Adato16mo 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
ThallesComH16mo ago
send me server logs
Leon Adato
Leon Adato16mo ago
This is more than just this startup, but I can't find the start point for the latest restart:
ThallesComH
ThallesComH16mo ago
try clean installation, should work
Leon Adato
Leon Adato16mo ago
Sounds good. Stay tuned.
ThallesComH
ThallesComH16mo 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 Adato16mo 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