Installation¶
System requirements¶
| Requirement | Details |
|---|---|
| OS | Linux |
| Architecture | amd64, arm64 |
| Privileges | Root (for WireGuard and systemd) |
| Network | Outbound access to gw.segla.io:443 |
| Port | UDP 51821 (WireGuard, inbound from peers) |
One-line install (recommended)¶
What the script does¶
- Detects your architecture (amd64/arm64)
- Downloads the binary from GitHub Releases to
/usr/local/bin/segla - Creates
/etc/segla/config.yamlwith sensible defaults (if it doesn't exist) - Installs a systemd unit at
/etc/systemd/system/segla.service - Enables and starts the service
Pinned version¶
Manual install¶
1. Download the binary¶
Grab the latest release from GitHub Releases:
# amd64
curl -fsSL -o /usr/local/bin/segla \
https://github.com/segla-dev/agent/releases/latest/download/segla-linux-amd64
# arm64
curl -fsSL -o /usr/local/bin/segla \
https://github.com/segla-dev/agent/releases/latest/download/segla-linux-arm64
chmod +x /usr/local/bin/segla
2. Create config¶
mkdir -p /etc/segla
cat > /etc/segla/config.yaml <<'EOF'
api_addr: gw.segla.io:443
interval: 30s
log_level: info
log_format: json
EOF
3. Create systemd service¶
cat > /etc/systemd/system/segla.service <<'EOF'
[Unit]
Description=Segla Agent
Documentation=https://docs.segla.dev
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/segla run --config /etc/segla/config.yaml
Restart=on-failure
RestartSec=5s
RuntimeDirectory=segla
StateDirectory=segla
# Security hardening
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
ReadWritePaths=/var/lib/segla /var/run/segla
# WireGuard requires NET_ADMIN and NET_RAW
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
[Install]
WantedBy=multi-user.target
EOF
4. Start the service¶
Build from source¶
Binaries will be output as segla-linux-amd64 and segla-linux-arm64.
Uninstall¶
systemctl stop segla
systemctl disable segla
rm /etc/systemd/system/segla.service
systemctl daemon-reload
rm /usr/local/bin/segla
rm -rf /etc/segla /var/lib/segla /var/run/segla
Warning
Uninstalling will tear down any active WireGuard interfaces managed by the agent.