💻 Generic Linux Setup

Deploy SeaClip spoke on any Linux machine

Supported Systems

Requirements

Component Minimum Recommended
CPU 1 core 2+ cores
RAM 512 MB 2+ GB
Disk 1 GB 10+ GB
Network HTTP to hub Stable connection

One-Line Install

bash
curl -sSL https://raw.githubusercontent.com/t4tarzan/seaclip/main/scripts/spoke-install.sh | bash -s -- --hub http://YOUR_HUB_IP:51842

Manual Installation

Ubuntu/Debian

bash
# Update system
sudo apt update && sudo apt upgrade -y

# Install dependencies
sudo apt install -y curl git

# Install Node.js 20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install pnpm
sudo npm install -g pnpm

Fedora/RHEL/CentOS

bash
# Update system
sudo dnf update -y

# Install dependencies
sudo dnf install -y curl git

# Install Node.js 20
curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
sudo dnf install -y nodejs

# Install pnpm
sudo npm install -g pnpm

Arch Linux

bash
# Install Node.js and pnpm
sudo pacman -S nodejs npm git
sudo npm install -g pnpm

Clone and Install SeaClip

bash
# Create directory
sudo mkdir -p /opt/seaclip-spoke
sudo chown $USER:$USER /opt/seaclip-spoke

# Clone repository
git clone --depth 1 https://github.com/t4tarzan/seaclip.git /opt/seaclip-spoke
cd /opt/seaclip-spoke

# Install dependencies
pnpm install --filter @seaclip/spoke --filter @seaclip/shared

Configure

bash
cat > /opt/seaclip-spoke/.env << EOF
SEACLIP_HUB_URL=http://YOUR_HUB_IP:51842
SEACLIP_DEVICE_NAME=$(hostname)
SEACLIP_DEVICE_TYPE=generic-linux
SEACLIP_TELEMETRY_INTERVAL=30
EOF

Register with Hub

bash
cd /opt/seaclip-spoke
pnpm spoke register

Set Up Systemd Service

bash
sudo tee /etc/systemd/system/seaclip-spoke.service > /dev/null << 'EOF'
[Unit]
Description=SeaClip Spoke Agent
After=network.target

[Service]
Type=simple
User=$USER
WorkingDirectory=/opt/seaclip-spoke
ExecStart=/usr/bin/node /opt/seaclip-spoke/spoke/dist/index.js
Restart=always
RestartSec=10
Environment=NODE_ENV=production
EnvironmentFile=/opt/seaclip-spoke/.env

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable seaclip-spoke
sudo systemctl start seaclip-spoke

Optional: Install Ollama

bash
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Pull a model
ollama pull llama3

# Add to spoke config
echo "OLLAMA_BASE_URL=http://localhost:11434" >> /opt/seaclip-spoke/.env
sudo systemctl restart seaclip-spoke

WSL2 Setup

For Windows users running WSL2:

powershell — Windows Terminal
# Install WSL2 with Ubuntu
wsl --install -d Ubuntu-22.04

# Enter WSL
wsl

Then follow the Ubuntu installation steps above.

WSL2 Note: Use the WSL2 IP address when registering with the hub. Find it with hostname -I.

Verify Installation

bash
# Check service
sudo systemctl status seaclip-spoke

# View logs
sudo journalctl -u seaclip-spoke -f

# Test hub connection
curl http://YOUR_HUB_IP:51842/api/health

Firewall Configuration

UFW (Ubuntu/Debian)

bash
# Allow outbound to hub
sudo ufw allow out 51842/tcp

# If running Ollama for remote access
sudo ufw allow 11434/tcp

firewalld (Fedora/RHEL)

bash
sudo firewall-cmd --permanent --add-port=11434/tcp
sudo firewall-cmd --reload