No description
  • Go 92.3%
  • Dockerfile 7.7%
Find a file
2026-05-02 12:21:23 -05:00
.github/workflows chore: feb patching 2026-02-25 22:03:58 -06:00
.gitignore chore: feb patching 2026-02-25 22:03:58 -06:00
compose.yaml more context for compose 2024-08-26 01:40:47 +00:00
Dockerfile chore: bump dependencies 2026-05-02 12:21:23 -05:00
go.mod chore: bump dependencies 2026-05-02 12:21:23 -05:00
go.sum chore: bump dependencies 2026-05-02 12:21:23 -05:00
LICENSE Initial commit 2024-02-06 00:38:56 -06:00
main.go return earlier when rcon connection invalid 2024-03-26 02:15:06 +00:00
rcon_helpers.go reinit default con each request 2024-02-11 19:41:48 +00:00
README.md Update README.md 2024-02-17 09:42:29 -06:00

GinRCON

A lightweight, simple Go webserver build on Gin to provide a REST API frontend to sending RCON commands to a game server. Available in a Docker image, see the packages page for this repo.

API Call Examples

Send command to default RCON server

Assuming you have a default RCON server specified (see environment variables)

curl --location 'http://localhost:8080/command' \
--header 'Content-Type: application/json' \
--data '{
    "command": "Save"
}'

POST command to specific RCON server

curl --location 'http://localhost:8080/command' \
--header 'Content-Type: application/json' \
--data '{
    "server": "gameserver:25575",
    "password": "1234",
    "command": "Save"
}'

Health check the status of the webserver

curl --location 'http://localhost:8080/status'

Docker

Image

A docker image that runs this application is available under the repo packages, or at ghcr.io/holysoles/ginrcon.

Environment Variables

  • PORT: Optional, override the port (default 8080) of the webserver within the container
  • TRUSTED_PROXIES: Optional, set specified trusted proxy addresses
  • RCON_SERVER: Optional, configure a default RCON server's hostname
  • RCON_PORT: Optional, configure a default RCON server's port
  • RCON_ADMIN_PASSWORD: Optional, configure the password to a default RCON server

Compose

An example compose file can be found in the repo here

Building

docker build --tag ghcr.io/holysoles/ginrcon:<tag> .

Testing

docker run --rm -d -p 8080:8081 -e "PORT=8081" ghcr.io/holysoles/ginrcon:<tag>

Upload

docker push ghcr.io/holysoles/ginrcon:<tag>

Credits

Special thanks to the following projects for providing essential libraries: