DevLens – Binary + Systemd Setup
This guide shows how to install the three DevLens components (app, agent, AI) from the binary releases and run each as a systemd service on a single host.
Prerequisites • A Linux distribution with
systemd(Ubuntu, Debian, CentOS, RHEL, etc.) •curl/wgetfor downloading files •tarfor extracting archivesSupported OSes – see the release page: https://source.rdctd.de/devlens/releases
1. Prepare the host
Create a dedicated user and directories:
sudo useradd -r -s /usr/sbin/nologin devlens
sudo mkdir -p /opt/devlens
sudo chown devlens:devlens /opt/devlens
The data directory (where the DB, logs and retention data live) should be writable by that user:
sudo mkdir -p /var/lib/devlens
sudo chown devlens:devlens /var/lib/devlens
2. Download and install the binaries
Step 1 – Grab the latest release Replace
<VERSION>with the tag you want to use (1.2.3,latest, …).
VERSION=latest
curl -L "https://source.rdctd.de/devlens/releases/devlens-${VERSION}.tar.gz" | \
tar -xz -C /opt/devlens
The archive contains:
/opt/devlens/
├─ app
├─ agent
├─ ai
└─ README.md
Make sure each binary is executable:
sudo chmod 755 /opt/devlens/{app,agent,ai}
3. Write systemd unit files
Create three unit files under /etc/systemd/system/:
3.1 devlens-app.service
[Unit]
Description=DevLens App – UI & alert dispatcher
After=network.target
[Service]
User=devlens
Group=devlens
WorkingDirectory=/opt/devlens
ExecStart=/opt/devlens/app -config=/var/lib/devlens/devlens.toml
Restart=on-failure
[Install]
WantedBy=multi-user.target
3.2 devlens-agent.service
[Unit]
Description=DevLens Agent – host telemetry collector
After=network.target
[Service]
User=devlens
Group=devlens
WorkingDirectory=/opt/devlens
ExecStart=/opt/devlens/agent -config=/var/lib/devlens/devlens.toml
Restart=on-failure
[Install]
WantedBy=multi-user.target
4.3 devlens-ai.service
[Unit]
Description=DevLens AI – LLM-based fix suggestions
After=network.target
[Service]
User=devlens
Group=devlens
WorkingDirectory=/opt/devlens
ExecStart=/opt/devlens/ai -config=/var/lib/devlens/devlens.toml
Restart=on-failure
[Install]
WantedBy=multi-user.target
4. Enable and start the services
sudo systemctl daemon-reload
sudo systemctl enable devlens-app
sudo systemctl enable devlens-agent
sudo systemctl enable devlens-ai
sudo systemctl start devlens-app
sudo systemctl start devlens-agent
sudo systemctl start devlens-ai
Verify everything is running:
systemctl status devlens-{app,agent,ai}
You should see each service in the active (running) state.
Open a browser to http://<host-ip>:8000 – the DevLens UI should be live.
5. Updating to a new version
-
Stop the services
bash sudo systemctl stop devlens-{app,agent,ai} -
Download & replace the binaries (step 2, but use the new
<VERSION>). -
Start the services again
bash sudo systemctl start devlens-{app,agent,ai} -
Check logs
bash journalctl -u devlens-app -f
7. Cleaning up
To remove the services and data:
sudo systemctl stop devlens-{app,agent,ai}
sudo systemctl disable devlens-{app,agent,ai}
sudo rm /etc/systemd/system/devlens-*.service
sudo systemctl daemon-reload
# Optional: delete binaries and data
sudo rm -rf /opt/devlens
sudo rm -rf /var/lib/devlens
Quick Recap
| Step | Action |
|---|---|
| 1 | Create devlens user & directories |
| 2 | Download and unpack binaries to /opt/devlens |
| 3 | Write devlens.toml in /var/lib/devlens |
| 4 | Add systemd unit files (devlens-app, devlens-agent, devlens-ai) |
| 5 | Enable/start services with systemctl |
| 6 | Verify UI at :8000 |
| 7 | Update by downloading new binaries & restarting services |