Skip to main content

SecureTransfer remote agent — receives and executes file transfer instructions from the platform

Project description

st-agent — SecureTransfer Remote Agent

Lightweight daemon that runs on destination servers. It connects to the SecureTransfer platform via SSE, receives transfer instructions, and executes them using rsync/rclone.

Install

From wheel (air-gapped / no internet)

# On the build machine (has internet):
cd st-agent
pip install build
python -m build          # creates dist/st_agent-0.1.0-py3-none-any.whl

# Copy the wheel to the remote server, then:
pip install st_agent-0.1.0-py3-none-any.whl

From Git (direct)

pip install "git+https://github.com/sachin-techstax/sync_system.git#subdirectory=st-agent"

From source

git clone https://github.com/sachin-techstax/sync_system.git
cd sync_system/st-agent
pip install .

Prerequisites on remote server

  • Python 3.10+
  • rsync (for Linux-to-Linux transfers)
  • rclone (optional, for cloud transfers)
# Ubuntu/Debian
sudo apt install -y rsync python3 python3-pip

# RHEL/CentOS
sudo yum install -y rsync python3 python3-pip

Usage

1. Register with the platform

st-agent register \
  --url http://<platform-ip>:6212 \
  --api-key <your-api-key> \
  --name "server-prod-01"

This generates an RSA keypair, registers with the platform, and saves config to ~/.st-agent/.

2. Start the agent

st-agent start

The agent will:

  • Connect to the platform via SSE (Server-Sent Events)
  • Send heartbeats every 15 seconds
  • Execute transfer instructions (rsync, rclone)
  • Report progress back to the platform in real-time

3. Run as a systemd service (recommended)

sudo tee /etc/systemd/system/st-agent.service << 'EOF'
[Unit]
Description=SecureTransfer Agent
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/st-agent start
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now st-agent
sudo systemctl status st-agent

4. Check status

st-agent status

Configuration

Config is stored in ~/.st-agent/config.json after registration. The agent also stores its RSA keypair in ~/.st-agent/.

Architecture

Platform (hub)                    Remote Server
┌──────────────┐    SSE stream    ┌──────────────┐
│  FastAPI      │ ───────────────▸│  st-agent     │
│  /api/agents  │                 │  daemon       │
│               │◂─── heartbeat ──│               │
│               │◂─── progress ───│  rsync/rclone │
└──────────────┘                  └──────────────┘

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st_agent-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

st_agent-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file st_agent-0.1.0.tar.gz.

File metadata

  • Download URL: st_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for st_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a8f407647fb64ba0b3a454e2f7b34cf11f1994cfafd9e69cbfb6ee251d173f2d
MD5 8b1f9bbf0aeaf7c4842dfc00b065e2cd
BLAKE2b-256 46bd60192b5fc8eb7ce2e6ef6d296c2cedb4de078d1e477d9545bda76f29da96

See more details on using hashes here.

File details

Details for the file st_agent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: st_agent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for st_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e663ebc2320dd14da459b4b01baa6f55c3233e84f8c161afe4cf4fbb7d7eea02
MD5 940e6f6fbd410f1f7d8c90986a217324
BLAKE2b-256 abbd2f9a3e421c7766b5a35a4ba859574641fe3d44976f7dc488b92e8cb2ce90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page