Create a server pack from a given Forge, NeoForge, Fabric, LegacyFabric or Quilt Minecraft modpack.
50K+
ServerPackCreator is a Command Line Program(CLI) which aims to create a serverpack for any given modpack, thus making modpack-developing, or at least a part of it, a little less time-consuming. You customize the configuration to your liking and off you go. Whenever you are working on an update to your modpack, you simply run ServerPackCreator and BAM! You've got yourself a serverpack for your new modpack version.
I am making this in my spare time, therefore progress is slow. I also just started getting into Java programming, so expect the code to be of...questionable...quality. If you're a Java Pro and your eyes bulge when looking at my code, by all means, you're welcome to help me improve it in any way, shape, or form. You're also welcome to make contributions, or fork it and make your own version of it. It's LGPL-2.1 License for a reason. Do what you want with it.
Use at your own risk! Be aware that data loss is possible. If you wish to test this, there's a description down below. If you wish to contribute, fork the repository, make your changes, create a pull request and make sure to use conventional commits
-cgenmodpack/saves/world will result in the world being copied to server_pack/worldAfter the first run, ServerPackCreator will generate a couple of template-files in a directory called server_files in the directory the ServerPackCreator.jar resides in.
Inside it are files you can customize, so they suit your modpack and server pack:
If you wish to re-generate the default-files, simply delete any one of the previously mentioned files, run ServerPackCreator again, and a new template-file will be generated in server_files
The initial run of ServerPackCreator will guide you through the generation of a config-file, suited to your needs, step-by-step and then place template-files in a directory called server_files in the same directory where the .jar-file resides in.
The config file will be created in the same directory as ServerPackCreator-x.x.x.jar. An example for a fully configured serverpackcreator.conffile can be viewed here.
Detailed list of all template files:
| File | Description |
|---|---|
| serverpackcreator.conf | Configuration file for customization. See serverpackcreator.conf. |
| server.properties | Configuration file for the Minecraft server. See server.properties. |
| server-icon.png | Icon which is displayed in the server browser in Minecraft. See server-icon.png. |
| start-fabric.bat | Fabric server start script for windows systems. See start-fabric.bat. |
| start-fabric.sh | Fabric server start script for linux systems. See start-fabric.sh. |
| start-forge.bat | Forge server start script for windows systems. See start-forge.bat. |
| start-forge.sh | Forge server start script for linux systems. See start-forge.sh. |
The serverpackcreator.conf file allows you to customize a couple of different things:
| Variable | Description |
|---|---|
| modpackDir | The path to the directory where your modpack resides in. Can also be a combination of CurseForge projectID and fileID. Example for Survive Create Prosper 4, version 4.6.7: 430517,3250155. Specifying said combination would download and install version 4.6.7 of my modpack Survive Create Prosper, gather information, write a new config file and therefor allow you to generate server packs for any modpack on CurseForge. Special thanks to TheRandomLabs and their CurseAPI. |
| clientMods | List of client-side only mods which are to be deleted from the serverpack. You only need to specify the beginning of the filename up, but excluding, the version number. ServerPackCreator checks whether any of the mods which are copied from the modpack to the serverpack start with any strings in this list and, if there's a match, deletes that file from the serverpack. Check out the example for an idea of how it's supposed to look. |
| copyDirs | List for directories which are to be copied to the serverpack. If you specify a world from the saves-directory, ServerPackCreator will copy the the specified world to the base directory of the serverpack. In other words, /saves/MyAwesomeWorld becomes /MyAwesomeWorld. A suggestion-list is created when setting modpackDirto a projectID,fileID-combination. |
| includeServerInstallation | Whether to install a Forge/Fabric server for the serverpack. Must be true or false. |
| javaPath | Path to the Java Installation. On Linux systems use which java to find the location of your Java install. On Windows use where java and exclude the .exe-part. |
| minecraftVersion | The version of Minecraft for which to install the modloader server. The same version of Minecraft your modpack uses. Automaticall set when setting modpackDirto a projectID,fileID-combination. |
| modLoader | Which modloader to install. Must be either "Forge" or "Fabric". The same modloader your modpack ueses. Automatically set when setting modpackDirto a projectID,fileID-combination. |
| modLoaderVersion | Specific Modloader version to install the server in the serverpack. The same version your modpack uses. Automatically set when setting modpackDirto a projectID,fileID-combination. |
| includeServerIcon | Whether to include server-icon.png in your serverpack. Must be true or false. |
| includeServerProperties | Whether to include server.properties in your serverpack. Must be true or false. |
| includeStartScripts | Whether to include start scripts in your serverpack. Must be true or false. |
| includeZipCreation | Whether to create a zip-file of your serverpack, saved in the directory you specified with modpackDir. Must be true or false. |
After checking the configuration, run ServerPackCreator again, and it'll do it's magic.
Guides on how to run ServerPackCreator via commandline are available at:
(macOS guide by whitebear60)
(They're the same, but there's two for redundancies' sake)
Creates a Container which runs Griefed's ServerPackCreator, with lsiobase/alpine as the base image.
The lsiobase/alpine image is a custom base image built with Alpine linux and S6 overlay. Using this image allows us to use the same user/group ids in the container as on the host, making file transfers much easier
| Tags | Description |
|---|---|
latest | Using the latest tag will pull the latest image for linux/amd64,linux/arm/v7,linux/arm64. |
develop | The latest image of, if existent, the in-dev version of this container. Use at your own risk! |
Using GitHub Workflows, images for this container are multi-arch. Simply pulling :latest should retrieve the correct image for your architecture.
Images are available for linux/amd64,linux/arm/v7,linux/arm64.
When running as a docker container, there are a couple more settings you need to be aware of.
| Variable | Description |
|---|---|
| START | What mode the container should start in. Currently, only cont is supported in the docker environment. |
| TZ | The timezone your system operates in. Default "Europe/Berlin" |
| PUID | The userID under which this container is run as. Important for file access and permissions. Run cat /etc/passwd | grep -i $(whoami) to find your userID. |
| PGID | The groupID under which this container is run as. Important for file access and permissions. Run cat /etc/passwd | grep -i $(whoami) to find your groupID. |
| MODPACKDIR | Mount your modpack like this /path/to/your_modpack:data/your_modpack and set MODPACKDIR=/data/your_modpack.If you provide a CurseForge projectID and fileID, mount any folder /path/to/data:/data and set MODPACKDIR=projectID,fileID. |
version: "2"
services:
serverpackcreator:
image: griefed/serverpackcreator:latest
container_name: serverpackcreator
restart: "no"
environment:
- TZ=Europe/Berlin # Your Timezone
- PUID=1000 # Your user ID
- PGID=1000 # Your group ID
- MODPACKDIR # Either path to the modpack directory or CurseForge projectID,fileID combination.
- MODLOADERVERSION # The version of the modlaoder the modpack uses.
- MODLOADER # Either Forge or Fabric
- MINECRAFTVERSION # The Minecraft version the modpack uses.
- INCLUDEZIPCREATION=true # Or false
- INCLUDESTARTSCRIPTS=true # Or false
- INCLUDESERVERPROPERTIES=true # Or false
- INCLUDESERVERINSTALLATION=true # Or false
- INCLUDESERVERICON=true # Or false
- COPYDIRS # Comma-separated. Must be set if MODPACKDIR is a path. Can be empty if MODPACKDIR is a projectID,fileID combination.
- CLIENTMODS # Comma-separated. Client-side mods to delete from server pack.
volumes:
- /host/path/todata:data # Created modpacks and server packs will be here
docker create \
--name=serverpackcreator \
-e TZ=Europe/Berlin `# Your Timezone` \
-e PUID=1000 `# Your user ID` \
-e PGID=1000 `# Your group ID` \
-e MODPACKDIR `# Either path to the modpack directory or CurseForge projectID,fileID combination.` \
-e MODLOADERVERSION `# The version of the modlaoder the modpack uses.` \
-e MODLOADER `# Either Forge or Fabric` \
-e MINECRAFTVERSION `# The Minecraft version the modpack uses.` \
-e INCLUDEZIPCREATION=true `# Or false` \
-e INCLUDESTARTSCRIPTS=true `# Or false` \
-e INCLUDESERVERPROPERTIES=true `# Or false` \
-e INCLUDESERVERINSTALLATION=true `# Or false` \
-e INCLUDESERVERICON=true `# Or false` \
-e COPYDIRS `# Comma-separated. Must be set if MODPACKDIR is a path. Can be empty if MODPACKDIR is a projectID,fileID combination.` \
-e CLIENTMODS `# Comma-separated. Client-side mods to delete from server pack.` \
-v /host/path/todata:data `# Created modpacks and server packs will be here` \
--restart "no" \
griefed/serverpackcreator:latest
Content type
Image
Digest
sha256:a70f1f919…
Size
366.5 MB
Last updated
4 days ago
docker pull griefed/serverpackcreator:9.0.0-beta.1