Agent binary
Download a release for Linux or macOS. Use linux-arm64, darwin-arm64 or darwin-amd64 for other machines.
VERSION=$(curl -s https://api.github.com/repos/flatrun/agent/releases/latest | grep '"tag_name"' | cut -d'"' -f4 | tr -d 'v')
curl -LO https://github.com/flatrun/agent/releases/download/v$VERSION/flatrun-agent-$VERSION-linux-amd64.tar.gz
tar -xzf flatrun-agent-$VERSION-linux-amd64.tar.gz
sudo mv flatrun-agent /usr/local/bin/
All agent releases
Run as a service
Register the agent with systemd so it starts with the server.
sudo tee /etc/systemd/system/flatrun-agent.service > /dev/null <<EOF
[Unit]
Description=FlatRun Deployment Agent
After=network.target docker.service
Requires=docker.service
[Service]
Type=simple
ExecStart=/usr/local/bin/flatrun-agent --config /etc/flatrun/config.yml
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
sudo mkdir -p /etc/flatrun
sudo systemctl daemon-reload
sudo systemctl enable --now flatrun-agent
Dashboard
Serve a dashboard release with any web server and send /api to the agent.
server {
listen 80;
server_name flatrun.example.com;
root /var/www/flatrun-ui/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://localhost:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Dashboard releases
Build from source
Clone and build the agent or the dashboard yourself.
git clone https://github.com/flatrun/agent.git
cd agent && go build -o flatrun-agent ./cmd/agent
./flatrun-agent --config config.yml
git clone https://github.com/flatrun/ui.git
cd ui && npm install && npm run build
# Serve the dist/ folder with any web server