upySingle-binary Web deployment tool

A single binary, straight from Release to production.

Single Go binary, zero runtime dependencies, minimal memory footprint.
Swiftly deploy GitHub Releases or local bundles to servers for SPAs and Docker containers.

Linux / macOS · x86_64 / arm64 · Zero dependencies

Build Artifact → upy Runner → Production
Blue Go Gopher on a skateboard, aligned within engineering drafting guides
Release BundleupyProduction
Fast Deploy Disk Clean Convention Backup Project Analysis Outbound Alerts Server & Webhook Logs & Trace

Installation

Install with a single command.

Automatically detects system architecture and configures Shell Tab completions.
Single standalone binary, no background daemon required.

View installation docs ↗
Install script
curl -fsSL https://raw.githubusercontent.com/AaronConlon/upy/main/install.sh | bash -s -- --lang en

Installs to /usr/local/bin with English CLI messages. Use --lang zh-CN for Chinese, or INSTALL_DIR to change the path.

Core Features

Deploy, Server, Webhooks & Logs.

End-to-end server operations: automated CI/CD webhooks, background daemon, 2FA web console, and unified trace logs.

01 / Deploy

Atomic switching from Release to production.

Interactively pick a GitHub Release asset in the terminal, or deploy latest with a single command. Supports SHA-256 integrity verification, resumable downloads, pure-Go AES-256-GCM bundle decryption (enabling fast, public release distributions), and offline local bundles.

View deployment guide ↗
Deploy commands
# Interactively pick a Release asset
upy release

# Deploy latest official release (auto-decrypted with crypto.password)
upy release latest

# Encrypt bundle to secure asset
upy encrypt ./bundle.zip --password "secret"

# Deploy local offline bundle
upy bundle ./bundle.zip
SPA Static Sites

Atomic symlinks with automatic permission fixes.

Extracted into isolated release folders and switched atomically via the current symlink. Automatically standardizes permissions to 0755/0644 to prevent 403 Forbidden errors in Nginx and Caddy.

Native Systemd Services

Go binaries with atomic units and zero privilege creep.

Runs lightweight Go/Rust binaries under systemd supervision. Guarantees strict service user pre-checks, argument fidelity, port identity probing, and automatic rollback on failure.

Docker / Compose Applications

Graceful handover with automated rollbacks.

Prepares new images and configurations before stopping previous containers to prevent port conflicts. Includes built-in health checks that automatically rollback on startup failure.

Deployment Walkthrough: From CI Packaging to Server Execution

Explore real-world pipelines for each deployment mode — including CI build steps, server directory structure, terminal logs, and resilience mechanisms.

01 CI/CD Packaging
.github/workflows/deploy.yml
# 1. Build frontend artifacts
- name: Build frontend
  run: npm ci && npm run build

# 2. Inject manifest & package bundle.zip
- name: Package bundle
  run: |
    cat << 'EOF' > dist/upy.yaml
    name: my-spa-app
    version: ${{ github.ref_name }}
    type: static
    static:
      directory: dist
    EOF
    cd dist && zip -r ../bundle.zip . upy.yaml
02 Server Configuration & Layout
/var/www/my-spa-app/deploy.yaml
# Server project declaration
name: my-spa-app
release:
  provider: github
  repository: owner/my-spa-app
  asset: bundle.zip

# Retention policies (defaults to 3 bundle archives, range 0~100)
bundles:
  keep: 3
releases:
  keep: 1

# Nginx config: root /var/www/my-spa-app/current;
host: /var/www/my-spa-app
$ upy release latest
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  📦 Project: my-spa-app
  📁 Root:    /var/www/my-spa-app
  🧩 Type:    Static SPA (static)
  🏷 Active:  (none)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  -> Fetching latest release from owner/my-spa-app...
  ✓ Selected version v1.0.0
  -> ⬇️  Downloading bundle.zip (1.4MB)...
  ✓ Saved to bundles/v1.0.0-bundle.zip
  -> Extracting bundle...
  ✓ Bundle unpacked into releases/1.0.0
  -> Validating static entrypoint...
  ✓ Verified dist/index.html
  -> Normalizing filesystem permissions...
  ✓ Corrected dirs to 0755, files to 0644
  -> Atomically switching symlink...
  ✓ current -> releases/1.0.0/dist
  ✓ Deployment complete: my-spa-app 1.0.0
  ⏱ Elapsed: 0.8s
Zero 403 Forbidden Errors: Recursively resets directory permissions to 0755 and file permissions to 0644.
Atomic Symlink Swap: Points current -> releases/1.0.0/dist in microseconds using POSIX atomic rename.
Dual-Version Rollback: Keeps active and previous release intact; rollback immediately swaps symlink back.
02 / Clean

Disk space analysis and safe pruning.

Auto-prunes old bundle archives during deployment based on bundles.keep (default 3, range 0~100); supports interactive cleanup or one-click slim down with upy clean. Dual-layer active protection ensures the active current version is never deleted, backed by cross-process locks against concurrent operations.

View cleanup docs ↗
Clean commands
# Interactive clean menu with usage breakdown
upy clean

# Purge downloaded bundle archives only
upy clean --bundles

# One-click slim down (caches and old releases)
upy clean --all -y
03 / Backup

Convention backups with lock protection.

Follows convention over configuration, automatically detecting project backup.sh scripts and injecting standardized runtime variables. Guarantees zero dirty snapshots via cross-process exclusive locks, bounded disk footprint through intelligent retention rotation, and instant mobile alerts.

View backup documentation ↗
01 / Convention Script Auto-Discovery backup.sh
#!/usr/bin/env bash
# Auto-injected: UPY_BACKUP_DIR, UPY_PROJECT_NAME, UPY_TIMESTAMP
mkdir -p "${UPY_BACKUP_DIR}"
BACKUP_FILE="${UPY_BACKUP_DIR}/dump-${UPY_PROJECT_NAME}-${UPY_TIMESTAMP}.sql.gz"

# Execute dump inside container or on native host
docker compose exec -T db mysqldump -u root -p"${DB_PASSWORD}" "${DB_NAME}" | gzip > "${BACKUP_FILE}"
02 / Context & Rotation Optional Config deploy.yaml
# Optional backup settings
backup:
  script: backup.sh            # Auto-probes backup.sh if omitted
  dir: backups                 # Output directory (<root>/backups)
  retention: 7                 # Keep latest 7 archives, auto-prune older
  timeout: 15m                 # Safety timeout (supports 30s, 5m, 1h)
Terminal — upy backup
upy backup
$ upy backup
-> Preparing convention backup for project my-api-service...
✓ Discovered convention script: backup.sh (chmod 0755)
✓ Acquired project exclusive lock (.deploy.lock)
-> Executing backup with context (UPY_BACKUP_DIR=backups)...
------------------------------------------------------------
Exporting database to backups/dump-my-api-service-20261019-120000.sql.gz...
Database export completed successfully!
------------------------------------------------------------
✓ Project my-api-service backup finished successfully!
  📦 Archive:  dump-my-api-service-20261019-120000.sql.gz (42.5 MB)
  🛡️  Rotation: Kept latest 7 archives (cleaned 1 older file)
  ⏱  Elapsed:   2.4s
  🔔 Pushed notification to Bark channel
upy backup Interactive project backup
upy backup my-app --list View archive history & file sizes
upy backup my-app --prune 5 Retain latest 5 archives & clean older
upy backup --all -y Batch backup all registered projects
Cross-Process Mutual Exclusion: Acquires exclusive .deploy.lock during backup operations, strictly preventing dirty snapshots from concurrent releases or cleanups.
Automatic Retention Rotation: Automatically scans archive modification times and cleans snapshots past the threshold, keeping server disk usage bounded.
Observability & Mobile Alerts: Pushes instant alerts with elapsed execution times, archive file sizes, and failure reasons to Bark mobile channels.
04 / Analysis

Host project catalog with 100% benchmark bars.

Dynamic host-wide project cataloging with proportional horizontal benchmark bars using the largest project as the 100% baseline. Spotlights recent releases at the top with version, stack type, relative duration, and service health. Strictly avoids symlink double-counting, with --detail breakdowns and --json export.

View analysis docs ↗
01 / 100% Benchmark Bars Spot Storage Hogs Max Benchmark Bar
# Largest project serves as 100% baseline reference
1  my-compose-app  docker  1.45 GB  ━━━━━━━━━━━━━━━━━━━━
2  my-api-service  system  482 MB   ━━━━━━━─────────────
3  portal-frontend static   86 MB   ━───────────────────
02 / Latest Release Spotlight Real-Time Pulse Spotlight Focus
# Top card spotlighting the most recent release
📦 Project: my-api-service (v1.2.0)
🧩 Stack:   Systemd Native Service (system) · upy-my-api-service.service
⏱  Time:    22 minutes ago (2026-10-19 19:40:02)
🟢 Status:  Active & Running (active)
Terminal — upy analysis
$ upy analysis
upy analysis — Host Project & Disk Analysis

━ Recent Deployment Activity ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  📦 Project: my-api-service (v1.2.0)
  🧩 Stack:   Systemd Native Service (system) · upy-my-api-service.service
  ⏱  Time:    22 minutes ago (2026-10-19 19:40:02)
  🟢 Status:  Active & Running (active)

━ Project Analysis (Status · Space Benchmark · Stack · Version) ━━━━━━━━━
#   Project             Status         Stack    Version     Disk Space  Benchmark (Max)
1   my-compose-app      🟢 active      docker   v2.1.0      1.45 GB     ━━━━━━━━━━━━━━━━━━━━
2   my-api-service      🟢 active      system   v1.2.0      482.3 MB    ━━━━━━━─────────────
3   portal-frontend     🟢 active      static   v0.9.4       86.1 MB    ━───────────────────
4   demo-spa            ⚪ undeployed  static   -            14.2 MB    ━───────────────────

━ Storage Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  📊 Projects:    4 registered
  💾 Total Space: 2.03 GB (Average 519.6 MB per project)
  👑 Top Hog:     my-compose-app (1.45 GB, 71.4% of total host upy space)
  💡 Tip: Run upy analysis --detail to view subdirectory breakdowns
upy analysis Host-wide project space bars & latest release
upy analysis --detail Subdirectory breakdowns (releases, bundles, backups)
upy analysis <name> Detailed breakdown for a specific project
upy analysis --json Structured JSON output for monitoring & CI
Symlink Double-Count Prevention: Never recurses into current symlinks; active releases are counted only once.
Subdirectory Breakdown (--detail): Separates active releases, historical versions, bundle cache, and backups.
Structured JSON Export (--json): Emits standard JSON for automated health checks, CI/CD audits, and monitoring.
05 / Notify

Multi-recipient Bark mobile push & project-specific Webhooks.

Real-time delivery alerts directly to iOS devices and team messaging bots. Powered natively by Bark mobile push and project-isolated Webhooks. Zero third-party middleware, project-specific routing in deploy.yaml, global fallback in ~/.upy/config.yaml, HMAC-SHA256 request verification, and smart deduplication.

View notification docs ↗
Open Source What is Bark?
bark.day.app ↗

Bark is a lightweight, open-source push notification service for iOS. It allows developers to send custom push notifications to Apple devices via simple HTTP GET/POST requests. upy integrates Bark natively to give you instant, zero-middleware deployment and backup observability.

01 / Unified Structure Common Defaults & Multi-User Scope deploy.yaml / ~/.upy/config.yaml
# Unified format: Common properties + user list with precedence
notify:
  bark:
    # 1. Common attributes (inherited by all recipients)
    serverUrl: https://api.day.app     # Default official API or private domain
    group: "payment-api"               # Push group header
    sound: "chime"                     # Default ringtone (bell, chime, glass, etc.)
    level: "active"                    # Default priority level

    # 2. Per-user attributes (precedence over common attributes)
    users:
      - name: "Frontend Lead"
        token: "DEVICE_KEY_ALICE"
        sound: "glass"                 # Overrides common sound
      - name: "DevOps On-Call"
        token: "DEVICE_KEY_BOB"
        serverUrl: https://bark.ops.internal # Overrides common serverUrl
        level: "timeSensitive"
      - name: "QA Tester"
        token: "DEVICE_KEY_CAROL"      # Fully inherits common attributes
02 / Single-User Direct Mode Zero Boilerplate deploy.yaml
# Minimal single-user mode: Declare token directly under bark
notify:
  bark:
    serverUrl: https://api.day.app
    group: "my-service"
    sound: "bell"
    token: "DEVICE_KEY_SINGLE_USER"
03 / Project-Specific Webhook Zero Global Pollution · HMAC Verified deploy.yaml
# Project-scoped webhook (single endpoint, multiple URLs, or HMAC signature)
notify:
  webhook:
    - url: "https://ops.example.com/api/deploy-webhook"
      secret: "SEC_KEY_FOR_HMAC_SHA256"  # Injects X-Upy-Signature (HMAC-SHA256)
      headers:
        X-Environment: "production"
    - url: "https://qyapi.weixin.qq.com/.../send" # Slack, Lark, DingTalk bots
04 / Payload Standards Rich Context Generated Automatically Title & Body Structure
# Title and Body are assembled automatically (translated example):
Title: upy deployment successful · my-api-service
Body:
  Project: my-api-service
  Version: v1.2.0
  Type: Systemd service
  Directory: /opt/my-api-service
  Duration: 3.2s
  # Failure alerts automatically append "Reason: <diagnostic error>"
Terminal — Mobile Push
upy release latest
$ upy release latest
-> Deploying my-api-service v1.2.0...
✓ Unit configuration validated
✓ Switched unit to releases/1.2.0
✓ Systemd service started (upy-my-api-service.service)
✓ Healthcheck passed (HTTP 200 OK)
✓ current -> releases/1.2.0
⏱ Elapsed: 3.2s
🔔 Dispatched 3 push notifications & 1 project webhook:
  ✓ Alice (https://api.day.app) [HTTP 200]
  ✓ Bob (https://api.day.app) [HTTP 200]
  ✓ DevOps On-Call (https://bark.mycorp.internal) [HTTP 200]
  ✓ Webhook: https://ops.example.com/api/deploy-webhook [HTTP 200]
🔔 Bark · Just now
Deploy Success
Title: upy deployment successful · my-api-service
Project: my-api-service
Version: v1.2.0
Type: Systemd service
Directory: /opt/my-api-service
Duration: 3.2s
💾 Bark · 2m ago
Backup Success
Title: upy backup successful · my-api-service
Project: my-api-service
Archive: dump-my-api-service-20261019-120000.sql.gz (42.5 MB)
Directory: /opt/my-api-service
Duration: 2.4s
Project-Isolated Webhooks: Webhooks reside exclusively in project deploy.yaml files without polluting global configurations. Features HMAC-SHA256 signature verification (X-Upy-Signature) and idempotency IDs.
Per-User Attribute Precedence: When splitting recipients via - name, user-level fields override common defaults while unset properties inherit automatically.
Dual Configuration Scopes: Project-specific routing in deploy.yaml and host-wide on-call fallback in ~/.upy/config.yaml.
Smart Multi-Scale Duration: Execution time automatically shifts units — seconds below 60s (3.2s), minutes above 60s (1m15s), and hours above 60m (1h2m).
Smart Merge & Deduplication: Overlapping recipients between project and global configs are merged and dispatched once.
Bundle Retention & Shell Completion Sync: Configurable bundles.keep (0~100, default 3) in deploy.yaml; upy update automatically synchronizes completion rules for zsh, bash, and fish so new commands are instantly available.
06 / Server & Webhook

Background daemon, CI/CD inbound webhooks, and 2FA web console.

upy server runs as an ultra-lightweight background daemon. When CI/CD (GitHub Actions / GitLab CI) finishes a Release, it triggers an instant deployment via POST /api/v1/webhook/{project}—eliminating the need to expose VPS SSH private keys inside CI runners. Built-in TOTP two-factor authentication with 30-minute session cookies. Run upy server auth on the VPS to scan the enrollment QR code in the terminal; enrollment secrets are never served over HTTP.

View Server & Webhook docs ↗
01 / Inbound CI Trigger HMAC SHA-256 Verified .github/workflows/deploy.yml
# GitHub Actions: Compute HMAC SHA-256 and trigger upy server on release
- name: Trigger upy deployment
  env:
    UPY_WEBHOOK_URL: "https://deploy.example.com/api/v1/webhook/my-api"
    UPY_WEBHOOK_SECRET: "${{ secrets.UPY_WEBHOOK_SECRET }}"
    TAG: "${{ github.ref_name }}"
  run: |
    payload='{"target":"'${TAG}'","force":false}'
    sig=$(printf %s "$payload" | openssl dgst -sha256 -hmac "$UPY_WEBHOOK_SECRET" | sed 's/^.*= //')
    curl -fsS -X POST "$UPY_WEBHOOK_URL" \
      -H "Content-Type: application/json" \
      -H "X-Hub-Signature-256: sha256=$sig" \
      -d "$payload"
02 / TOTP 2FA Security Terminal-only Enrollment upy server auth
# 1. Run on the VPS and scan the QR code in the terminal
upy server auth                → Scan with Google Authenticator

# 2. Visit / and enter 6-digit code for 30-minute secure session cookie
https://deploy.example.com/      → Enter [ 8 4 9 2 0 1 ] → Redirect to /overview

# 3. View /logs web console with terminal ANSI color fidelity
https://deploy.example.com/logs  → Browse deployments and live server logs
Terminal Execution — Starting and Managing the Server Daemon
upy server start -d --listen 127.0.0.1:8999
$ upy server start -d --listen 127.0.0.1:8999
-> Starting upy server daemon in background...
✓ Daemon process started successfully (PID: 4892)
🌐 Listening on: http://127.0.0.1:8999
TOTP 2FA enrollment: run upy server auth in the VPS terminal
📋 Web Log Console: http://127.0.0.1:8999/logs

$ upy server status
🟢 upy server is running (PID: 4892, listen: 127.0.0.1:8999)
🔐 Zero SSH Key Exposure Zero Secret Exposure

CI/CD triggers deployments using HMAC signed payloads; zero server SSH private keys need to be saved inside CI runners.

🛡️ TOTP & Terminal Enrollment No Web Enrollment

Enrollment QR codes are shown only by upy server auth in the VPS terminal. The Web enrollment route is removed. Logged-in sessions retain 30-minute HttpOnly cookies.

⚡ Async Dispatch & Mutex Locks 202 Accepted & 409 Lock

Inbound webhooks return 202 Accepted immediately to avoid CI timeouts. Concurrent deployments for the same project return 409 Conflict.

upy server start -d Start background daemon for webhooks and web console
upy server status Inspect running status, PID, and listening address
upy server stop Gracefully shut down running server daemon process
POST /api/v1/webhook/:proj Inbound webhook endpoint with HMAC and Bearer token auth
Zero External Dependencies: Built-in HTTP router, TOTP engine, and ANSI renderer in a single ~9.5MB pure Go binary.
Project-Isolated Secrets: Webhook secrets are configured individually in each project's deploy.yaml for strict separation.
Ultra-Low Memory Footprint: Idle server daemon uses ~10MB RSS and 0% CPU, running smoothly on budget cloud VPS instances.
07 / Logs & Trace

Unified trace logging with terminal and Web ANSI color parity.

Full-lifecycle logging across CLI executions, server requests, and project deployments with automatic secret token redaction. The unified upy log CLI provides interactive target selection, live stream tailing (-f), tail truncation (-n), and log clearing (-c); the Web console renders terminal ANSI colors with pixel-perfect fidelity.

View logging & audit docs ↗
01 / Three Dedicated Streams Token Redacted ~/.upy/logs/ Layout
# 1. CLI Execution History (~/.upy/logs/upy.log)
[2026-10-20 22:30:00] [PID:4120] CMD: upy release latest --root /opt/app | EXIT:0 | 3.2s

# 2. Server Access & Daemon Logs (~/.upy/logs/server.log)
[2026-10-20 22:31:05] [INFO] [http] POST /api/v1/webhook/my-api 202 1.2ms [client: 140.82.112.4]

# 3. Project Deployment Logs (~/.upy/logs/<project>/<timestamp>.log)
Step-by-step terminal outputs, backups, and health checks per project
02 / Interactive Picker & Live Stream Anti-Loop Tail upy log Command
# 1. Interactive terminal picker (triggered when target omitted)
$ upy log
? Select log target:
  ❯ 🖥️  Server daemon log (server.log)
    ⌨️  upy CLI execution history (upy.log)
    📦 my-api-service (latest deployment)
    📦 portal-frontend (latest deployment)

# 2. Real-time tailing and row limits
$ upy log server -f          # Stream live server access logs
$ upy log upy -n 100         # Inspect last 100 CLI executions
$ upy log --list             # List all log files and sizes
Terminal Execution — Live Stream with upy log server -f
upy log server -f
$ upy log server -f
-> Streaming log Server daemon log (last 50 lines): ~/.upy/logs/server.log
[2026-10-20 22:30:12] [INFO] [server] upy server daemon started (pid: 4892, listen: 127.0.0.1:8999)
[2026-10-20 22:31:05] [INFO] [http] POST /api/v1/webhook/my-api-service 202 1.4ms [client: 140.82.112.4]
✓ [2026-10-20 22:31:05] [webhook] HMAC SHA-256 signature verified for my-api-service
[2026-10-20 22:31:05] [deploy] triggering background deploy for my-api-service (target: v1.2.0)
✓ [2026-10-20 22:31:08] [deploy] my-api-service deployed successfully in 3.2s
[2026-10-20 22:35:10] [INFO] [http] GET /logs/my-api-service 200 0.8ms [client: 127.0.0.1]
upy log Interactive picker for Server, CLI, or project deployment logs
upy log server -f Live stream tailing of server access requests and operations
upy log upy -n 100 View last 100 CLI execution invocations with exact durations
upy log <project> Inspect latest full terminal output for a specific project
upy log --list Inventory of all on-disk log files and storage footprint
upy log <target> -c Truncate/clear a target log file (e.g. upy log server -c)
Anti-Loop Tail Protection: The upy log command automatically skips self-logging to prevent infinite tail loops.
Strict Credential Redaction: Sensitive tokens, secrets, and passwords are automatically masked before writing to disk.
Web & Terminal Color Parity: Web console includes a built-in ANSI to HTML renderer for 1:1 colored terminal viewing.

A single binary,
built for delivery.

Open source (MIT License).
Standalone binary, zero external dependencies, low memory footprint.

Read Full Documentation ↗