How To
Configuring System Service
Configure Sink as a system service that starts automatically on login
This guide explains how to configure Sink as a system service so it starts automatically on login.
- Linux: systemd user service
- macOS: launchctl user agent
Install the Service
sink service install
On Linux, you will be prompted whether to enable loginctl linger
(allows the service to run without an active login session).
After installation, the service file locations are:
- Linux:
~/.config/systemd/user/sink.service - macOS:
~/Library/LaunchAgents/com.sink.server.plist
Enable and Start
Linux:
# Equivalent to systemctl --user enable --now sink.service
sink service enable --now
macOS: service install already loads and starts the service
automatically via launchctl bootstrap. The --now flag has no effect
on macOS. Run the following command to verify the status:
sink service status
Routine Operations
sink service status # Check status
sink service stop # Stop
sink service start # Start
sink service restart # Restart
sink service disable # Disable autostart (keeps service files)
sink service uninstall # Uninstall (stops, disables, and removes service files)
On Linux, you can also use systemctl directly:
systemctl --user status sink
systemctl --user restart sink
Troubleshooting
Gateway port is in use
lsof -i :5000 # Check which process is using port 5000
Modify the port in ~/.sink/gateway.json, or specify it at startup:
sink gateway start --port 8080