Giter VIP home page Giter VIP logo

docker-rcon-web-admin's Introduction

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
  1. Create minecraft container with --network rcon and --network-alias=mc
  2. 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

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

  • RWA_PASSWORD : required to be set for the initial user (by default admin) password
  • RWA_RCON_HOST : should be set to the Minecraft server's hostname, such as the service name in a Docker Compose deployment

VOLUMEs

  • /opt/rcon-web-admin/db

PORTs

  • 4326 : web UI
  • 4327 : websocket access from UI

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:

docker-rcon-web-admin's People

Contributors

itzg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-rcon-web-admin's Issues

Unable to use behind proxy.

I'm using the Docker-compose but modified so that the ports are not exposed, I did not want to expose the ports on the network unencrypted, so I set up a nginx proxy with letsencrypt.
On the proxy I send traffic from port 443 to http://dockername:4326
I can get to the admin page with no issues but it does not seem to want to connect to the socket.
I have a suspicion that the actual webbrowser attempts to connect instead of internal in the docker container. Is there a way to configure it to connect internally or do I need to expose the port outside the continer?

404 error

on your readme:

"simply download/modify this docker-compose.yml" --> 404, file not found

Switch to @lacaulac's fork

@brainfoolong has discontinued the project, it was handed over to @lacaulac

I reckon it may be a good idea to pull down and maintain a downstream fork of lacaulac's code specifically for this container. This would be ideal for implementing environment variable configuration options, for example.

Works for me

Just want to say that this actually works for me with latest itzg/minecraft-server (26.4.2024) so not sure if this project should be deprecated.

Make Ports dynamic

Hello,
I want to run multiple servers with this webrcon interface and so I need to change the ports which is no problem but the webinterface expects the Backend to still listen at Port 4327 so it can not connect to the websocket at 4327. Maybe you can make this dynamic so I can specify the new Port with an env-variable

Having trouble connecting to the rcon

Hello,

I have a minecraft server running in a docker container and I can't connect to it via this tool.
Screenshot from 2021-05-20 18-59-48

I've checked the other issues and tried what I could, but no success.

My docker-compose for the server is:

version: "3.8"

services:
  minecraft-server:
    image: "itzg/minecraft-server:multiarch-latest"
    container_name: "mc-pi"
    ports:
      - "25565:25565"
      - "4711:4711"
    volumes:
      - "~/mc/data:/data"
    networks:
      - Minecraft
    environment:
      EULA: "true"
      ENABLE_RCON: "true"
      RCON_PASSWORD: "sabin"
      RCON_PORT: 25575
      TYPE: "PURPUR"
      VERSION: "1.16.5"
      PURPUR_BUILD: "LATEST"
      MEMORY: "1000m"
    tty: true
    stdin_open: true
    restart: always

volumes:
  mc:

networks:
  Minecraft:

And the docker-compose for the rcon is:

version: "3.8"

services:
  web:
    image: itzg/rcon
    environment:
      RWA_USERNAME: admin
      RWA_PASSWORD: sabin
      RWA_ADMIN: "TRUE"
      RWA_RCON_HOST: minecraft-server
      RWA_RCON_PASSWORD: sabin
    ports:
      - 4326:4326
      - 4327:4327
    networks:
      - other

networks:
  other:
    external: true
    name: mc_default

The folder structure is as follows:

.
├── mc
│   ├── data
│   ├── docker-compose.yml
└── rcon
    └── docker-compose.yml

Also the docker network:

docker network ls
NETWORK ID     NAME              DRIVER    SCOPE
3330c2b424c3   bridge            bridge    local
403bf6ad6186   host              host      local
f4a2d89db847   mc_Minecraft      bridge    local
a7593566ae8d   mc_default        bridge    local
a78b132a0a4a   none              null      local
66d83ced9f93   web               bridge    local
CONTAINER ID   IMAGE                                    COMMAND                  CREATED          STATUS                    PORTS                                                                                                 NAMES
481df532f24d   itzg/rcon                                "/usr/local/bin/node…"   14 minutes ago   Up 14 minutes             0.0.0.0:4326-4327->4326-4327/tcp, :::4326-4327->4326-4327/tcp                                         rcon_web_1
5167a15b7446   itzg/minecraft-server:multiarch-latest   "/start"                 18 minutes ago   Up 18 minutes (healthy)   0.0.0.0:4711->4711/tcp, :::4711->4711/tcp, 0.0.0.0:25565->25565/tcp, :::25565->25565/tcp, 25575/tcp   mc-pi

I've also tried using only one docker-compose file, same results:

version: "3.8"

services:
  minecraft-server:
    image: "itzg/minecraft-server:multiarch-latest"
    container_name: "mc-pi"
    ports:
      - "25565:25565"
      - "4711:4711"
    volumes:
      - "~/mc/data:/data"
#    networks:
#      - Minecraft
    environment:
      EULA: "true"
      ENABLE_RCON: "true"
      RCON_PASSWORD: "sabin"
      RCON_PORT: 25575
      TYPE: "PURPUR"
      VERSION: "1.16.5"
      PURPUR_BUILD: "LATEST"
      MEMORY: "1000m"
    tty: true
    stdin_open: true
    restart: always
  web:
    image: itzg/rcon
    environment:
      RWA_USERNAME: admin
      RWA_PASSWORD: admin
      RWA_ADMIN: "TRUE"
      # is referring to the hostname of 'mc' compose service below
      RWA_RCON_HOST: minecraft-server
      # needs to match the password configured for the container, which is 'minecraft' by default
      RWA_RCON_PASSWORD: sabin
    ports:
      - 4326:4326
      - 4327:4327

volumes:
  mc:

Any help is much appreciated! Thanks in advance!

Adding multiple servers automatically?

Is it possible to configure multiple servers from the docker-compose file?
I would like to configure multiple servers and would like to add them automagically.

No work

I cant run and dont see errors in log, I want a rust server rcon.

Can not get RCON to connect to server

I'm new to docker and have managed to install a Creative and Survival server. I'm trying to RCON the Survival server, but connection is always refused.
I have enabled RCON in the server.properties file using port 25566 with rcon.port=25576
and RCON is starting successfully.

I am attempting to run this command from terminal to setup rcon-web:
docker run -d --name rcon-web -p 4326:4326 -p 4327:4327 -e RWA_PASSWORD=guipassword -e RWA_RCON_PASSWORD=minecraft -e RWA_RCON_PORT=25576 -e RWA_RCON_HOST=127.0.0.1 -e RWA_SERVER_NAME=mc2survival itzg/rcon

When checking the logs in portainer for rcon-web, I see:
2021-03-18T15:18:54.475Z RconServer [127.0.0.1:25576]: Connection failed

and error in the GUI of:
The current selected server is not available anymore. Maybe gone offline?

Can anybody help with this, I've spent a day on it! My Daughter needs op'ing and I'm getting it in the neck :-)
Thanks

update to new version 13.2

It seems like dockerhub don't detect when upstream releases a new zip file. Would it be possible to force build a new version of this repo on dockerhub.

Maybe setup somekind of way to detect new version upstream?

thanks in advance.

linux/arm64 support

Hi, I tested recon-web-admin with the current Dockerfile.
It works without problems, please add it to Docker Hub.
Thanks

Connect to server run on a different Docker network

On my Docker installation I had already 2 Minecraft servers using your image before I installed this rcon image. So I made it in a completely different docker-compose file so it is not connected directly with the server as in your example.
So there I tried instead of giving it the container name of the server, to type out the server IP address, which apparently did not work (it cannot find the server). Is there any workaround to this without me inserting the image into both docker-compose files for both my servers? I want to keep all of it in one web interface.
I will attach my docker-compose file below. Thanks in advance!

version: '3'
services:
web:
image: itzg/rcon
environment:
RWA_USERNAME: admin
RWA_PASSWORD: obviouslyremovedtheoriginal
RWA_ADMIN: "TRUE"
RWA_RCON_HOST: mc.mbms.me
RWA_RCON_PASSWORD: obviouslyremovedtheoriginaltoo
ports:
- 4326:4326
- 4327:4327

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.