Hostwares

Tutorials

Step-by-step guides to get the most out of Hostwares.

Deploy Next.js App in 60 Seconds

The fastest path from code to production.

1.

Sign up at hostwares.com/register (free, no credit card).

2.

Go to Dashboard → Sites → New Site.

3.

Paste your GitHub repo URL (e.g. github.com/you/my-nextjs-app).

4.

Auto-detected: Framework (Next.js), build command, port. No config needed.

5.

Select pack → Pay (balance or PayPal) → Site deploys automatically.

6.

Done! Your site is live at your-app.hostwares.app with SSL.

Deploy with the CLI

Terminal-based deployment in 3 steps.

Step 1: Install

curl -fsSL https://hostwares.com/install.sh | bash

Step 2: Login (opens browser)

$ hw login
  Opening browser...
  ✓ Logged in successfully!

Step 3: Deploy

$ cd my-project
$ hw deploy
✓ Detected Next.js
✓ Deployed to my-project.hostwares.app
✓ SSL provisioned
🟢 https://my-project.hostwares.app

Works with: Next.js, Nuxt, Vite, Astro, Express, FastAPI, Go, Rust, Docker, and more.

Use Hostwares from Cursor (MCP)

Deploy and manage directly from your AI editor.

Step 1: Install MCP server

npm install -g hostwares-mcp

Step 2: Get API key

Go to Dashboard → API Keys → Create New.

Step 3: Add to Cursor

Create .cursor/mcp.json in your project:

{
  "mcpServers": {
    "hostwares": {
      "command": "hostwares-mcp",
      "env": { "HOSTWARES_API_KEY": "your-key-here" }
    }
  }
}

Step 4: Use it

In Cursor chat, type:

"Deploy this project to Hostwares"

Also works with Claude Desktop, Windsurf, and any MCP-compatible editor.

Connect a Custom Domain

Use your own domain with automatic SSL.

1.

Go to your site → Settings tab.

2.

Set domain to https://yourdomain.com

3.

At your DNS provider, add: A yourdomain.com → 167.233.40.87

4.

Wait 1-2 min → SSL auto-provisions via Let's Encrypt.

Or use CLI: hw domain my-app yourdomain.com

Deploy Full Stack (Next.js + PostgreSQL)

App + database, connected with env vars.

1.

Deploy your Next.js app (see tutorial above).

2.

Go to Databases → New Database → PostgreSQL.

3.

Copy the connection URL from the database detail page.

4.

Go to your site → Env Vars → Add DATABASE_URL = postgresql://...

5.

Redeploy. Your app now connects to the database.

Or use AI: hw ask "create a postgresql database and connect it to my-app"

Set Up CI/CD with GitHub Actions

Auto-deploy on every push to main.

Create .github/workflows/deploy.yml:

name: Deploy to Hostwares
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: curl -fsSL https://hostwares.com/install.sh | bash
      - run: hw login --token ${{ secrets.HOSTWARES_TOKEN }}
      - run: hw deploy --name my-app

Add HOSTWARES_TOKEN to your repo's GitHub Secrets (Settings → Secrets → Actions).

Use AI to Troubleshoot Failures

AI reads your logs and tells you what went wrong.

$ hw ask "why did my-app fail to deploy?"

Looking at deployment logs...

Error found: "Cannot find module 'prisma'"
→ prisma is in devDependencies but not dependencies.

Fix: Run npm install prisma --save
Then redeploy: hw redeploy my-app

Would you like me to redeploy now?

Works in the CLI, the dashboard chat, or through MCP in Cursor.

Deploy a Private GitHub Repo

Connect your GitHub account to deploy private repos.

1.

Go to Settings → Connections → Connect GitHub.

2.

Authorize Hostwares to access your repos.

3.

Deploy as normal — private repos now appear in the repo picker.

4.

Hostwares auto-generates a deploy key per repo (read-only SSH key).