systemd service
This guide explains how to configure and manage the gosuki daemon using systemd. It covers setting up the service file, enabling and starting the service, and configuring debug levels.
1. Service File Configuration
Create a systemd service file at ~/.config/systemd/user/gosuki.service with the following content:
[Unit]
Description=gosuki bookmark manager daemon
[Service]
Environment="GOSUKI_DEBUG=info"
ExecStart=%h/projects/gosuki/gosuki/build/gosuki start \
--listen 0.0.0.0:20254 \
--p2p-listen 0.0.0.0:2026
TimeoutStartSec=10
# PIDFile is not required for foreground daemon (legacy)
# PIDFile=%t/gosuki.pid
[Install]
WantedBy=basic.targetReplace the path with your actual gosuki binary location (e.g.
$GOPATH/bin/gosuki,/usr/local/bin/gosuki).
- Make sure to start the service without the
--tuiflag.
Note
Gosuki supports systray mode. If D-Bus session bus is unavailable, systray is automatically skipped.
2. Enable and Start the Service
After creating the service file, enable and start it using the following commands:
# Enable the service (starts on boot)
systemctl --user enable gosuki
# Start the service immediately
systemctl --user start gosuki
# Check the status
systemctl --user status gosuki3. Log Level Configuration
A leveled logging system is available with --debug={trace,debug,info,warn,error,fatal,none}
You can control the log level in several ways:
- Command-line flag: Use the
--debug=<level>flag when starting the service (e.g., adding it to theExecStartline in the service file). - Environment variable: Set the
GOSUKI_DEBUG=<level>environment variable.
Set log level per subsystem
--debug=<global-level>,<unit>=<level>,<unit2>=<level>,...
- Use
gosuki --debug=listto list available log levels and subsystems.
example:
gosuki --debug=info,chrome=debug,firefox=noneThis guide covers Linux systemd. For Windows and BSD, see the Quickstart guide.