Skip to content

D3strukt0r/docker-bungeecord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

docker-bungeecord

Use the BungeeCord Proxy as a Docker App.

Project

License Docker Stars Docker Pulls

master-branch (alias stable, latest)

GH Action CI/CD Codacy grade

Getting Started

These instructions will cover usage information and for the docker container

Prerequisities

In order to run this container you'll need docker installed.

Usage

Using Docker

Starting a server
docker run \
    --rm \
    -d \
    -p 25565:25577 \
    -v $(pwd)/bungeecord:/app \
    -e JAVA_MAX_MEMORY=1G \
    -e <other variables> \
    --name bungeecord \
    d3strukt0r/bungeecord

--rm: Removes the container after it has been shut down. This means we can reuse the name later on.

-d: Start detached. Or leave out to watch the logs. You can then leave using CTRL + D

-p 25565:25577: This opens the internal port (inside the container) to the outer worlds. You can open as many ports as you want. This would maybe look like -p 25565:25577 -p 8192:8192.

-v $(pwd)/bungeecord:/app: If you want to save your server somewhere, you need to link the directory inside your container to your host. Before the colon goes the place on your host. After the colon goes the directory inside the container, which is always /app.

-e JAVA_MAX_MEMORY=1G: This is the equivalent of -Xmx1G. For the required amount of RAM you will need, please consult Google.

--name bungeecord: Give the container a name, for easier referencing later on.

d3strukt0r/bungeecord: This is the repository where the container is maintained. You can also specify what version you want to use. e. g. d3strukt0r/bungeecord:latest or d3strukt0r/bungeecord:548. For all versions check the Tags on Docker Hub.

Reading the logs

While running you can access the output with docker logs -f <container name> and leave with CTRL + Q.

-f: To not just output the logs until now, but keep reading, until we exit with CTRL + D. This will not close the server, you'll just leave the logs.

Sending commands

To send a command through the console to BungeeCord, use docker exec <container name> console "<command>".

Replace <command> with the command you need. This is what you would also usually enter inside your regular console, like e. g. op D3strukt0r.

Stopping the server

At the end to shut everything down use docker stop <container name>

Using Docker Compose (docker-compose.yml)

Create a file called docker-compose.yml

version: "2"

services:
  bungeecord:
    image: d3strukt0r/bungeecord
    ports:
      - 25565:25577
    networks:
      - internal
    dns:
      - 1.1.1.1
      - 1.0.0.1
    volumes:
      - ./bungeecord:/app
    environment:
      - JAVA_MAX_MEMORY=512M
  lobby:
    image: d3strukt0r/spigot
    networks:
      - internal
    dns:
      - 1.1.1.1
      - 1.0.0.1
    volumes:
      - ./lobby:/app
    environment:
      - JAVA_MAX_MEMORY=1G
      - EULA=true
      - BUNGEECORD=true

networks:
  internal:
    external: false

To be able to access the minecraft servers, you need to set the correct address in your config.yml. The address basically is the name of the container. The port is the one that is configured under server.properties inside Spigot (by default 25565). With the example above, this would for example look like:

...
servers:
  lobby:
    motd: '&1Lobby'
    address: lobby_1:25565
    restricted: false
...

Also IP needs to be forwared:

...
ip_forward: true
...
Compose: Starting a server

To start the server use docker-compose up or docker-compose up -d for starting detached (in the background). When running without -d, you can still detach with CTRL + P followed by CTRL + Q.

Compose: Reading the logs

While running you can access the output with docker-compose logs -f and leave with CTRL + Q.

Compose: Sending commands

To send a command through the console to BungeeCord, use docker-compose exex <container name> console "<command>".

Compose: Stopping the server

At the end to shut everything down use docker-compose down

Environment Variables

All environment variables support Docker Secrets. To learn more about Docker Secrets, read here.

Basically, after creating a secret, append a _FILE (e. g. JAVA_OPTIONS_FILE) after the environment variable and set the path to something like /run/secrets/<something>.

  • JAVA_MEMORY - The memory java can use. Any integer followed by K (Kilobyte), M (Megabyte) or G (Gigabyte) (Default: 512M)
  • JAVA_BASE_MEMORY - The memory java can use at startup. Any integer followed by K (Kilobyte), M (Megabyte) or G (Gigabyte) (Default: ${JAVA_MEMORY})
  • JAVA_MAX_MEMORY - The maximum memory the application can use. Recommended is 512M for each 500 users. Any integer followed by K (Kilobyte), M (Megabyte) or G (Gigabyte) (Default: ${JAVA_MEMORY})
  • JAVA_OPTIONS - Any java argument (Default: )

Volumes

  • /app - All the data, like: configs, plugins, logs, icons

Useful File Locations

  • /usr/local/bin/console - Can send a command to BungeeCord indirectly

Built With

Find Us

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

There is no versioning in this project. Only the develop for nightly builds, and the master branch which builds latest and all minecraft versions.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.txt file for details

Acknowledgments

About

BungeeCord in a Docker container

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published