itzg / docker-rcon-web-admin

A Docker image that runs rcon-web-admin
MIT License
92 stars 18 forks source link
docker-image rcon rcon-client web-app

Docker Pulls

This image lets you run the rcon-web-admin administration tool as a Docker container. A great benefit of running rcon-web-admin in Docker, especially in a Docker Composition is that the RCON port of your game server can remain securely isolated within the Docker network.

Getting Started

To get up and running quickly, it is best use Docker Compose with a docker-compose.yml such as:

version: '3.3'

services:
  web:
    image: itzg/rcon
    environment:
      RWA_USERNAME: admin
      RWA_PASSWORD: admin
      RWA_ADMIN: "TRUE"
      # is referring to the service name 'mc' declared below
      RWA_RCON_HOST: mc
      # needs to match the password configured for the container, see RCON_PASSWORD below
      RWA_RCON_PASSWORD: "changethis!"
    ports:
      - "4326:4326"
      - "4327:4327"
  mc:
    image: itzg/minecraft-server
    ports:
      - "25565:25565"
      # DO NOT expose rcon port 25575 here
    environment:
      EULA: "TRUE"
      RCON_PASSWORD: "changethis!"

To manually create containers with docker runs, which is not recommended:

  1. Create a user network
    docker network create rcon
  2. Create minecraft container with --network rcon and --network-alias=mc
  3. Create rcon-web container with --network rcon, -e RWA_RCON_HOST=mc
docker run -d --name rcon-web --network rcon \
  -p 4326:4326 -p 4327:4327 \
  -e RWA_PASSWORD=password \
  itzg/rcon

With that you can follow the regular instructions and access the web UI at http://YOUR_DOCKER_HOST:4326

Options

Environment Variables

RWA_ENV is preset to "TRUE" in this image, so all of the environment variables described in rcon-web-admin are available for use.

VOLUMEs

PORTs

Examples

Running with itzg/minecraft-server

To run this with the itzg/minecraft-server image, simply download/modify this docker-compose.yml and then use docker-compose or docker stack deploy -c to bring up the composition.

With that particular composition, configure a new server as shown here (with an RCON password of "testing")

With the server configured, go to the Dashboard and pick the server "minecraft". The following shows adding a "Console" widget and running the "help" command against Minecraft: