BareGit
# Arch Linux package

Build and install the package from this directory with:

```sh
makepkg -si
```

The package builds the pinned NetHack engine and installs its runtime files
with the server. It does not depend on a separately installed NetHack game.
The build also fetches and statically builds Lua 5.4.9, so it does not need a
system Lua package.
It installs `/etc/nethack-mcp.toml`, creates the `nethack-mcp` service user
through `sysusers.d`, and provides a systemd unit.

Review the configuration and start the service with:

```sh
sudoedit /etc/nethack-mcp.toml
sudo systemctl enable --now nethack-mcp.service
```

The defaults listen on loopback. To publish the service through an HTTPS
reverse proxy, update the public URL and capacity settings in the TOML file.
Configure Apache to accept the intended hostname. You can set
`[server].listen_address` to a Unix socket path and set
`listen_socket_permission = 0o660` for the socket mode. The Apache service
user also needs access to the socket's parent directory. Requests from proxied
clients share the proxy's peer address for per-client limits. Keep the
configured data directory and database path writable by the service account.