Prerequisites
- Node.js available at
/usr/bin/node systemdfor service managementopensslfor key generation
Steps
Generate an API key
Generate a secure 32-byte hex string:Open the config file in a text editor and replace The config file format is:
REPLACE_WITH_YOUR_SECRET_KEY with the generated string:Install the systemd service
Before copying, open Then copy the unit file, reload systemd, and enable the service so it starts on boot:
poplock-api.service and update the User and Group fields to match the system user that owns the Minecraft server directory:poplock-api.service