Install on Linux
import { Aside } from ‘@astrojs/starlight/components’;
The Linux sink runs as a systemd service and starts automatically on boot. It supports self-updating — new versions are applied automatically when signalled by the Hub.
Prerequisites
Section titled “Prerequisites”- Linux with systemd (Ubuntu 20.04+, Debian 11+, RHEL 8+, or equivalent)
- Python 3.9 or later
pipandvenvavailable- Network connectivity to the Hub host and port (outbound TCP — no inbound rules needed)
sudoprivileges
Installation
Section titled “Installation”Step 1 — Download and extract
Section titled “Step 1 — Download and extract”Obtain the sink package from your administrator or from your organisation’s release server. Extract it to the installation directory:
sudo mkdir -p /opt/nexomatic-sinksudo tar -xzf nexomatic-sink-linux.tar.gz -C /opt/nexomatic-sinkStep 2 — Create a virtual environment and install dependencies
Section titled “Step 2 — Create a virtual environment and install dependencies”cd /opt/nexomatic-sinksudo python3 -m venv venvsudo venv/bin/pip install -r requirements.txtStep 3 — Create a dedicated service user
Section titled “Step 3 — Create a dedicated service user”Running the service as a dedicated user follows least-privilege best practice:
sudo useradd --system --no-create-home --shell /bin/false nexomaticsudo chown -R nexomatic:nexomatic /opt/nexomatic-sinkStep 4 — Create the systemd unit file
Section titled “Step 4 — Create the systemd unit file”Create /etc/systemd/system/nexomatic-sink.service with the following content. Replace the placeholder values with those provided by your administrator.
[Unit]Description=Nexomatic Linux Sink ServiceAfter=network.target
[Service]Type=simpleUser=nexomaticWorkingDirectory=/opt/nexomatic-sinkExecStart=/opt/nexomatic-sink/venv/bin/python3 /opt/nexomatic-sink/sink_service.pyRestart=alwaysRestartSec=5s
# Connection configurationEnvironment=HUB_HOST=hub.example.comEnvironment=HUB_PORT=50051Environment=CLIENT_ID=LINUX:BASEEnvironment=CLIENT_SECRET=<your-client-secret>
# Tenant pinning (optional — omit to serve all tenants)Environment=TENANT_UUID=<your-tenant-uuid>Environment=TENANT_SECRET=<your-tenant-secret>
# Allow the service to write to its own directory (for updates and logs)ReadWritePaths=/opt/nexomatic-sink
[Install]WantedBy=multi-user.targetStep 5 — Enable and start the service
Section titled “Step 5 — Enable and start the service”sudo systemctl daemon-reloadsudo systemctl enable nexomatic-sinksudo systemctl start nexomatic-sinkStep 6 — Confirm in the UI
Section titled “Step 6 — Confirm in the UI”Check the service is running:
systemctl status nexomatic-sinkWithin a few seconds the sink should appear as ONLINE on the Sinks screen in Nexomatic.
Environment Variables Reference
Section titled “Environment Variables Reference”| Variable | Required | Description |
|---|---|---|
HUB_HOST | Yes | Hub hostname or IP |
HUB_PORT | Yes | Hub port (default 50051) |
CLIENT_ID | Yes | Sink Type name (e.g. LINUX:BASE) |
CLIENT_SECRET | Yes | Client secret for this Sink Type |
TENANT_UUID | No | Pin the sink to a single tenant |
TENANT_SECRET | No | Tenant registration secret |
LOG_FOLDER | No | Override the directory for log files |
Automatic Updates
Section titled “Automatic Updates”When your administrator publishes a new version, the Hub signals the service to update. The service will:
- Finish any in-progress tasks
- Download the new package and extract it over the existing installation
- Run
pip install -r requirements.txtif dependencies changed - Call
sys.exit(0)— systemd’sRestart=alwaysrestarts it with the new code
No manual action is required. The service will be briefly offline during the update.
Managing the Service
Section titled “Managing the Service”# View status and recent logssystemctl status nexomatic-sink
# Follow live logsjournalctl -u nexomatic-sink -f
# Stop / start / restartsudo systemctl stop nexomatic-sinksudo systemctl start nexomatic-sinksudo systemctl restart nexomatic-sinkUninstalling
Section titled “Uninstalling”sudo systemctl stop nexomatic-sinksudo systemctl disable nexomatic-sinksudo rm /etc/systemd/system/nexomatic-sink.servicesudo systemctl daemon-reloadsudo rm -rf /opt/nexomatic-sinksudo userdel nexomaticTroubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| Service fails to start | Python not found or path wrong | Verify which python3 and update ExecStart |
OFFLINE in UI | Cannot reach Hub | Test connectivity: nc -zv hub.example.com 50051 |
| Immediately restarts | Bad credentials | Check journalctl -u nexomatic-sink -n 50 for auth errors |
| Tasks not appearing | Sink Type mismatch | Confirm CLIENT_ID matches the Sink Type in Nexomatic |