gorilator
v1.9.0
Published
One command to install, run, and supervise the Gorilator RPG game server natively (no Docker) as a systemd/launchd service, with an optional Cloudflare Tunnel setup.
Maintainers
Readme
🦍 gorilator
One command to install, run, and supervise the Gorilator RPG
game server natively — no Docker. It clones the game, builds it from source, and registers it as a
boot-persistent OS service (systemd on Linux, launchd on macOS) that you control from anywhere with the
global gorilator command. An optional gorilator setup wires it to a public Cloudflare hostname.
Prefer containers? The repo still ships Docker Compose and a one-click Railway template — see the project's
DEPLOY.md. This CLI is the Docker-free path.
Install
npx gorilator installThis will:
- Check prerequisites (Node ≥ 20.6,
git,pnpm— installing supported missing pieces). - Clone the game to
/opt/gorilator(Linux) or~/.gorilator/app(macOS). pnpm install, build the shared schema, build the same-origin client, and build this CLI.- Generate
.env(server port, monitor credentials, a stable Nostr signing key). - Register and start a service whose main server port serves the client page, WebSocket, monitor, and API (plus an optional direct local client port for convenience).
- Install/refresh the global npm
gorilatorcommand, persist npm's global bin directory onPATHwhen needed, and print the local URLs and monitor credentials.
On a bare box with no Node yet, bootstrap everything with the public single-file installer. On
supported Linux/macOS systems it installs ca-certificates, curl, git, Node, then runs the same
native CLI as npx gorilator install:
curl -fsSL https://raw.githubusercontent.com/agustinkassis/gorilator-rpg/main/packages/cli/install.sh | sudo bashFrom a checked-out repo on Windows, use the Node/Command Prompt wrapper instead of the POSIX shell wrapper:
pnpm gorilator install
.\packages\cli\gorilator.cmd installGo public — gorilator setup
gorilator setupOpens an arrow-key setup menu with categories for server settings, server NSEC, Cloudflare, and
Colyseus/environment settings. Choosing Cloudflare install/update prompts for a base domain and one game
subdomain (default game.<domain>), then:
- Installs & authorizes cloudflared, creates the
gorilator-rpgtunnel, and routes DNS for that host. - Writes an ingress that routes
game.<domain>→ the server port. - Rebuilds the client same-origin (
VITE_SAME_ORIGIN=1) and restarts the daemon — so the page, WebSocket, monitor, and API all share HTTPS/WSS on the same public origin. Setup also disables the optional dedicated local client port, leaving one local game port behind the tunnel. - Runs
cloudflaredas a boot service and prints your public URLs.
Direct: http://host:2567 client + WebSocket ┐ one native process
http://host:8080 optional client page ┘ only with --client-port 8080
Cloudflare ─▶ game.<domain> ─▶ localhost:2567
client page + WebSocket + monitor + APIManage the daemon
gorilator status # service state + health check + local & public URLs (alias: info)
gorilator start # start the service (prints the port it listens on)
gorilator stop # stop the service
gorilator restart # restart the service
gorilator logs # show recent logs; add --follow, --lines, --filter, --since
gorilator update # stop services, git pull, rebuild, start services
gorilator remote # compare local package versions against remote/latest
gorilator setup # interactive setup menu: ports, NSEC, Cloudflare, env
gorilator tunnel <cmd># Cloudflare tunnel — login | status | restart
gorilator plugin <cmd># plugins — list | enable | disable | add <path|npub> (--link)
gorilator uninstall # stop and remove services, config, command, and installed files
gorilator help <cmd> # show detailed help for any commandgorilator uninstall removes the local Gorilator daemon, local tunnel service/config,
install record, global npm command, and installed app directory. Use
--keep-files, --keep-command, or --keep-tunnel to preserve those parts.
Requirements
- Node.js ≥ 20.6 (the runtime that runs
npx/the daemon). - git (to fetch the game source).
- Linux (systemd) or macOS (launchd). Linux uses a system service and may prompt for
sudo; macOS uses a per-user LaunchAgent (nosudo). - Windows can run the checkout/npm wrappers, but the native service installer is still limited to
Linux/macOS. Use WSL/Linux/macOS for
gorilator installservice deployment. - For
setup: a domain on Cloudflare (free plan is fine). No DNS records to pre-create —setupmakes them.
Configuration
gorilator install accepts flags and environment overrides:
| Flag | Env | Default | Meaning |
|------|-----|---------|---------|
| --repo <url> | GORILATOR_REPO | https://github.com/agustinkassis/gorilator-rpg.git | Game source repository |
| --ref <ref> | GORILATOR_REF | main | Branch or tag to deploy |
| --dir <path> | GORILATOR_DIR | /opt/gorilator · ~/.gorilator/app | Where the game is cloned |
| --port <n> | GAME_SERVER_PORT | 2567 | Server port (WebSocket + monitor + API) |
| --client-port <n> | CLIENT_PORT | — | Optional dedicated local port for the client page |
| --yes | GORILATOR_YES=1 | — | Assume "yes" to prompts (non-interactive) |
| --skip-service | — | — | Install/build only; don't register the OS service |
| --skip-tunnel | — | — | Don't offer the Cloudflare setup after install |
| --local-cli <pkg> | GORILATOR_LOCAL_CLI | — | Install the global command from a local path/tarball (testing) |
gorilator setup is interactive by default. It reads GORILATOR_DOMAIN and
GORILATOR_HOST/GORILATOR_GAME_HOST for non-interactive Cloudflare runs. Legacy
GORILATOR_SERVER_HOST/GORILATOR_CLIENT_HOST are accepted as fallbacks.
License
MIT
