Developer documentation

StaticHost CLI

Deploy and manage statichost sites from your terminal. Every command below is copy-ready and uses the statichost CLI for this brand.

Before you start: install PHP with curl and zip extensions, then create an API token on this brand. Tokens and sites are isolated per brand.

First deploy, from start to finish

Replace my-site and <site-id>. Your project must have index.html or index.php at its root.

curl -fsSL https://statichost.se/install.sh | bash
statichost create --name=my-site --type=static
statichost sites
cd /path/to/my-site
statichost deploy --site=<site-id> --path=.
statichost open --site=<site-id>

Every CLI command

Copy one example or copy the full Markdown guide for an AI chat or a .md file.

Install

curl -fsSL https://statichost.se/install.sh | bash

Installs the brand-specific command and configuration.

First deploy

statichost create --name=my-site --type=static
statichost sites
cd /path/to/my-site
statichost deploy --site=<site-id> --path=.
statichost open --site=<site-id>

Use --type=php for PHP or WordPress. The site ID comes from the create response or sites list.

List and inspect

statichost sites
statichost status --site=<site-id>

Shows your sites, then status, URL, source, release, and uptime for one.

Environment variables

statichost env --site=<site-id>
statichost env --site=<site-id> --set APP_ENV=production

For eligible PHP sites. Never expose secret values in public logs or tickets.

Logs

statichost logs --site=<site-id>
statichost logs --site=<site-id> --error

Access logs first; server and PHP errors second.

Releases and rollback

statichost releases --site=<site-id>
statichost rollback --site=<site-id> --release=<release-id>

List releases, then restore a previous successful one.

Custom domain

statichost domain --site=<site-id> --set=www.example.com
statichost domain --site=<site-id> --verify
statichost domain --site=<site-id> --remove

Set a domain, create the returned DNS record, verify SSL, or remove it.

Database

statichost db --site=<site-id> --create
statichost db --site=<site-id>
statichost db --site=<site-id> --delete

Create, view, or permanently delete a MySQL database for an eligible PHP site.

Delete a site

statichost delete --site=<site-id>

Permanently deletes the selected site. Confirm the ID before running it.