Prerequisites
- Node.js available at
/usr/bin/node systemdfor service managementopensslfor key generation
Steps
1
Copy the application file
Copy the script to your system binaries directory:
2
Set up the config file
Copy the config template and lock down its permissions:
3
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:4
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
5
Verify it's running
Check the service status:You should see
active (running) in the output. The API will be listening on http://0.0.0.0:6767.