holysoles / ginrcon

A simple HTTP REST API to proxy RCON commands to a game server
MIT License
3 stars 0 forks source link
docker go http palworld rcon rest

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