Documentation

Welcome to ThatWebHostingGuy documentation. Learn how to deploy and manage your static websites.

New to TWHG? Start with the Quick Start guide to deploy your first site in under 2 minutes.

Quick Start

Get your first site deployed in 3 simple steps:

1. Install the CLI

# Install globally with npm
npm install -g twhg

# Or use npx without installing
npx twhg deploy ./my-site

2. Login to your account

twhg login

This will open your browser to authenticate, or you can use an API key:

twhg login --api-key YOUR_API_KEY

3. Deploy your site

# Deploy the current directory
twhg deploy .

# Deploy a specific folder
twhg deploy ./dist

# Deploy with a custom subdomain
twhg deploy ./build --name my-awesome-site

Your site is now live at https://my-awesome-site.thatwebhostingguy.com

CLI Installation

The TWHG CLI requires Node.js 16 or higher.

# Install with npm
npm install -g twhg

# Verify installation
twhg --version

twhg login

Authenticate with your ThatWebHostingGuy account.

# Interactive browser login
twhg login

# Login with API key
twhg login --api-key twhg_xxxxxxxxxxxx

# Check current login status
twhg whoami

API keys can be generated from your account settings.

twhg deploy

Deploy a directory as a static website.

twhg deploy <directory> [options]

Options:
  --name, -n     Subdomain name (default: directory name)
  --force, -f    Overwrite existing site
  --message, -m  Deployment message/description

Examples:
twhg deploy ./dist
twhg deploy ./build --name my-site
twhg deploy . -f -m "Bug fixes"

twhg sites

List and manage your deployed sites.

# List all sites
twhg sites

# Get details for a specific site
twhg sites my-site

# Output as JSON
twhg sites --json

twhg rollback

Revert to a previous deployment.

# Rollback to previous version
twhg rollback my-site

# Rollback to specific version
twhg rollback my-site --version 3

# List available versions
twhg rollback my-site --list

twhg delete

Delete a deployed site.

# Delete with confirmation
twhg delete my-site

# Force delete without confirmation
twhg delete my-site --force
Warning: Deleting a site is permanent and cannot be undone.

Custom Domains

Connect your own domain to any site (Starter plan and above).

Setup Steps

  1. Go to your Dashboard and select your site
  2. Click "Add Custom Domain"
  3. Enter your domain (e.g., www.example.com)
  4. Add the verification TXT record to your DNS
  5. Add a CNAME record pointing to your TWHG subdomain
  6. Click "Verify Domain"

DNS Configuration Example

TypeNameValue
TXT_twhg-verifytwhg-verify-abc123...
CNAMEwwwmy-site.thatwebhostingguy.com

Git Deployments

Connect a GitHub repository for automatic deployments on every push.

Setup

  1. Go to your site settings in the Dashboard
  2. Click "Connect Repository"
  3. Enter your GitHub repository URL
  4. Select the branch to deploy from
  5. Copy the webhook URL and secret
  6. Add the webhook to your GitHub repository settings

Build Support

If your repository has a package.json with a build script, it will be automatically executed.

Supported output directories: dist, build, public, out, _site

SSL Certificates

All sites get free SSL certificates automatically via Let's Encrypt.

Analytics

Track your site's performance with built-in analytics (Growth plan and above).

Teams

Collaborate with team members on your sites (Pro plan and above).

Two-Factor Authentication

Secure your account with TOTP-based two-factor authentication.

  1. Go to Account Settings
  2. Click "Enable 2FA"
  3. Scan the QR code with your authenticator app
  4. Enter the verification code
  5. Save your backup codes securely

API Authentication

Authenticate API requests using your API key.

curl -H "Authorization: Bearer twhg_your_api_key" \
  https://www.thatwebhostingguy.com/api/sites

Sites API

List Sites

GET /api/dashboard/sites

Get Site Details

GET /api/dashboard/sites/:id

Delete Site

DELETE /api/dashboard/sites/:id

Deploy API

Deploy a Site

POST /api/deploy
Content-Type: multipart/form-data

Form Data:
- site: ZIP file containing your site
- name: Subdomain name
- description: Optional deployment message
Need help? Contact us at support@thatwebhostingguy.com