Sign inSign up

noevidenz/multipaper-master

By noevidenz

•Updated about 2 years ago

Image
0

4.2K

noevidenz/multipaper-master repository overview

⁠MultiPaper Docker

Build from Releases Build Image (edge)

MultiPaper Docker⁠ automatically compiles the latest commit from the official MultiPaper repository and publishes the images to Docker Hub.

⁠Images

⁠Version Tags

All versions are built nightly at midnight AEST.

TagSupported ArchitecturesDescription
edgeamd64, arm64, arm/v7Built nightly using the latest commit on main from the official MultiPaper⁠ repository

Warning: This version is not built from an official release and may be unstable
1.20amd64, arm64, arm/v7Built using the release from the 1.20 family
1.19amd64, arm64, arm/v7Built using the release from the 1.19 family
1.18amd64, arm64, arm/v7Built using the release from the 1.18 family

Warning: This version is outdated and may not contain the latest security and stability features
latestamd64, arm64, arm/v7Deprecated tag. Previously an alias for 1.19, but removed to prevent accidentally updating people's worlds from 1.19 to 1.20.

⁠Usage

⁠Directories

The MultiPaper-Master service requires a directory be mounted to /app. This is the directory where all shared files will be stored, including world files.

Create a directory (eg master) and mount it to the /app directory in the MultiPaper-Master container. (See the examples below)

If you have existing world files you want to use, place them in this directory before starting the MultiPaper-Master container.

Create the following docker-compose.yaml file, then simply run docker-compose up -d to launch the servers.

(Note: The multipaperMasterAddress variable uses the service name master as a host name instead of specifying an IP address.)

---
version: "3"

services:

  master:
    container_name: master
    image: noevidenz/multipaper-master:1.20
    ports:
      - 25565:25565 # Opens the proxy port
    volumes:
      - ./master:/app # Required to access world files
  
  server:
    image: noevidenz/multipaper:1.20
    environment:
      - EULA=true # Setting this to true will automatically accept the Minecraft EULA upon launch
      - JAVA_TOOL_OPTIONS=-Xmx1G
        -DmultipaperMasterAddress=master:35353 
        -Dspigot.settings.bungeecord=true
⁠Docker CLI
# Start the MultiPaper-Master container
docker run -d \
    --name=multipaper-master 
    -p 25565:25565 
    -v $(pwd)/master:/app
    noevidenz/multipaper-master

# Start the MultiPaper server container
docker run -d \
    -e EULA=true \
    -e JAVA_TOOL_OPTIONS="-Xmx1G -DmultipaperMasterAddress=multipaper-master:35353" \
    noevidenz/multipaper [server_opts]

⁠Configuring the Server

MultiPaper provides support for updating the server configuration files files via system properties provided to the java command. You can see an example of this in the JAVA_TOOL_OPTIONS environment variable above.

See the MultiPaper docs regarding Command line options⁠ for more information.

Configuration should be done via the method above whenever possible to ensure server containers are disposable.

If you require direct access to the server files, you can attach a volume to the /app directory before launching the container.

⁠Parameters

⁠MultiPaper-Master
ParameterFunction
-p 25565:25565Opens the port to the proxy
-p 35353:35353Opens the port to the MultiPaper Master server
-v ./master:/appDirectory containing World files and other synced files
(Only required if Multipaper servers are connecting from outside the network)
⁠MultiPaper Server
ParameterFunction
-p 25565:25565Optional. Only required if connecting to a Master server outside of the network
-e EULA=trueSpecifies that the EULA has been accepted. Required for the server to launch
-e JAVA_TOOL_OPTIONS="..."Sets the environment variable to pass options into Java at runtime
[server_opts]Optional parameters sent to the multipaper.jar (Default value: --max-players=30)

⁠Updating

⁠Docker Compose
# Pull the updated images
docker-compose pull

# Update the containers
docker-compose up -d
⁠Docker CLI
# Pull the updated images
docker pull noevidenz/multipaper-master:1.20
docker pull noevidenz/multipaper:1.20

# List running containers
docker ps | grep multipaper

# Stop the master container
docker stop multipaper-master
docker rm multipaper-master

# Also stop any running server containers
docker stop [container-name]
docker rm [container-name]

You can now recreate the servers using the commands from the Usage⁠ section.

⁠Building locally

If you want to customise the images:

# Clone the repository
git clone [email protected]:noevidenz/multipaper-docker.git

cd multipaper-docker

# Build the MultiPaper-Master image
docker build --target master -t multipaper-master .
# Build the Multipaper server image
docker build --target server -t multipaper .

⁠Troubleshooting

⁠World files are not being generated by the server

On many systems the Docker daemon runs as root. If the directories being mounted to your containers don't exist, they will be created by Docker.

MultiPaper processes within these containers do not run as the root user and therefore may be unable to write files into any directories created by the Docker daemon.

If you find that your generated world files are not being synced to the master directory, please ensure that the directory is not owned by root.

Alternatively, you may add the following line to the master service to specify that application processes should run as root inside the container.

  master:
    container_name: master
    image: noevidenz/multipaper-master:1.20
    user: root # this line sets the user inside the container
    ports:
      - 25565:25565 # Opens the proxy port
    volumes:
      - ./master:/app # Required to access world files

Tag summary

Content type

Image

Digest

sha256:fada9a093…

Size

96.9 MB

Last updated

about 3 years ago

docker pull noevidenz/multipaper-master