Skip to content

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)
curl -fsSL https://get.segla.io/agent | sudo bash

What the script does

  1. Detects your architecture (amd64/arm64)
  2. Downloads the binary from GitHub Releases to /usr/local/bin/segla
  3. Creates /etc/segla/config.yaml with sensible defaults (if it doesn't exist)
  4. Installs a systemd unit at /etc/systemd/system/segla.service
  5. Enables and starts the service

Pinned version

curl -fsSL https://get.segla.io/agent | sudo bash -s -- --version v0.1.0

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

systemctl daemon-reload
systemctl enable --now segla

Build from source

git clone https://github.com/segla-dev/agent.git
cd agent
make build-linux

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.