CLI Usage

Main Help

usage: packinit [-h] [--dest-email DEST_EMAIL] [--source-email SRC_EMAIL]
                 [--mail-server MAIL_SERVER] [--mail-port MAIL_PORT]
                 [--log-level LOG_LEVEL] [--log-dir LOG_DIR]
                 {start} ...

A container friendly startup routine for Packmaker servers.

positional arguments:
  {start}
    start               Starts, stops, and configures a Minecraft instance.

optional arguments:
  -h, --help            show this help message and exit
  --dest-email DEST_EMAIL
                        STRING: The email address to send the backup report to. Defaults to root@localhost.

                        Environment: DEST_EMAIL

  --source-email SRC_EMAIL
                        STRING: The email address to send the backup report from. Defaults to root@2adc7319816f

                        Environment: SRC_EMAIL

  --mail-server MAIL_SERVER
                        STRING: The mail server to use to send mail. Defaults to localhost.

                        Environment: MAIL_SERVER

  --mail-port MAIL_PORT
                        INT: The port on which to connect to the mail server. Defaults to 25.

                        Environment: MAIL_PORT

  --log-level LOG_LEVEL
                        STRING: The logging level, defaults to INFO

                        Environment: LOG_LEVEL

  --log-dir LOG_DIR     STRING: The directory to place logs. Defaults to /var/log/packinit

                        Environment: LOG_DIR

Server Start Help

usage: packinit start [-h] [-x] [-d DIST_DIRS] [-s SERVER_DIR] [-c CACHE]
                       [--java-mem JAVA_MEM] [--fml-confirm FML_CONFIRM]
                       [--minecraft-log-level MINECRAFT_LOG_LEVEL]
                       [--minecraft-log4j-conf MINECRAFT_LOG4J_CONF]
                       [--pack-name PACK_NAME] [--pack-creator PACK_CREATOR]
                       [--server-host SERVER_HOST]
                       [--minecraft-version MINECRAFT_VERSION]
                       [--game-type GAME_TYPE] [--prop-file PROP_FILE]
                       [--motd MOTD] [--server-port SERVER_PORT]
                       [--allow-nether ALLOW_NETHER]
                       [--announce-player-achievements ANNOUNCE_PLAYER_ACHIEVEMENTS]
                       [--enable-command-block ENABLE_COMMAND_BLOCK]
                       [--spawn-animals SPAWN_ANIMALS]
                       [--spawn-monsters SPAWN_MONSTERS]
                       [--spawn-npcs SPAWN_NPCS]
                       [--generate-structures GENERATE_STRUCTURES]
                       [--view-distance VIEW_DISTANCE] [--hardcore HARDCORE]
                       [--max-build-height MAX_BUILD_HEIGHT]
                       [--force-gamemode FORCE_GAMEMODE]
                       [--max-tick-time MAX_TICK_TIME]
                       [--enable-query ENABLE_QUERY] [--query-port QUERY_PORT]
                       [--enable-rcon ENABLE_RCON]
                       [--rcon-password RCON_PASSWORD] [--rcon-port RCON_PORT]
                       [--max-players MAX_PLAYERS]
                       [--max-world-size MAX_WORLD_SIZE]
                       [--level-name LEVEL_NAME] [--level-seed LEVEL_SEED]
                       [--pvp PVP] [--generator-settings GENERATOR_SETTINGS]
                       [--online-mode ONLINE_MODE]
                       [--allow-flight ALLOW_FLIGHT] [--level-type LEVEL_TYPE]
                       [--white-list WHITE_LIST]
                       [--spawn-protection SPAWN_PROTECTION]
                       [--difficulty DIFFICULTY] [--gamemode GAMEMODE]

optional arguments:
  -h, --help            show this help message and exit
  -x, --no-update       BOOLEAN: Disable update of the server directory from the distribution directory. Defaults to false.

                        Environment: NO_UPDATE

  -d DIST_DIRS, --dist DIST_DIRS, --distribution-dir DIST_DIRS
                        STRING: The directory containing the distribution files, like default  server.properties, configs, and as infrequently as possible  (to prevent bloat and legal issues) mods. Defaults to "None". To tell Packmaker  to merge multiple directories, pass this argument multiple times.

                        Environment: DIST
                        Provide a comma seperated list of paths for the environment variable.

  -s SERVER_DIR, --server SERVER_DIR, --server-dir SERVER_DIR
                        STRING: The directory where the server root will be (or is). Defaults to "/server".

                        Environment: SERVER_DIR

  -c CACHE, --cache CACHE, --cache-dir CACHE
                        STRING: The directory containing cached files, often files downloaded by the pack manager process. The cache is used to speed up subsequent server starts so that these files do not need to be downloaded on every start. Defaults to "/tmp/packmaker".

                        Environment: CACHE

  --java-mem JAVA_MEM   STRING: The amount of memory to pass to XMS and XMX for the Minecraft server process. This needs to be at least 4g (or 4090m) for most modded Minecraft servers. Defaults to "4096m".

                        Environment: JAVA_MEM

  --fml-confirm FML_CONFIRM
                        STRING: One of confirm/cancel. Tells FML to go ahead and remove missing blocks, or cancel and exit the game. Defaults to "cancel".

                        Environment: FML_CONFIRM

  --minecraft-log-level MINECRAFT_LOG_LEVEL
                        STRING: The level to set for LOG4J2 verbosity in the Minecraft JVM. Valid values are ALL/DEBUG/INFO/WARN/ERROR/FATAL/OFF/TRACE. Defaults to "warn".

                        Environment: MINECRAFT_LOG_LEVEL

  --minecraft-log4j-conf MINECRAFT_LOG4J_CONF
                        STRING: The path to a custom log4j config file for the Minecraft JVM. May be relative to the Minecraft server directory. Full path is safer. By default, packinit includes a config that allows it to control the log level. Defaults to "/usr/local/lib/python3.7/dist-packages/packinit/extra_files/log4j2.xml".

                        Environment: MINECRAFT_LOG4J_CONF

  --pack-name PACK_NAME
                        STRING: The name of the pack being launched. This is used for the MOTD, if autogenerated. Defaults to "Modded Minecraft".

                        Environment: PACK_NAME

  --pack-creator PACK_CREATOR
                        STRING: The name modpack developer or team. This is used for the MOTD, if autogenerated. Defaults to "Super Modpack Dev".

                        Environment: PACK_CREATOR

  --server-host SERVER_HOST
                        STRING: The name of the admin or team hosting the game. This is used for the MOTD, if autogenerated. Defaults to "Minecraft Admin".

                        Environment: SERVER_HOST

  --minecraft-version MINECRAFT_VERSION
                        STRING: The version of Minecraft the pack is based on. This is used for the MOTD, if autogenerated. Defaults to "Unknown Minecraft Version".

                        Environment: VERSION

  --game-type GAME_TYPE
                        STRING: The game type being played. If this is not specified the PACK_NAME will be used for the MOTD, however server admins can override pack name from server containers that have it set if they are deploying special rules for their game. This is used for the MOTD, if autogenerated. Defaults to "modded".

                        Environment: GAME_TYPE

  --prop-file PROP_FILE
                        STRING: The path to the properties file. Defaults to "/server/server.properties".

                        Environment: PROP_FILE

  --motd MOTD           STRING: The MOTD string. This will disable/override the autogenerated MOTD. Defaults to an autogenerated MOTD based on GAME_TYPE/PACK_NAME, MINECRAFT_VERSION, PACK_CREATOR and SERVER_HOST.

                        Environment: MOTD

  --server-port SERVER_PORT
                        STRING: The port the server will listen on. Defaults to "25565".

                        Environment: SERVER_PORT

  --allow-nether ALLOW_NETHER
                        BOOLEAN: (true/false) Enables the Nether. Defaults to "true".

                        Environment: ALLOW_NETHER

  --announce-player-achievements ANNOUNCE_PLAYER_ACHIEVEMENTS
                        BOOLEAN: (true/false) Enables announcement of player achievements. Defaults to "None".

                        Environment: ANNOUNCE_PLAYER_ACHIEVEMENTS

  --enable-command-block ENABLE_COMMAND_BLOCK
                        BOOLEAN: (true/false) Enables command blocks. Defaults to "false".

                        Environment: ENABLE_COMMAND_BLOCK

  --spawn-animals SPAWN_ANIMALS
                        BOOLEAN: (true/false) Enables the spawning of passive mobs. Defaults to "true".

                        Environment: SPAWN_ANIMALS

  --spawn-monsters SPAWN_MONSTERS
                        BOOLEAN: (true/false) Enables the spawning of hostile mobs. Defaults to "true".

                        Environment: SPAWN_MONSTERS

  --spawn-npcs SPAWN_NPCS
                        BOOLEAN: (true/false) Enables the spawning of NPCs, like villagers. Defaults to "true".

                        Environment: SPAWN_NPCS

  --generate-structures GENERATE_STRUCTURES
                        BOOLEAN: (true/false) Enables the generation of structures, like villages. Defaults to "true".

                        Environment: GENERATE_STRUCTURES

  --view-distance VIEW_DISTANCE
                        INTEGER: The radius of view (in number of chunks) that will be sent to the client. You need to strike a balance between performance and playability here. Defaults to "10".

                        Environment: VIEW_DISTANCE

  --hardcore HARDCORE   BOOLEAN: (true/false) Enables hardcore mode. You die, it's over. Defaults to "false".

                        Environment: HARDCORE

  --max-build-height MAX_BUILD_HEIGHT
                        INTEGER: Sets the max build height. Defaults to "256".

                        Environment: MAX_BUILD_HEIGHT

  --force-gamemode FORCE_GAMEMODE
                        BOOLEAN: (true/false) Forces players to join in the default gamemode. If this is false player's game mode will be preserved between connections. Defaults to "false".

                        Environment: FORCE_GAMEMODE

  --max-tick-time MAX_TICK_TIME
                        INTEGER: (milliseconds) The max amount of time a tick can take to process before it is skipped. Minecraft defaults this to 60000 (or 60 seconds), however packinit sets this to -1 (disabled) to prevent skipped ticks on busy, heavily modded servers as the result of a skipped tick is rubber banding or block lag and will cause all automation to seem to stop. Defaults to "-1".

                        Environment: MAX_TICK_TICK

  --enable-query ENABLE_QUERY
                        BOOLEAN: (true/false) Enables GameSpy4 protocol server listener. Defaults to "false".

                        Environment: ENABLE_QUERY

  --query-port QUERY_PORT
                        INTEGER: The port to list on for GameSpy4. Defaults to "None".

                        Environment: QUERY_PORT

  --enable-rcon ENABLE_RCON
                        BOOLEAN: (true/false) Enables remote access to the server console. Defaults to "false".

                        Environment: ENABLE_RCON

  --rcon-password RCON_PASSWORD
                        STRING: Sets the password for remote console access. Do not expose your RCON port to the internet without a very strong password. Defaults to "None".

                        Environment: RCON_PASSWORD

  --rcon-port RCON_PORT
                        INTEGER: Sets the port to listen on for remote console access. Defaults to "None".

                        Environment: RCON_PORT

  --max-players MAX_PLAYERS
                        INTEGER: Sets the maximum number of players that can be connected at any given time. Defaults to "20".

                        Environment: MAX_PLAYERS

  --max-world-size MAX_WORLD_SIZE
                        INTEGER: Sets the maximum radius in blocks that the world can grown, centered on spawn. Defaults to "15000".

                        Environment: MAX_WORLD_SIZE

  --level-name LEVEL_NAME
                        STRING: Sets the name of the world. Affects the save folder for the overworld in the server directory. Do not change this on an existing world without renaming the world folder. Defaults to "world".

                        Environment: LEVEL_NAME

  --level-seed LEVEL_SEED
                        INTEGER: Sets the seed for map generation. Defaults to "".

                        Environment: LEVEL_SEED

  --pvp PVP             BOOLEAN: (true/false) Enables PVP mode. Defaults to "true".

                        Environment: PVP

  --generator-settings GENERATOR_SETTINGS
                        STRING: The settings used to customize world generation. Enter a JSON formatted string. See https://tinyurl.com/y54aaft7 for guidelines. Defaults to "".

                        Environment: GENERATOR_SETTINGS

  --online-mode ONLINE_MODE
                        BOOLEAN: (true/false) Enables Minecraft login for the server. Defaults to "true".

                        Environment: ONLINE_MODE

  --allow-flight ALLOW_FLIGHT
                        BOOLEAN: (true/false) Enables flight. Defaults to "true".

                        Environment: ALLOW_FLIGHT

  --level-type LEVEL_TYPE
                        STRING: (DEFAULT/FLAT/etc.. Mods can add more.) Select the level type for mapgen. Defaults to "DEFAULT".

                        Environment: LEVEL_TYPE

  --white-list WHITE_LIST
                        BOOLEAN: (true/false) Enables white list mode. Anyone not on the white list will have their connection rejected. Defaults to "false".

                        Environment: WHITE_LIST

  --spawn-protection SPAWN_PROTECTION
                        INTEGER: Sets the area to protect around the spawn block. The spawn block is always protected. Defaults to "0".

                        Environment: SPAWN_PROTECTION

  --difficulty DIFFICULTY
                        INTEGER: (0: peacful, 1: easy, 2: normal, 3: hard) Sets the difficulty level. Defaults to "2".

                        Environment: DIFFICULTY

  --gamemode GAMEMODE   INTEGER: (0: survival, 1: creative, 2: adventure, 3: spectator) Sets the game mode. Defaults to "0".

                        Environment: GAMEMODE