GoKeyless Service Setup and Initialization

This section describes the creation of a systemd service for the GoKeyless server and the steps required to start, enable, and verify the service. Configuring GoKeyless as a system service ensures it runs consistently and starts automatically during system boot.

  1. Create systemd service for GoKeyless.

sudo nano /usr/lib/systemd/system/gokeyless.service

Add the following configuration:

[Unit]
Description=gokeyless daemon
After=network.target

[Service]
Type=simple
User=gokeyless
Group=gokeyless
WorkingDirectory=/etc/keyless
ExecStart=/usr/bin/gokeyless

[Install]
WantedBy=multi-user.target
  1. Reload systemd configuration.

sudo systemctl daemon-reexec
sudo systemctl daemon-reload
  1. Enable and start the GoKeyless service.

sudo systemctl enable gokeyless
sudo systemctl start gokeyless
  1. Verify service status.

sudo systemctl status gokeyless
image-20260610-075355.png

Monitoring GoKeyless daemon status