.onedev-buildspec.yml Loading last commit info...
scripts
.gitattributes
Dockerfile
LICENSE
README.md
README.md

🪐 Planetary Minecraft Java Server

PSM container image for Minecraft Java. It provides tight integration with the PSM API.

Secure by Default

All PSM servers are secure by default. This means that ALLOW_LIST is set to true by default. To play on the server you must add users to the ALLOW_LIST_MEMBERS environment variable (see below).

You can disable this by setting ALLOW_LIST to false, but this is not recommended as anyone will be able to join your server.

Auto Updates

Automatic updates are turned on by default. This will ensure the container always downloads the latest server version every time it starts. If you would like to stay on your current version and disable auto updates, set AUTO_UPDATE to false.

Note: AUTO_UPDATE must be set to true for the first run of the container, otherwise no server will be downloaded.

World Backups

Enable Backups

Automatic backups are turned off by default. To utilize automatic backups, you will need to do the following:

  • Set the BACKUPS environment variable to true.
  • Map the /backups volume to your host.

If you would rather do your own backups manually, your (live) world is contained in the /server/$LEVEL_NAME folder. I highly recommend stopping your server before saving to avoid world corruption.

How Backups Work

If BACKUPS is set to true, then each time the container is run, it will automatically create a backup of your WORLD_NAME in the /backups folder. Each backup will be appended with the date and time (%Y-%m-%d_%H-%M-%S format).

Example: If your world is called "planetary-minecraft-server", and the map is saved on January 2nd, 2024 at exactly 3:45am, the backup will be called "planetary-minecraft-server-20204-01-02_03-45-00".

Volumes

⚠️ Important: It is highly recommended that you map these volumes to your host machine. Otherwise all save data and configuration will be lost when the container is deleted/updated.

PathDescription
/serverThis contains all your server files including configuration, worlds, and the server binary itself.
/backupsThis contains all world backups (if they are enabled). See World Backups for more information.

Environment Variables

These environment variables map directly to the settings in the server.properties file.

Common

Note Most of this information is from the Minecraft Wiki. You may want to check there for more up-to-date information.

VariablePossible ValuesDefault ValueNotes
ALLOW_LISTboolean (true, false)trueIf set to true, only users in the whitelist.json file will be allowed to connect. It changes both white-list and enforce-whitelist in the server. properties. See ALLOW_LIST_MEMBERS below for adding members to this list.

Note: Ops are automatically whitelisted, and there is no need to add them to the whitelist.

This is a generalized variable that all PSM containers share.
ALLOW_LIST_MEMBERSstring (see Notes for formatting)nullList of members to be added to whitelist.json file. Member names must be listed, separated by commas
Example:
ALLOW_LIST_MEMBERS="username1,username2,username3"
✨ This container will automatically populate user UUIDs from the Minecraft API.

This is a generalized variable that all PSM containers share.
AUTO_UPDATEboolean (true, false)trueSee Auto Updates.
BACKUPSboolean (true, false)falseSee World Backups.
DIFFICULTYpeaceful, easy, normal, hardeasyThe difficulty (such as damage dealt by mobs and the way hunger and poison affects players) of the server.
If a legacy difficulty number is specified, it is silently converted to a difficulty name.
peaceful (0)
easy (1)
normal (2)
hard (3)
GAMEMODEsurvival, creative, adventure, spectatorsurvivalThe default game mode.
If a legacy game mode number is specified, it is silently converted to a game mode name.
survival (0)
creative (1)
adventure (2)
spectator (3)
LEVEL_NAMEany string"planetary-minecraft-server"The world name and the world directory path.
If a directory at this path exists and is a valid world, it will be loaded by the server. If it doesn't exist or is not a valid world, the server will generate a new world in this directory, creating the directory and it's parents if necessary, and will use the provided value as its name.
LEVEL_SEEDany stringnullUse to randomize the world. If left empty, a seed is chosen at random.
MAX_PLAYERSany 32-bit iteger10The maximum number of players that can be connected to the server at the same time.
MOTDany string"Deployed using the Planetary Server Manager"The message displayed in the server list of the client, below the server name.
The MOTD supports color and formatting codes.
The MOTD supports non-ASCII characters, such as "♥".
If the MOTD is over 59 characters, the server list may report a communication error.

Advanced

The following environment variables can also be set to modify the server.properties file. Please see the Minecraft Wiki for more information on these properties.

VariableDefault Value
ACCEPTS_TRANSFERSfalse
ALLOW_FLIGHTfalse
ALLOW_NETHERtrue
BROADCAST_CONSOLE_TO_OPStrue
BROADCAST_RCON_TO_OPStrue
BUG_REPORT_LINK""
ENABLE_COMMAND_BLOCKfalse
ENABLE_JMX_MONITORINGfalse
ENABLE_QUERYfalse
ENABLE_RCONfalse
ENABLE_STATUStrue
ENFORCE_SECURE_PROFILEtrue
ENTITY_BROADCAST_RANGE_PERCENTAGE"100"
FORCE_GAMEMODEfalse
FUNCTION_PERMISSION_LEVEL2
GENERATE_STRUCTUREStrue
GENERATOR_SETTINGS"{}"
HARDCOREfalse
HIDE_ONLINE_PLAYERSfalse
INITIAL_DISABLED_PACKS""
INITIAL_ENABLED_PACKS"vanilla"
LEVEL_TYPE"minecraft
LOG_IPStrue
MAX_CHAINED_NEIGHBOR_UPDATES"1000000"
MAX_TICK_TIME"60000"
NETWORK_COMPRESSION_THRESHOLD"256"
ONLINE_MODEtrue
OP_PERMISSION_LEVEL"4"
PAUSE_WHEN_EMPTY_SECONDS"60"
PLAYER_IDLE_TIMEOUT"0"
PREVENT_PROXY_CONNECTIONSfalse
PVPtrue
QUERY_PORT"25565"
RATE_LIMIT"0"
RCON_PASSWORD""
RCON_PORT"25575"
REGION_FILE_COMPRESSION"deflate"
REQUIRE_RESOURCE_PACKfalse
RESOURCE_PACK""
RESOURCE_PACK_ID""
RESOURCE_PACK_PROMPT""
RESOURCE_PACK_SHA1""
SERVER_IP""
SERVER_PORT"25565"
SIMULATION_DISTANCE"10"
SPAWN_MONSTERStrue
SPAWN_PROTECTION"16"
SYNC_CHUNK_WRITEStrue
TEXT_FILTERING_CONFIG""
TEXT_FILTERING_VERSION"0"
USE_NATIVE_TRANSPORTtrue
VIEW_DISTANCE10
Please wait...
Page is in error, reload to recover