This document describes how to deploy the SeaweedFS telemetry server to a remote server using GitHub Actions, or via Docker.
A remote Linux server with:
GitHub repository secrets configured (see Setup GitHub Secrets below):
TELEMETRY_SSH_PRIVATE_KEY: SSH private key for accessing the remote serverTELEMETRY_HOST: Remote server hostname or IP addressTELEMETRY_USER: Username for SSH accessBefore using the deployment workflow, you need to configure the required secrets in your GitHub repository.
On your local machine, generate a new SSH key pair specifically for deployment:
# Generate a new SSH key pair
ssh-keygen -t ed25519 -C "seaweedfs-telemetry-deploy" -f ~/.ssh/seaweedfs_telemetry_deploy
# This creates two files:
# ~/.ssh/seaweedfs_telemetry_deploy (private key)
# ~/.ssh/seaweedfs_telemetry_deploy.pub (public key)
Copy the public key to your remote server:
# Copy public key to remote server
ssh-copy-id -i ~/.ssh/seaweedfs_telemetry_deploy.pub user@your-server.com
# Or manually append to authorized_keys
cat ~/.ssh/seaweedfs_telemetry_deploy.pub | ssh user@your-server.com "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Test the SSH connection:
# Test SSH connection with the new key
ssh -i ~/.ssh/seaweedfs_telemetry_deploy user@your-server.com "echo 'SSH connection successful'"
# Display the private key content
cat ~/.ssh/seaweedfs_telemetry_deploy
TELEMETRY_SSH_PRIVATE_KEY-----BEGIN OPENSSH PRIVATE KEY----- and -----END OPENSSH PRIVATE KEY----- linesTELEMETRY_HOSTtelemetry.example.com or 192.168.1.100)TELEMETRY_USERubuntu, deploy, or your username)Create a simple test workflow or manually trigger the deployment to verify the secrets are working correctly.
If you're setting up a new server, here's a basic configuration:
# On the remote server, create a dedicated user for deployment
sudo useradd -m -s /bin/bash seaweedfs-deploy
sudo usermod -aG sudo seaweedfs-deploy # Only if sudo access is needed
# Switch to the deployment user
sudo su - seaweedfs-deploy
# Create SSH directory
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# Add your public key (paste the content of seaweedfs_telemetry_deploy.pub)
nano ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
# Test SSH connection manually
ssh -i ~/.ssh/seaweedfs_telemetry_deploy -v user@your-server.com
# Check SSH key permissions
ls -la ~/.ssh/seaweedfs_telemetry_deploy*
# Should show: -rw------- for private key, -rw-r--r-- for public key
The deployment workflow (.github/workflows/deploy_telemetry.yml) provides two main operations:
Run this once to set up the remote server:
This will:
Note: The setup only prepares the infrastructure. You need to run a deployment afterward to install and start the telemetry server.
To deploy updates, manually trigger deployment:
You can build and run the telemetry server using Docker locally or on a remote host.
Using Docker Compose (recommended):
docker compose -f telemetry/docker-compose.yml build telemetry-server
Using docker build directly (from the repository root):
docker build -t seaweedfs-telemetry \
-f telemetry/server/Dockerfile \
.
With Docker Compose:
docker compose -f telemetry/docker-compose.yml up -d telemetry-server
With docker run:
docker run -d --name telemetry-server \
-p 8080:8080 \
seaweedfs-telemetry
Notes:
8080 inside the container. Map it with -p <host_port>:8080.docker run -d -p 8353:8080 seaweedfs-telemetry -port=8353 -dashboard=false.After setup, the remote server will have:
~/seaweedfs-telemetry/
├── bin/
│ └── telemetry-server # Binary executable
├── logs/
│ ├── telemetry.log # Application logs
│ └── telemetry.error.log # Error logs
├── data/ # Data directory (if needed)
├── grafana-dashboard.json # Grafana dashboard configuration
└── prometheus.yml # Prometheus configuration
The telemetry server runs as a systemd service:
# Check service status
sudo systemctl status telemetry.service
# View logs
sudo journalctl -u telemetry.service -f
# Restart service
sudo systemctl restart telemetry.service
# Stop/start service
sudo systemctl stop telemetry.service
sudo systemctl start telemetry.service
After deployment, the telemetry server will be available at (default ports shown; adjust if you override with -port):
Docker default: 8080
http://your-server:8080http://your-server:8080/api/*http://your-server:8080/metricshttp://your-server:8080/healthSystemd example (if you configured a different port, e.g. 8353):
http://your-server:8353http://your-server:8353/api/*http://your-server:8353/metricshttp://your-server:8353/healthUpdate /etc/prometheus/prometheus.yml to include:
scrape_configs:
- job_name: 'seaweedfs-telemetry'
static_configs:
- targets: ['localhost:8353']
metrics_path: '/metrics'
~/seaweedfs-telemetry/grafana-dashboard.jsonssh user@hostsudo journalctl -u telemetry.servicels -la ~/seaweedfs-telemetry/bin/~/seaweedfs-telemetry/bin/telemetry-server -helpIf port 8353 is already in use:
sudo systemctl edit telemetry.serviceAdd override configuration:
[Service]
ExecStart=
ExecStart=/home/user/seaweedfs-telemetry/bin/telemetry-server -port=8354
Reload and restart: sudo systemctl daemon-reload && sudo systemctl restart telemetry.service
Monitor the deployment and service health:
sudo journalctl -u telemetry.servicetail -f ~/seaweedfs-telemetry/logs/telemetry.logcurl http://localhost:8353/healthcurl http://localhost:8353/metrics