The server and its settings#
What mciwb start makes#
mciwb start runs the itzg/minecraft-server container image with
Podman. The server’s files, the world among them, are in ~/mciwb-server
on your machine, so they outlive the container. The server is set up for
building:
a normal world with the seed 0, so every new world is the same, with its spawn point moved to a flat place at x 632, y 73, z -1658;
creative mode, with no protected area around the spawn point;
RCON on port 20100 and the game on port 20101;
it keeps running when nobody is in the game, so that water flows, sand falls and redstone works while a script builds.
To change anything else, edit ~/mciwb-server/server.properties and
restart the server with mciwb stop then mciwb start.
The options of mciwb start (--port, the password, --folder and
--minecraft-version) only take effect when it makes the server’s
container. mciwb stop removes the container, so while it exists
mciwb start starts it with the settings that it was made with, and warns
about any options that differ. Run mciwb stop first to change them.
The RCON password#
mciwb talks to the server over RCON, which needs a password. mciwb start
sets the server’s password, and the other commands (run, shell,
backup, restore and render) must use the same one. Every one of
these commands takes the password from the first of these that is given:
--password PASSWORD(or--passwd) on the command line;--password-file FILE(or--passwd-file): the first line of FILE;the
MCIWB_PASSWORDenvironment variable;default_pass.
The default is fine for a server that only you can reach. To choose your
own password, put it in a file that only you can read, or set
MCIWB_PASSWORD in your shell:
echo 'my_password' > ~/.mciwb-password
chmod 600 ~/.mciwb-password
mciwb start --password-file ~/.mciwb-password
mciwb run build.py --password-file ~/.mciwb-password
export MCIWB_PASSWORD='my_password'
mciwb start
mciwb run build.py
Warning
Avoid --password: any user on the same computer can read a command
line, for example with ps. It still works, for compatibility.
mciwb never prints or logs the password, even with --debug.
A script that makes its own connection, rather than using the world of
mciwb run, gets the same default: Iwb() uses MCIWB_PASSWORD if it
is set, otherwise default_pass. It does not read a password file, so pass
any other password yourself: Iwb(passwd=my_password).
Minecraft version#
mciwb start runs the Minecraft Java Edition release that this version of
mciwb was tested with, currently 26.3. This is the release that the
Item list of block names comes from.
Your Minecraft client must run the same release as the server. If the Minecraft Launcher’s “Latest release” is newer, add an installation for release 26.3 in the Launcher’s “Installations” tab and play with that.
To run a different release, pass it to mciwb start after a mciwb
stop, which removes the server’s container:
mciwb stop
mciwb start --minecraft-version 26.3
The world is upgraded when a newer release opens it. Worlds cannot be downgraded, so take a backup first (see Back up and restore).
A server that mciwb did not start#
mciwb run and mciwb shell only need RCON, so they work with any
Java Edition server: give them --server, --port and the password
(see Run a server). What differs is everything that uses the server’s files:
mciwb start,stopandrestoremanage a Podman container on this machine, and nothing else.mciwb backupzips the world folder of a server on this machine: give it--folderand the server’s RCON--port.Renders read blocks from the world’s files when they can, which is fast, and over RCON otherwise, which is limited to 32768 blocks at a time. In a script, point mciwb at the files if they are on this machine:
from pathlib import Path world.world_folder = Path("/my/server/world")