-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide example on how to upload custom modpack/datapack/world files #24
Comments
Or even an additional container, or EC2 instance to be manually started that has the EFS mounted. Brilliant deployment - insanely frustrating to actually configure the game at all. |
@garrettjoecox You'd want to look at https://github.com/itzg/docker-minecraft-server/blob/master/README.md and scroll down to "Running a Forge Server" or equivalent for the mod you want to use. I experimented with this and found that it's nothing short of a pain in the ass. Many mods are tied to specific versions of minecraft/forge/paper/bukkit/whatever and finding the right cocktail of software can be difficult. My recommendation would be to try and get something working locally with the minecraft docker image that creates a world, starts up properly, and lets you connect to it on your computer, and then you can translate those startup commands/variables to this implementation if desired. I'd start with a clean /data folder each time (or just don't mount one, let it run internally) because every time you mess with an option it's going to potentially conflict with existing files. |
Yeah, I played around with those configuration options but those only seem to account for a fresh server, what if I have an existing world, homemade modpack, or datapacks I want to add to the file system? How can I gain access to the file system is probably a clearer way of putting my question. |
Ah, that I can help with. Start here: https://github.com/doctorray117/minecraft-ondemand#usage-and-customization Short answer, one of two options:
|
I'd prefer to go with option 1, as that sounds easier, but I'm afraid I'm running into what @jr298 mentioned. This is likely due to unfamiliarity with AWS networking stuff.. If I boot up an EC2 instance I can ssh into it fine, but if I add it to the minecraft VPC(which seems to be required to mount the EFS) and mount the EFS I can no longer SSH into it. |
In the mean time I'll start making attempts towards option 2! |
For #1, you'd launch an instance in one of the default vpc subnets with "assign public IP" set to enabled. The security group would need to allow you to ssh in, and to reach efs you'd probably have to create an role for the instance and assign the efs policy to it, and follow the mounting instruction shown in the efs console. Easy right? Just kidding. Maybe I'll make a tutorial/quick-start for that. I was also thinking a simple preconfigured container with an sftp relay might be appropriate for this application. |
"Easy right? Just kidding." I ended up removing the security groups and mount group/point? then setting up a group with completely open networking to get into it. Then putting it back as it was. Took far more hours than it should have done (I'm reasonably adept with normal networking/firewalls etc, but AWS is currently a black box in a coal cellar at midnight... and the documentation is like a broken torch. An sftp relay server would be great - simple access for anyone. |
I finally managed to get something working, not sure if I broke something in the process, I had to go into EFS > minecraft-server-stack/FileSystem > Network tab, remove one of the availability zones (all three are on the isolated subnets) and re-add but with a public subnet selected. I was then able to launch an instance that I could ssh into, that also had the EFS mounted at |
I'll have to try when I get home but I think this could be automated with const fileSystem = new efs.FileSystem(this, 'FileSystem', {
vpc,
removalPolicy: RemovalPolicy.SNAPSHOT,
+ vpcSubnets: {
+ subnetType: ec2.SubnetType.PUBLIC
+ }
}); At
|
I'm messing with CDK this weekend to expand the documentation so I'll try to replicate this a bit. Were you able to test your changes? |
This worked for me! Thank you! |
@garrettjoecox as an example of how I manage my own mods - using a public S3 bucket (you can use Cloudfront if you want), and making these options available to your container via URL is the way to go. The advantage of this is you can define your config and your mods outside of the container storage (and blow it away each time if you want), concerning yourself only with world storage persistance. As an example of running a Fabric 1.18.x server with a packwiz modpack, some additional mods not on CurseForge/Modrinth, and custom configuration (inc. whitelist), with the following env vars for the server container: "environment": [
{
"name": "ENFORCE_WHITELIST",
"value": "TRUE"
},
{
"name": "MODCONFIG",
"value": "https://pepsi.dog/minecraft/files/plscraft-s3_config_v4.zip"
},
{
"name": "MODS",
"value": "https://pepsi.dog/minecraft/jar/OpenLoader-fabric-1.18.1-3.0.0.jar,https://ci.opencollab.dev/job/GeyserMC/job/Geyser-Fabric/job/java-1.18/lastSuccessfulBuild/artifact/build/libs/Geyser-Fabric-2.0.0-SNAPSHOT.jar"
},
{
"name": "OVERRIDE_WHITELIST",
"value": "TRUE"
},
{
"name": "PACKWIZ_URL",
"value": "https://pepsidogs.github.io/pepsipack/pack.toml"
},
{
"name": "REMOVE_OLD_MODS",
"value": "TRUE"
},
{
"name": "TYPE",
"value": "FABRIC"
},
{
"name": "VERSION",
"value": "1.18.1"
},
{
"name": "WHITELIST_FILE",
"value": "https://pepsi.dog/minecraft/whitelist.json"
}
] If you want to keep things even simpler, I'd suggest creating your own packwiz pack and hosting it for free via Github Pages - here's an example of my own pack, which contains both server and client side mods, and config (for both the server or client) can be laid down / updated by packwiz. To update mods or config, I just push updates to that repo, and the next time the ECS container starts it'll pull down from that github.io link. |
@Stealthii Thanks for sharing the approach! I like this the idea of managing mods outside of the container storage. I'm fairly new to MC servers, creating modpack and Github page, so have a few questions, hope you don't mind :)
Thanks! |
@yijiazz no problem! Good questions:
|
I am hosting tekkit2 modpack serverless and It's actually pretty simple to do it, and the best part is that you don't even have to use another docker image. Just read the documentation on his Github. |
Hi, of the 3 custom uploads I'm having trouble with world files. I was able to upload world files with the s3/data transfer methods, but then the server crashes with this permission error on startup:
I'm guessing the permissions get overwritten by the sync and the server somehow loses write permissions. Been trying to access the EFS volume by mounting with EC2 as suggested here but still can't get SSH to the machine in the VPC going, even with the public IP set |
Following this approach of moving an endpoint to a public subnet worked for me and I was able to SSH into an ec2 with access to the EFS. There I could indeed confirm that the permissions where broken by the sync:
Fixed by Server works! I'm very happy 😁 |
Several pointers on mounting EFS:
|
I'm trying to get this set up for various worlds/modpacks, and it's not clear to me how to use an existing world, or upload a modpack zip for minecraft-docker to use, or add datapacks to an existing world
The text was updated successfully, but these errors were encountered: