Deploy static websites to Static.app hosting. Use when the user wants to deploy, upload, or host a static site on Static.app. Triggers on phrases like "deploy to static.app", "upload to static", "host on static.app", "static.app deploy", or when working with the Static.app hosting service.
Deploy static websites and applications to Static.app hosting directly from OpenClaw.
All Static.app operations in your workspace use a dedicated folder structure:
workspace/
└── staticapp/ # Main folder for all Static.app operations
├── new-site/ # New sites created locally
└── {pid}/ # Downloaded existing sites (by PID)
staticapp/ subfolders before deploymentstaticapp/{pid}/ for editingStatic.app automatically creates clean URLs from your filenames:
| File | URL |
|---|---|
index.html | / (homepage) |
about.html | /about |
portfolio.html | /portfolio |
contact.html | /contact |
No subdirectories needed! Just create .html files in the root folder.
my-site/
├── index.html # Homepage → /
├── about.html # About page → /about
├── portfolio.html # Portfolio → /portfolio
├── contact.html # Contact → /contact
├── style.css # Stylesheet
├── js/ # JavaScript files
│ ├── main.js
│ └── utils.js
└── images/ # Images folder
├── logo.png
└── photo.jpg
For JS apps, build first, then deploy the dist (or build) folder:
# Build your app
npm run build
# Deploy the dist folder
node scripts/deploy.js ./dist
sk_)STATIC_APP_API_KEY env var# Create your pages
echo '<h1>Home</h1>' > index.html
echo '<h1>About</h1>' > about.html
echo '<h1>Portfolio</h1>' > portfolio.html
# Deploy
node scripts/deploy.js
node scripts/deploy.js ./my-site
node scripts/deploy.js . --pid olhdscieyr
node scripts/list.js
node scripts/files.js YOUR_PID
Options:
--raw — Output raw JSON-k <key> — Specify API keynode scripts/delete.js YOUR_PID
Options:
-f, --force — Skip confirmation prompt-k <key> — Specify API keyDownload an existing site to your workspace for editing:
node scripts/download.js YOUR_PID
This will:
staticapp/{pid}/Options:
-p, --pid — Site PID to download-o, --output — Custom output directory (default: ./staticapp/{pid})-k <key> — Specify API key--raw — Output raw JSON responseExample:
# Download site to default location
node scripts/download.js abc123
# Download to custom folder
node scripts/download.js abc123 -o ./my-site
node scripts/deploy.js [SOURCE_DIR] [OPTIONS]
Arguments:
SOURCE_DIR Directory to deploy (default: current directory)
Options:
-k, --api-key API key (or set STATIC_APP_API_KEY env var)
-p, --pid Project PID to update existing site
-e, --exclude Comma-separated exclude patterns
--keep-zip Keep zip archive after deployment
The following are automatically excluded from deployment:
node_modules.git, .github*.mdpackage*.json.env.openclaw.html pagesimages/ folder or rootjs/ folder or rootdist/ or build/ folder after npm run build# 1. Build your React/Vue/Angular app
npm run build
# 2. Deploy the build output
node scripts/deploy.js ./dist --pid YOUR_PID
POST https://api.static.app/v1/sites/ziparchive (zip file) and optional pidGET https://api.static.app/v1/sitesAccept: application/jsonGET https://api.static.app/v1/sites/files/{pid}Accept: application/jsonDELETE https://api.static.app/v1/sites/{pid}Accept: application/jsonGET https://api.static.app/v1/sites/download/{pid}Accept: application/jsonarchiver — Zip archive creationform-data — Multipart form encodingnode-fetch — HTTP requestsadm-zip — Zip extractionInstall with: cd scripts && npm install
On success, the script outputs:
✅ Deployment successful!
🌐 Site URL: https://xyz.static.app
📋 PID: abc123
STATIC_APP_URL=https://xyz.static.app
STATIC_APP_PID=abc123
STATIC_APP_API_KEY env var or --api-key