Running as a Service
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.json2. Create a dedicated service user
sudo useradd --system --no-create-home --shell /usr/sbin/nologin maxmind-proxy
sudo chown root:maxmind-proxy /etc/maxmind-api-proxy/config.json3. Create the unit file
4. Enable and start
5. Reload after config changes
macOS — launchd
1. Place the binary and config
2. Create the plist
3. Load the service
Docker
Last updated