For the complete documentation index, see llms.txt. This page is also available as Markdown.

Running as a Service

For production use, run maxmind-api-proxy as a managed system service so that it starts automatically on boot and restarts on failure.


Linux — systemd

1. Place the binary and config

# Copy the binary
sudo cp maxmind-api-proxy /usr/local/bin/maxmind-api-proxy
sudo chmod 755 /usr/local/bin/maxmind-api-proxy

# Create a config directory and copy the config
sudo mkdir -p /etc/maxmind-api-proxy
sudo cp my-config.json /etc/maxmind-api-proxy/config.json

# Restrict config permissions (contains credentials)
sudo chmod 600 /etc/maxmind-api-proxy/config.json

2. Create a dedicated service user

Running the proxy as a non-root user limits the blast radius if it is ever compromised.

sudo useradd --system --no-create-home --shell /usr/sbin/nologin maxmind-proxy
sudo chown root:maxmind-proxy /etc/maxmind-api-proxy/config.json

If using TLS with Let's Encrypt, the service user also needs read access to the certificate files:

3. Create the unit file

Create /etc/systemd/system/maxmind-api-proxy.service:

4. Enable and start

5. Reload after config changes

The proxy reads its config only at startup. After editing the config file, restart the service:


macOS — launchd

1. Place the binary and config

2. Create the plist

Create /Library/LaunchDaemons/io.k9.maxmind-api-proxy.plist:

3. Load the service


Docker

A minimal Dockerfile for containerised deployments:

Build and run:

For configuration management in Docker, mount the config file as a volume rather than baking it into the image:

Last updated