Skip to content

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.


  • Linux with systemd (Ubuntu 20.04+, Debian 11+, RHEL 8+, or equivalent)
  • Python 3.9 or later
  • pip and venv available
  • Network connectivity to the Hub host and port (outbound TCP — no inbound rules needed)
  • sudo privileges

Obtain the sink package from your administrator or from your organisation’s release server. Extract it to the installation directory:

Terminal window
sudo mkdir -p /opt/nexomatic-sink
sudo tar -xzf nexomatic-sink-linux.tar.gz -C /opt/nexomatic-sink

Step 2 — Create a virtual environment and install dependencies

Section titled “Step 2 — Create a virtual environment and install dependencies”
Terminal window
cd /opt/nexomatic-sink
sudo python3 -m venv venv
sudo venv/bin/pip install -r requirements.txt

Step 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:

Terminal window
sudo useradd --system --no-create-home --shell /bin/false nexomatic
sudo chown -R nexomatic:nexomatic /opt/nexomatic-sink

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 Service
After=network.target
[Service]
Type=simple
User=nexomatic
WorkingDirectory=/opt/nexomatic-sink
ExecStart=/opt/nexomatic-sink/venv/bin/python3 /opt/nexomatic-sink/sink_service.py
Restart=always
RestartSec=5s
# Connection configuration
Environment=HUB_HOST=hub.example.com
Environment=HUB_PORT=50051
Environment=CLIENT_ID=LINUX:BASE
Environment=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.target
Terminal window
sudo systemctl daemon-reload
sudo systemctl enable nexomatic-sink
sudo systemctl start nexomatic-sink

Check the service is running:

Terminal window
systemctl status nexomatic-sink

Within a few seconds the sink should appear as ONLINE on the Sinks screen in Nexomatic.


VariableRequiredDescription
HUB_HOSTYesHub hostname or IP
HUB_PORTYesHub port (default 50051)
CLIENT_IDYesSink Type name (e.g. LINUX:BASE)
CLIENT_SECRETYesClient secret for this Sink Type
TENANT_UUIDNoPin the sink to a single tenant
TENANT_SECRETNoTenant registration secret
LOG_FOLDERNoOverride the directory for log files

When your administrator publishes a new version, the Hub signals the service to update. The service will:

  1. Finish any in-progress tasks
  2. Download the new package and extract it over the existing installation
  3. Run pip install -r requirements.txt if dependencies changed
  4. Call sys.exit(0) — systemd’s Restart=always restarts it with the new code

No manual action is required. The service will be briefly offline during the update.


Terminal window
# View status and recent logs
systemctl status nexomatic-sink
# Follow live logs
journalctl -u nexomatic-sink -f
# Stop / start / restart
sudo systemctl stop nexomatic-sink
sudo systemctl start nexomatic-sink
sudo systemctl restart nexomatic-sink

Terminal window
sudo systemctl stop nexomatic-sink
sudo systemctl disable nexomatic-sink
sudo rm /etc/systemd/system/nexomatic-sink.service
sudo systemctl daemon-reload
sudo rm -rf /opt/nexomatic-sink
sudo userdel nexomatic

SymptomLikely causeFix
Service fails to startPython not found or path wrongVerify which python3 and update ExecStart
OFFLINE in UICannot reach HubTest connectivity: nc -zv hub.example.com 50051
Immediately restartsBad credentialsCheck journalctl -u nexomatic-sink -n 50 for auth errors
Tasks not appearingSink Type mismatchConfirm CLIENT_ID matches the Sink Type in Nexomatic