Creating a Pterodactyl supported game server is fairly straight forward. I've run into some issues when building modded servers from a “pre-built” package, which is why these notes are so detailed. Adjust to fit your pack and version accordingly.
I'll be using All the Mods 8 for this guide.
In Pterodactyl Panel, create a new server.
Set the following config:
**We will be using the Skip Egg Install Script option, so nothing will be installed by Pterodactyl - the MC/Forge versions don't actually matter, but we'll set them to the correct version for the sake of consistency.
<mc-version>-<forge-version>
)Create the server. The installer will download the specified version Docker image for Java.
SFTP into the new server (info on the Settings tab) - you should have an empty directory.
Upload the modpack files (since this is a fresh installation, copy everything to the server).
Change the file permissions (recusively) of all directories/files to allow the Owner and Group execute privileges. (754)
Depending on the modpack, you may be provided a startup script. ATM8 comes with an in-depth startup script, so we simply tell Pterodactyl to use that:
./startserver.sh
I generally add a chmod
to the beginning of the startup script to handle file permissions.
#!/bin/sh
chmod 754 * -R
.....
In other cases, we might want/need to define the whole startup command:
java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f libraries/net/minecraftforge/forge/1.19.2-43.2.14/unix_args.txt ]] || printf %s "@libraries/net/minecraftforge/forge/1.19.2-43.2.14/unix_args.txt" )
**Notice that the server jar file variable is not included. When running above Forge v1.7, as long as the jar file has not been moved from its installation location (same as the unix_args.txt
file), it will be detected without defining its location.