Push to deploy
Install the Hostingsurge GitHub App, or add a push webhook in GitLab, Bitbucket, Gitea or Forgejo. Every push to your production branch builds and deploys.
Developers
Hostingsurge has a REST API, a CLI and an MCP server. Push to deploy from any Git host, trigger builds with deploy hooks, and get JSON out of every CLI command for scripts, CI and AI agents.
Deploy a folder, follow logs and manage environment variables, domains, databases, WordPress and imports without opening the dashboard.
--json to any command for machine-readable outputHOSTINGSURGE_TOKEN in CI and skip the login step# Install once (or run single commands with npx) npm i -g https://hostingsurge.com/cli/hostingsurge.tgz # Sign in with a token from Settings → Tokens hostingsurge login # Link this folder, deploy it and follow the logs hostingsurge link hostingsurge deploy --prod hostingsurge logs --follow # In CI: token from the environment, JSON output export HOSTINGSURGE_TOKEN=<token> hostingsurge deploy --prod --project my-app --json
Every command, with an example. hostingsurge help <command> lists all options.
| Command | What it does | Example |
|---|---|---|
login · logout · whoami | Save an API token, remove it, or show who you are signed in as | hostingsurge login |
projects · link · open | List projects, link this folder to one, open the live site | hostingsurge link |
deploy [dir] --prod | Upload a folder, build it and wait for the URL | hostingsurge deploy --prod |
logs --follow | Stream runtime logs, or build logs with --build | hostingsurge logs --follow |
env ls · add · rm · pull | Manage environment variables, or pull them into a local file | hostingsurge env pull |
domains ls · add · verify · rm | Add custom domains and get the DNS records to set | hostingsurge domains add www.example.com |
import <source> | Move a site, app or database from git, vercel, netlify, wordpress, db, snapshot, cpanel or sftp | hostingsurge import vercel my-app |
databases | Create, attach, back up and restore managed databases, and toggle public access | hostingsurge databases ls |
wordpress | Status, updates, hardening, auto-updates, admin password reset, health checks and backups | hostingsurge wordpress status |
email | Email domains, mailboxes and transactional sending | hostingsurge email domains ls |
cron · hooks · webhook | Scheduled commands, deploy hooks and push-to-deploy | hostingsurge hooks add nightly |
JSON over HTTPS, authenticated with a bearer token. The OpenAPI spec describes every endpoint, so you can generate a client in the language you use.
https://hostingsurge.com/api/v1API=https://hostingsurge.com/api/v1 # List your projects curl $API/projects \ -H "Authorization: Bearer $HOSTINGSURGE_TOKEN" # Deploy one of them again curl -X POST $API/projects/$PROJECT_ID/deployments \ -H "Authorization: Bearer $HOSTINGSURGE_TOKEN" # Download the OpenAPI spec curl $API/openapi.json
Deploy on every push, redeploy from anywhere and roll back when you need to.
Install the Hostingsurge GitHub App, or add a push webhook in GitLab, Bitbucket, Gitea or Forgejo. Every push to your production branch builds and deploys.
A secret URL that redeploys your project when something sends a POST to it: a CMS, a CI job or a scheduled task.
Roll production back to an earlier deployment, or promote a ready one, from the dashboard or the API.
From the terminal
# Create a deploy hook (the URL is shown once) hostingsurge hooks add nightly # Redeploy from anywhere curl -X POST "$DEPLOY_HOOK_URL" # Push-to-deploy from any Git host: create the webhook secret hostingsurge webhook rotate
The Hostingsurge MCP server gives Claude, ChatGPT, Cursor and VS Code 72 tools. They connect by signing in, so there is no key to paste.
/llms.txt describes the platform for AI agents# Claude Code: add the server, then run /mcp to sign in claude mcp add --transport http hostingsurge \ https://hostingsurge.com/mcp # A guide to the platform, written for AI agents curl https://hostingsurge.com/llms.txt
Create an API token in the dashboard under Settings → Tokens. Tokens work across the whole team: send one as a bearer token to the API, save it with hostingsurge login, or set HOSTINGSURGE_TOKEN in CI.
The OpenAPI spec at /api/v1/openapi.json describes every endpoint. Load it into your API client or generate a typed client from it.
Yes. Add --json to any command for machine-readable output and set HOSTINGSURGE_TOKEN so there is no login prompt. For assistants like Claude or ChatGPT, the MCP server is usually the better fit.
GitHub through the Hostingsurge GitHub App, and GitLab, Bitbucket, Gitea and Forgejo through push webhooks. You can also import a repository from any Git URL, including private ones through a read-only deploy key.
Yes. hostingsurge deploy uploads a folder and deploys it, and in the dashboard you can drag and drop a folder or a .zip file.
Create a free account, make a token under Settings → Tokens and ship your first project from the command line.