IMPORTANT: The KygekTeam PM4 Docker image has been disabled. Please use the official PocketMine-MP Docker image instead.
Hosts the files used to build kygekteam/pocketmine-mp-4 Docker image.
Head over to Docker Hub to view the kygekteam/pocketmine-mp-4 Docker image repository.
Docker lets you install software more easily by "copying the whole machine over". To use Docker, you must be on a Linux/MacOS machine. (Docker also works on Windows, but trying to run Linux containers on Windows usually creates more problems than it solves)
To install Docker, refer to the official Docker docs.
(If you prefer a more technical reference, there is a Reference section below)
(You do NOT need to clone this repo to install PM4-Docker)
(Although this is an ELI5, you still need to know how to run commands on a Linux/MacOS machine and already have Docker installed)
First, create the directories data and plugins somewhere to store the server data:
mkdir data plugins
Set the owner of these directories to user of UID 1000.
Docker containers identify file owners using the UID,
so if your current user is coincidentally also UID 1000 (you can check this with echo $UID),
this operation might do nothing.
Otherwise, you might need root access to change the owner of a directory:
sudo chown -R 1000:1000 data plugins
data will store the server data, and plugins will store the server plugins.
You can install plugins inside the plugins directory before starting the server.
Now you can run PM4-Docker with the following command:
docker run -it -p 19132:19132/udp -v $PWD/data:/data -v $PWD/plugins:/plugins kygekteam/pocketmine-mp-4
Do NOT change the server port in server.properties.
If you want to open the server on another port (e.g. 12345 instead),
change the 19132:19132/udp above to 12345:19132/udp.
(The second number is ALWAYS 19132)
To run the server in the background, simply change -it to -itd in the last command above.
This will run the server in the background even if you closed console. (No need to screen/tmux anymore!)
When you run this command, it will display the container name that runs the server,
e.g. admiring_boyd, bold_kilby, or other random names.
To open the console, run the following command:
docker attach container_name
To leave the console, just press Ctrl p Ctrl q.
Alternatively, use docker logs container_name to view the console output without getting stuck in the console.
This section is the technical reference for users who already know how to use Docker.
/datais a read-write data directory where PocketMine stores all data in. This includes PocketMine config files, player data, worlds and plugin config files/data./pluginsis a read-only data directory where PocketMine loads plugins from. However, if thePOCKETMINE_PLUGINSenvironment variable is set, the default start command may try to manage the plugins inside.
$POCKETMINE_PLUGINSis the list of plugins in the formatPluginOne:1.2.3 PluginTwo:4.5.6. The version part (:4.5.6) can be omitted. The default start command will check if these plugins are loaded (by checking if/plugins/PluginName.pharexists, so if it has a different name, it will attempt to download again), and download missing plugins from Poggit.
The default start script is located at /usr/bin/start-pocketmine.
It validates the permissions of /data and /plugins,
downloads plugins for $POCKETMINE_PLUGINS,
then runs the server.
The PHP binaries are located at /usr/php.
A symlink at /usr/bin/php points to the PHP executable there.
(PHP_BINARY will still report that it is installed in /usr/php/bin/php)
The server directory is located at /pocketmine.
This directory should only contain a PocketMine-MP.phar file,
and shall be the working directory of the server unless changed by plugins.
/pocketmine is also the home directory of the default user pocketmine.
Unlike early pmmp/pocketmine-mp images, this default user is no longer a sudoer,
so plugins cannot acquire root access under normal circumstances.
- Clone this GitHub repository using the following command:
$ git clone https://github.com/KygekTeam/PM4-Docker- Change directory to the cloned PM4-Docker GitHub repository:
$ cd PM4-Docker- Run
docker buildand wait until the build has finished:
$ docker build -t pocketmine-mp-4 pocketmine-mpCurrently, this image does not support building from local PocketMine-MP source directories
and always uses a tree from pmmp/PocketMine-MP on GitHub.
However, this can be easily changed by simply changing the git clone command.
This GitHub repository was forked from pmmp's PocketMine-Docker GitHub repository. This GitHub repository has been modified by KygekTeam to build PocketMine-MP 4 instead of PocketMine-MP 3.
You can contribute, suggest or report an issue by submitting pull requests or issues in this GitHub repository, which will be reviewed by KygekTeam staffs. Should you need assistance from our team, please join the KygekTeam Discord server.
All credits goes to pmmp, as the original repository developers.