Skip to content
Projects

About

Serverless Web SSH client built on Cloudflare Workers with a pure TypeScript SSH stack, multi-session terminals, SFTP file management, and an AI operations assistant.

Productivity & Automation

How these counts are measured

Measured star growth

in 24h
+1
in 7 days
+14
in 15 days
+22
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_en.md

Original
CloudSSH

A browser-based SSH terminal, SFTP client, and built-in Windows Remote Desktop on Cloudflare Workers—no self-hosted gateway required.

Ultra-lightweight · Out-of-the-box · Multi-Theme Terminal & RDP

Stars Afdian License Cloudflare TypeScript Vite

Highlights · Features · Deployment · Usage Guide · Architecture · Changelog · Contributors · Sponsor · Special Thanks · License

简体中文 | English

[!TIP] CloudSSH handles connections and sessions at edge nodes using Cloudflare Workers TCP Sockets, WebSockets, and Durable Objects—giving you Linux/Unix (SSH + SFTP) and Windows Remote Desktop (RDP) straight from your browser.

Demo

Connect to and manage your servers from any browser without installing a standalone SSH or desktop client.

CloudSSH Demo Video
Play

Video duration 19:48 · Full CloudSSH walkthrough

Table of Contents

Click to expand Table of Contents

Highlights

Ultimate Serverless

  • No gateway to maintain: Everything runs on a Cloudflare Worker and SQLite-backed Durable Objects; limits and billing follow your Cloudflare plan.
  • Edge Acceleration: Cloudflare's global network routes traffic from nearby edges, with smart placement for direct entries.

Out of the Box

  • One-Click Deployment: Fork the repository and connect GitHub in the Cloudflare Dashboard for automatic builds and deployments with zero local setup.
  • Single-Bundle Delivery: The frontend and self-hosted fonts/icons are inlined into the Worker; FreeRDP WASM and desktop assets load on demand without bloating ordinary SSH page loads.

Secure and Reliable

  • Two-Segment Encryption: HTTPS/WSS between browser and Worker; a pure TypeScript SSH-2.0 stack between Worker and server (Curve25519-SHA256 / ECDH-NISTP256 KEX, AES-256-GCM/CTR, HMAC-SHA2).
  • Strict Host Verification & TOFU: Supports Ed25519, ECDSA P-256/P-384/P-521, RSA-SHA2, and OpenSSH host certificates. Verification remains public-key TOFU—embedded CAs are not automatically trusted, certificate renewals keep the same fingerprint, and key changes always require explicit confirmation.
  • Browser-Local Key Unlocking & MFA: Unlock OpenSSH bcrypt/AES-CTR and PKCS#8 PBES2 private keys locally in the browser (passphrases are neither saved nor sent to the Worker; unlocked keys still reach the Worker for SSH signing, and anonymous imports stay transient), plus a password second factor after public-key auth and multi-round OTP challenges. See SSH compatibility notes.
  • Defense in Depth: IPv4/IPv6 and DNS-rebinding SSRF blocking, bounded Worker rate limiting, same-origin checks, Turnstile bot protection, inactivity idle timeouts, and per-user AES-256-GCM encrypted SQLite storage.
  • Minimal Credential Exposure: SSH connections use one-time tickets without returning saved passwords or keys to the browser; Windows Remote Desktop delivers encrypted login envelopes bound to an ephemeral browser key only on an explicit desktop launch, and device lists never return plaintext passwords.

Features

Click to expand full feature list (SSH Stack, SFTP, RDP, AI Assistant & MCP)

SSH Protocol & Connectivity

  • Pure TypeScript SSH-2.0 Stack: Zero external SSH libraries, built on Web Crypto APIs; handles coalesced SSH_MSG_NEWKEYS packets and lightweight servers such as Dropbear.
  • Flexible Authentication: Password (including explicit empty passwords), RFC 4252 §5.2 none, multi-round RFC 4256 keyboard-interactive, Ed25519 / ECDSA P-256/P-384/P-521 / RSA-SHA2 private keys, OpenSSH user certificates, and ephemeral Cloudflare SSH CA certificates under Access login.
  • Multi-Hop Jump Chains: Signed-in users can chain up to 3 saved servers over RFC 4254 direct-tcpip without remote nc/socat, with independent authentication and path-scoped TOFU fingerprints at each hop.
  • Cloudflare Tunnel Intranet Access: Connect directly to private hosts without public IPs or open ports over cloudflared WebSocket Carrier, with optional Zero Trust Service Tokens and seamless SSH/SFTP/Agent support.
  • One-Time SSH Sharing: Issue single-claim share links without exposing credentials, supporting terminal & SFTP access, ~60s device-bound drop recovery, instant revocation, and terminal-output/SFTP audit logs.
  • Smart Placement & Network Telemetry: IPv4/IPv6 dual stack, automatic IPinfo region inference for direct entries (locationHint, manually overridable; downstream jump hosts never leak private addresses), split browser-Worker / Worker-SSH latency indicators, and automatic OS icon detection for saved servers.

Terminal, File Management & Mobile UX

  • Fast Terminal & Ergonomics: xterm.js with WebGL acceleration and bounded output backpressure, Ctrl/Cmd+Shift+F search, Cmd/Ctrl+Shift+K clear, one-click .txt log export, foreground OSC 52 copy & mouse selection auto-copy, and masked IP display with one-click full-address copy.
  • Single-Page Multi-Tab Sessions: Run isolated SSH/SFTP sessions side by side with inline double-click tab renaming, right-click context menu (rename, duplicate, close others, close tab), and Esc or button return from the server list.
  • SFTP Graphical File Manager & Online Editor: Runs concurrently over SFTP v3 with breadcrumb path navigation, bidirectional sorting (directories pinned first), single / Cmd / Shift / select-all multi-select, batch downloads and recursive deletion, on-demand symlink resolution, new blank file creation, and upload resume. Includes a CodeMirror editor (≤2MB text, UTF-8 saveable / GB18030 read-only, BOM/EOL preservation, remote-change conflict check, and wrap toggle).
  • Native trzsz Transfers: Built-in trz / tsz command support and drag-and-drop uploads, compatible with tmux.
  • Touch & Mobile Refinements: On-screen keyboard and safe-area layout, shortcut modifier bar, dedicated touch selection handles with edge scrolling, per-device 12–18px / Auto font sizing, manual paste dialog (up to 65,536 chars), confirmation before interrupting active transfers, and foreground WebSocket heartbeat recovery; see mobile interaction notes.

UI, Themes & Localization

  • Theme V4 & Liquid Glass Controls: Built-in Standard Dark, Standard Light, Cyberpunk, and Liquid Glass themes, liquid segmented drawer switches with spring-driven sliders, prefers-reduced-motion support, and unified :focus-visible focus rings.
  • Custom Theme Library & Editor: Store up to 20 custom themes (cloud-synced for signed-in users, local for anonymous users) alongside the companion GitHub Pages theme editor with live previews and JSON export.
  • Self-Hosted Fonts, i18n & Responsive Forms: Bundles Material Symbols Outlined and JetBrains Mono locally without Google Fonts (docs/local-fonts.md); supports Simplified Chinese, Traditional Chinese, and English; unifies saved SSH and Windows cards under tag filtering, search, sorting, and responsive pagination (6 on desktop/tablet, 3 on mobile), plus optional AES-256-GCM local history for the last 5 anonymous connections.

Windows Remote Desktop (Built-In)

  • Built-In Multi-Route Access: Available over HTTPS for all signed-in accounts with no feature toggle. Supports Connector (direct WebRTC), Public IPv4/IPv6/DDNS + Port (default 3389), and Cloudflare Tunnel, silently falling back to the configured relay if pre-sign-in direct setup fails.
  • Protocol Compatibility & Trust: Bundled FreeRDP 3.33.1 WASM enforces TLS + NLA and includes compatibility fixes for Windows Server 2025 (TLS 1.3 psk_key_exchange_modes) and MS-NLMP NTLMv2 responses; verifies leaf SHA-256 fingerprints on first launch and supports in-place Update fingerprint and connect without deleting devices or relinking connectors.
  • Display & Diagnostics: Toolbar latency breakdown (WebRTC link RTT / channel peak / browser read backlog / Windows RDP RTT), scaled full screen with optional dynamic resolution (DISP), and pre-first-frame diagnostics. See RDP setup and limits and Windows connector guide.

Snippets, AI Assistant & External MCP

  • Slide-Over Command Snippets: Non-blocking drawer with category chips, fuzzy search, {{var}} placeholder prompts, and one-click copy/fill/run (per-user isolated up to 100 snippets; local fallback when anonymous).
  • Built-In AI Operations Assistant: BYOK standard stateless Responses API (store:false) with 10 tools (explicit confirmation for risky commands), terminal selection attachments, automatic context summaries/budgets, direct reuse of saved knowledge and credentials, and UserDBDO Alarm-backed background work-log distillation (docs/agent-context-memory.md).
  • External AI Assistants (MCP): Generate one permanent per-account configuration with manual key rotation (old keys invalidate immediately), per-server read / write / exec / context grants, Cloudflare Access Service Token support, grouped activity logs, and bounded headless execution (docs/mcp.md).

Architecture

System Architecture

flowchart TB
    subgraph "Browser Client"
        UI["Frontend UI<br/>TypeScript + xterm.js"]
        SFTP["SFTP File Manager"]
        Agent["AI Agent Assistant"]
        Trzsz["trzsz File Transfer"]
        RDP["FreeRDP / WASM (loaded on demand)"]
    end

    subgraph "Cloudflare Edge Network"
        Worker["Worker<br/>Routing + API"]
        SSH_DO["SSHSessionDO<br/>SSH Session Management"]
        User_DO["UserDBDO<br/>Users / Snippets / Memory / Devices"]
        Share_DO["SSHShareDO<br/>Share Capability + Audit"]
        MCP_DO["MCPExecutionDO<br/>Headless SSH/SFTP"]
        RdpAuth_DO["RdpAuthorityDO<br/>RDP Device Signing Root"]
        AgentCore["AgentCore<br/>AI Control Loop + Context"]
    end

    subgraph "Target Server"
        SSH["SSH Server (OpenSSH / Dropbear)"]
        Windows["Windows Remote Desktop (NLA)"]
    end

    UI <-->|"WebSocket<br/>Terminal I/O"| Worker
    SFTP <-->|"WebSocket<br/>SFTP Data"| Worker
    Agent <-->|"WebSocket<br/>Agent / Memory"| Worker
    Trzsz <-->|"trzsz Protocol"| UI
    Worker <-->|"WebSocket"| SSH_DO
    Worker <-->|"Internal API"| User_DO
    Worker <-->|"Claim / Revoke / Audit"| Share_DO
    Worker <-->|"Device Auth / Verify"| RdpAuth_DO
    SSH_DO -->|"Lifecycle / SFTP / Output"| Share_DO
    SSH_DO <-->|"TCP / SSH Tunnel"| SSH
    Client["External MCP Client"] <-->|"HTTPS /mcp"| Worker
    Worker <--> MCP_DO
    MCP_DO <-->|"SSH"| SSH
    RDP <-->|"Auth / Signaling, Relay on Fallback"| Worker
    Worker <-->|"Fallback Relay: TCP or Tunnel"| Windows
    RDP <-->|"Direct WebRTC"| Connector["Resident Windows Connector"]
    Connector <-->|"Local RDP"| Windows
    Connector <-->|"Standby / Signaling"| Worker
    SSH_DO <-->|"Exec Channel"| AgentCore
    AgentCore <-->|"Work Logs & Knowledge"| User_DO
    AgentCore <-->|"LLM API"| External["External LLM Service"]
    User_DO <-->|"Alarm Distillation"| External

Quick Deployment

Prerequisites

Recommended: Deploy via GitHub Integration

Deploy to Cloudflare

Click the button to jump to the Cloudflare console, authorize your GitHub account, and deploy automatically

  1. Fork this repository to your GitHub account.
  2. Create a Worker App in Cloudflare Workers & Pages and link your forked GitHub repository.
  3. Build Command: Set the build command to pnpm run build:frontend, then save and deploy.
  4. Access & Custom Domain: Access the site at https://cloudssh.<your-subdomain>.workers.dev or bind a custom domain under Settings → Domains & Routes.

To skip Cloudflare Git builds based on modified paths, configure Settings → Build → Build watch paths (official docs); this operates independently of GitHub Actions paths-ignore.

Update Notices

CloudSSH checks the official main branch in the background for newer stable releases and shows a dismissible notice linking to the changelog. Deployers decide when to sync and redeploy; active sessions are never interrupted or auto-reloaded.

Optional: Automatically Sync Upstream

Forks can run the included Sync upstream workflow to mirror upstream main and trigger Cloudflare Git auto-deployment. Manual sync requires no variable; scheduled sync is off by default and runs daily at 04:20 Asia/Shanghai when enabled:

  1. Ensure Cloudflare builds from your fork's main branch with automatic builds enabled.
  2. Enable Actions on your fork (if an older fork lacks Sync upstream, run GitHub's Sync fork once first).
  3. On-demand sync: Run Actions → Sync upstream → Run workflow on main.
  4. Scheduled sync (optional): Add repository variable AUTO_SYNC_UPSTREAM=true under Settings → Secrets and variables → Actions → Variables (remove or set false to disable). If upstream workflow files themselves change, sync once manually via GitHub.

Configurable Environment Variables

Configure only what your deployment uses. One-time SSH sharing and Windows Remote Desktop are built in, and SSH host-key verification cannot be disabled.

Worker environment variables & upgrade notes

Defaults are defined in wrangler.toml. Pairs show production / test; dashes mean unset.

Variable Default Purpose & When to Set
IDLE_TIMEOUT 30m Disconnect idle sessions (30m, 1h, or seconds; 0 disables; passive output does not reset).
REQUIRE_AUTH false / true Require sign-in for ordinary SSH (GitHub, Admin Password, or Access; shares stay separate).
GITHUB_CLIENT_ID — Public GitHub OAuth app ID (GitHub sign-in mode only).
GITHUB_CLIENT_SECRET — GitHub OAuth secret (store as a Secret).
BASE_URL Request origin Optional fixed origin for GitHub OAuth callback /api/auth/callback.
GITHUB_ALLOWED_USER_IDS — Comma-separated numeric GitHub IDs; unset allows all, empty/malformed denies all GitHub logins.
ADMIN_PASSWORD_HASH — Single-admin password verifier (Secret), generated at #password-setup or pnpm run hash-password. Highest priority.
CF_ACCESS Runtime detection Set true to enforce Access mode (requires edge policy; denies login without native identity).
TURNSTILE_SITEKEY — Public Turnstile site key (pair with secret below).
TURNSTILE_SECRET — Server-side Turnstile Secret.
DEBUG_MODE false / true Enables extra troubleshooting diagnostics; keep off in normal production.

Store sensitive credentials under Settings → Variables and Secrets → Secret so deployments do not overwrite them. Durable Object bindings and migrations are already configured in wrangler.toml.

Upgrading an existing deployment:

  • REQUIRE_GITHUB_AUTH has been renamed to REQUIRE_AUTH. Set REQUIRE_AUTH = "true" before upgrading if your production instance requires login.
  • ENABLE_RDP, MAX_CONNECTIONS, ENABLE_SSH_SHARING, STRICT_HOST_KEY_VERIFY, and CF_ACCESS_TEAM_NAME have been removed. Old false values no longer disable sharing/RDP or bypass host-key checks; enter the SSH CA team name directly in the UI form (existing saved values stay intact).

Authentication & Verification Options

Mode priority when multiple settings coexist: ADMIN_PASSWORD_HASH (Password) > CF_ACCESS / Native Access > GitHub OAuth > Anonymous.

Optional: Enable Cloudflare Zero Trust Access Login
  1. Configure an Access policy in the Worker's Access tab or a Self-hosted application in Zero Trust → Access → Applications covering the main pages, /api/*, and WebSocket routes, and protect/disable unused endpoints such as workers.dev.
  2. Allow trusted emails or domains. CloudSSH reads verified identity from ctx.access.getIdentity() and isolates accounts by email; Sign Out redirects to /cdn-cgi/access/logout.
  3. Existing working Worker-panel deployments need no migration; if pages load while SSH returns 403, verify the effective policy, WebSocket hostname/path, and Origin (CF_ACCESS=true enforces mode gating without creating an edge policy).
Optional: Enable Single-Admin Password Sign-In (Alternative to GitHub OAuth)

Admits one local administrator account with browser-side PBKDF2 stretching (passwords never leave the browser):

  1. Open Admin password sign-in setup in the auth footer (or https://your-domain/#password-setup if GitHub login is already configured), enter a ≥10-character password, and copy the generated hash.
  2. Add ADMIN_PASSWORD_HASH as a Secret in Worker settings and save.
  3. Reload and sign in with Admin Login. Replacing the hash rotates the password and invalidates prior sessions; deleting it returns to the next available mode without merging data.
Optional: Configure Turnstile Human Verification

Create a widget in Cloudflare Dashboard → Turnstile, add TURNSTILE_SITEKEY and TURNSTILE_SECRET (as a Secret) to your Worker, and redeploy.

Optional: Configure GitHub OAuth Login & Server Management
  1. Create an OAuth App in GitHub Settings → Developer settings → OAuth Apps → New OAuth App with callback https://your-domain.com/api/auth/callback.
  2. Add GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET (Secret), and optionally BASE_URL, GITHUB_ALLOWED_USER_IDS (curl -s https://api.github.com/users/<username> | jq '.id'), and REQUIRE_AUTH=true:
Configuration GitHub Sign-In Anonymous SSH
Neither setting All GitHub users Allowed
GITHUB_ALLOWED_USER_IDS only Allowlisted users only Allowed
REQUIRE_AUTH=true only All GitHub users Disabled
Both settings Allowlisted users only Disabled (private-instance mode)

Usage Guide

Windows Remote Desktop

Built in over HTTPS for all signed-in accounts, supporting Windows Server 2025 / 2022 / Windows 11 with RDP and NLA enabled (no anonymous or one-time share access):

  1. Add device: Choose Add Server → Windows Server. The default Connector route needs no public IP or inbound port; to add or use a relay route, enter a public IPv4/IPv6/hostname (including DDNS) + TCP port (default 3389) or a Cloudflare Tunnel hostname, along with Windows username (default Administrator), password, and optional domain.
  2. Link the connector (recommended): Click Download and link this device, extract the device-specific ZIP completely on the target Windows PC, and run the installer. The service links automatically with no binding code or Worker secret.
  3. Open desktop & trust certificates: Direct WebRTC runs first and silently falls back to the configured relay if pre-sign-in setup fails. Verify the Windows leaf certificate SHA-256 on first connect; for planned rotations, verify independently and click Update fingerprint and connect without deleting the device or relinking. Back disconnects without signing out of Windows; full screen supports scaled fit and dynamic resolution (DISP), with toolbar latency breakdown and pre-first-frame diagnostics. See docs/rdp.md and docs/rdp-peer.md.

Connecting via Cloudflare Tunnel

Access private LAN or homelab machines without public IPs or port forwarding:

  1. Run cloudflared on your internal server and point a public hostname to your local SSH port (e.g., service: ssh://localhost:22).
  2. Switch Network Connection to Cloudflare Tunnel, enter the hostname, select a nearby region to minimize cross-ocean routing, and optionally add a Zero Trust Service Token (Client ID / Client Secret).
  3. Terminal, SFTP, and AI Agent share the tunnel seamlessly (CF-* codes indicate the Cloudflare PoP, not handshake latency).

Using SSH Jump Hosts

Signed-in users can chain saved servers across any login provider:

  1. Save the outermost public bastion A, then save internal target B with A selected as its Jump host (up to 3 jump hops supported, e.g., C → A → B).
  2. All hops must belong to the same account with no cycles, and referenced bastions cannot be deleted. SSRF checks, DO placement, and third-party IPinfo lookup apply only to the outermost entry; downstream private addresses never leave the chain, and TOFU host keys are isolated per full route.

Using One-Time SSH Sharing

  1. Connect normally to the target and every jump hop first so all route-scoped fingerprints are trusted, then click Share on the card to set the claim window, session duration, and audit retention (default 90 days).
  2. Copy and deliver the generated link immediately (the plaintext token is never shown again). Claims work once; a bound browser can resume within ~60s across brief drops, while expiry or owner revocation closes both terminal and SFTP immediately.

[!WARNING] Treat share links like temporary passwords: holders receive full Shell and SFTP access using the owner's saved credentials. Shares stop on host-key changes or keyboard-interactive/MFA prompts. Audit logs capture server PTY output (not raw keystrokes) up to 5 MiB or 5,000 events—do not treat them as host-level OS auditing.

Configure a Target Server for Cloudflare SSH CA

Available under Cloudflare Access login only: the browser generates an ephemeral ECDSA P-256 keypair in memory and requests a short-lived certificate from the Access application protecting CloudSSH (unsupported for jump hosts or shares). On Linux OpenSSH (replace <UNIX_USER> and <EMAIL_PREFIX>):

  1. Get CA public key: In Zero Trust → Access controls → Service credentials → SSH → Add a certificate, select the Access app protecting your CloudSSH site (not Infrastructure mode), copy the full CA public key, and restrict Access rules to trusted emails.

  2. Trust the CA: Keep an existing SSH session open, back up sshd_config, append the key to /etc/ssh/cloudflare_ca.pub (root:root, 644, preserving existing CAs), and add in the global section before the first Match:

    PubkeyAuthentication yes
    TrustedUserCAKeys /etc/ssh/cloudflare_ca.pub
    
  3. Map username (when different from email local-part): Append at the end of /etc/ssh/sshd_config:

    Match User <UNIX_USER>
        AuthorizedPrincipalsFile /etc/ssh/auth_principals/%u
    
    sudo install -d -o root -g root -m 755 /etc/ssh/auth_principals
    sudoedit /etc/ssh/auth_principals/<UNIX_USER> # one <EMAIL_PREFIX> per line, keep existing lines
    sudo chown root:root /etc/ssh/auth_principals/<UNIX_USER> && sudo chmod 644 /etc/ssh/auth_principals/<UNIX_USER>
    
  4. Verify & reload: Run sudo sshd -t and sudo sshd -T -C user=<UNIX_USER> | grep -Ei 'pubkeyauthentication|trustedusercakeys|authorizedprincipalsfile|authorizedprincipalscommand', then sudo systemctl reload ssh (sshd on RHEL/CentOS). In CloudSSH, enter <UNIX_USER> and your Zero Trust team name (without .cloudflareaccess.com).

Prompt for an AI assistant
Help configure Cloudflare SSH CA on Linux OpenSSH for one existing Unix account. First ask for the Unix username, Access email local-part, and the complete public-key line of the CA associated with the Access application protecting CloudSSH (not SSH with Access for Infrastructure). Never ask for a CA private key, JWT or Service Token.

Keep the current session open. Inspect sshd_config, Include, Match, and effective sshd -T settings, then back up existing files before editing. Do not create users, change the port, disable existing login methods, or overwrite other CA keys/grants. Reuse the existing TrustedUserCAKeys file and add the key; otherwise use /etc/ssh/cloudflare_ca.pub (root:root, 644) and configure PubkeyAuthentication yes and TrustedUserCAKeys before the first Match.

When the Unix username differs from the email prefix, reuse existing principal policy or append Match User <UNIX_USER> with AuthorizedPrincipalsFile /etc/ssh/auth_principals/%u at the end of the main configuration. The authorization file contains one allowed email prefix per line; preserve existing entries. Directory mode 755, file mode 644, both root:root. Skip mapping if the username already matches and no other restriction applies. Never put a Match block before remaining global directives.

Run sshd -t, then sshd -T -C user=<UNIX_USER> and review effective values. On validation failure, stop and restore this change. Only then reload with sshd -t && systemctl reload ssh (service sshd on RHEL/CentOS). Keep the original session until a new connection succeeds. Remind me to restrict Access policy to trusted emails, since identical prefixes on different domains cannot be distinguished by principal alone. Finally state the CloudSSH username, team name, and basic troubleshooting steps.

Configure AI Operations Assistant (Responses API)

  • Enter an HTTPS root URL supporting standard /responses, streaming events, and function calling (e.g., https://api.openai.com/v1), model name, and API key; endpoints supporting only /v1/chat/completions are not supported.
  • Changing the API URL requires re-entering the API key. All requests send store:false (verify your provider's retention policy separately). See docs/agent-context-memory.md.

Development

Project Structure

CloudSSH/
├── src/                      # Shared modules & Cloudflare Worker source
│   ├── ssh/                  # Pure TypeScript SSH-2.0 & SFTP v3 implementation
│   ├── worker/               # Worker entry, 5 Durable Objects, Agent, MCP, and RDP relay/assets
│   │   ├── agent/            # Responses client, tool execution, guardrails, and memory extraction
│   │   └── rdp-client/       # FreeRDP WASM client and browser glue
│   └── *-schema.ts           # Shared validation schemas across Worker and frontend
├── frontend/                 # Frontend workspace (TypeScript + Vite + Tailwind + xterm.js + CodeMirror 6)
│   └── src/                  # Terminal, SFTP, RDP workspace, themes, snippets/MCP UI, and i18n
├── tools/rdp-peer/           # Resident Windows WebRTC connector (Go, separate release packaging)
├── docs/                     # Feature guides & GitHub Pages theme editor assets
├── scripts/                  # Build, HTML inlining, font subsetting, FreeRDP/connector, and release scripts
├── tests/                    # Vitest unit/integration, Playwright E2E + axe, and tests/interop/ Go tooling
├── .github/workflows/        # CI/CD (deploy / github-pages / ssh-interop / rdp-connector / sync-upstream)
└── wrangler.toml             # Cloudflare Workers & Durable Objects configuration

Local Development

Click to expand Local Development Guide (setup, commands, branching & CI)
  1. Clone & install (CI pins Node.js 22 and [email protected]):

    git clone https://github.com/<your-username>/CloudSSH.git
    cd CloudSSH
    pnpm install --frozen-lockfile
    
  2. Run locally: pnpm run dev builds and inlines the frontend once and starts http://localhost:8787. For hot reload, run pnpm --dir frontend run dev in a second terminal (proxies /api to Wrangler). Authenticate with pnpm exec wrangler login before CLI deployments.

Command Description
pnpm run dev Build frontend + start local Wrangler dev server
pnpm run build:frontend Build and inline frontend into src/worker/html.ts (never edit manually)
pnpm run typecheck Type-check Worker and frontend TypeScript
pnpm test Run Vitest unit and integration tests
pnpm run test:e2e Run Chromium / mobile WebKit E2E and axe checks (pnpm exec playwright install chromium webkit on first run)
pnpm run test:interop Optional loopback OpenSSH and Go gateway tests (tests/interop/README.md)
pnpm run verify Full local gate: typecheck + tests + frontend build + browser E2E
pnpm run deploy:test Build and deploy to the isolated cloudssh-test environment

Branching & CI Policy

  • No feature branches: Commit all development and documentation changes directly to test (main is protected for production).
  • Official CI workflow: Pushes to test run full validation and deploy to cloudssh-test. Production deployments on main verify exact tree parity with a passing full test push without rerunning tests, then realign test if untouched. PRs and manual runs never receive deployment secrets; forks deploy via Cloudflare Git integration and skip owner-restricted official workflows.

Contributors

Thank you to the following contributors for improving CloudSSH's code, compatibility, and user experience:

Contributor Key Contributions
TanXin (@newbietan) Project creator and maintainer; Cloudflare Serverless architecture, SSH/SFTP, AI Agent, security, theming, and engineering infrastructure
David xu (@xqdoo00o) Dropbear compatibility, migration to trzsz file transfer, PTY sizing, and session exit/reconnection improvements
vonl1 (@vonl1) Terminal selection auto-copy, Vim-compatible right-click paste, masked IPv4/IPv6 display with quick full-address copy, and automatic server OS detection with branded icons
Leon Xu (@xuthuslei) Provided fixes for coalesced SSH_MSG_NEWKEYS packet parsing (PR #88) and jump-host authentication timing (PR #109)
DAVID TB (@tbdavid2019) Contributed Traditional Chinese (zh-TW) interface and localized dictionary, expanding frontend language switching and theme editor support (#147)
Zhao Hailong (@GrothKeiran) Self-hosted fonts and icons for the app and theme editor, icon subsetting scripts and manifest, licenses, and single-HTML build integration (#188)

The list above records users who contributed through Pull Requests, with summaries based on their PRs and the changes actually adopted. One contributor may appear under multiple historical Git author names or email addresses. See GitHub Contributors for the complete commit record. Issues and Pull Requests are welcome.

Community Thanks

We also thank everyone who reports problems through Issues, suggests improvements, joins discussions, helps test CloudSSH, and shares feedback. Your support continually improves the project's compatibility, stability, and user experience.

Sponsor

If CloudSSH has been helpful to your workflow or projects, consider sponsoring the project on Afdian. Your support helps sustain ongoing maintenance, optimization, and feature development!

Sponsor on Afdian

Special Thanks

Open-Source Projects

  • FreeRDP — CloudSSH compiles FreeRDP's SDL client to WebAssembly as the core of its browser-based Windows Remote Desktop client. It handles the RDP protocol, TLS/NLA, and desktop graphics. Thank you to the FreeRDP community for developing and maintaining it.

Sponsors

Special thanks to those who financially support CloudSSH's ongoing maintenance and development. Your encouragement helps keep the project moving forward!

  • shunia shunia — Thank you for supporting this project through Afdian.

License

This project is open-sourced under the Apache License 2.0.

Original Author and Attribution Requirement: CloudSSH was initiated and architected by TanXin (@newbietan), who continues to maintain the project. Any modified, derivative, or redistributed version based on this project must retain the license, copyright, and attribution notices in LICENSE and NOTICE, and clearly state and credit the original author and original project link.

Commercial use, modification, and redistribution remain governed by the Apache License 2.0. The attribution requirement above preserves the source and authorship of the original project without restricting other rights granted by the license.

Issues and Pull Requests are welcome to help build the community. If you find this project helpful, please consider giving it a ⭐ Star. Thank you very much for your support!

Star History

Explore related projects

Loading…