Skip to main content
Hostwares

Tutorials

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

Deploy a Next.js App

The fastest path from code to production.

1.

Sign up at hostwares.com/register, then pick a pack.

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://cli.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 ask HW: 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://cli.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 HW to Troubleshoot Failures

HW 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).

Migrate Your Lovable App to Hostwares

Your app, its database, sign-in users and uploaded files - one backup command, one upload, one deploy.

1.

Create the destination. A Supabase project for your data and a site for your app.

  • Supabase: open your Supabase instance and create a new project for this app (for example "myapp"). If you don't have an instance yet, order one under Supabase → New first.
  • Site: in Lovable, connect the project to GitHub. Then create a site on Hostwares from that repository. It gets a free *.hostwares.app address; you can add your own domain later.
2.

Back up your Lovable project. Run one command on your own computer. Nothing from Lovable passes through our servers.

macOS / Linux

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

Windows (PowerShell)

irm https://migrate-lovable.hostwares.com/install.ps1 | iex
  • A browser window opens so you can sign in to Lovable. A fresh access token is created automatically and stays on your computer.
  • Pick the project from the list. The tool shows a progress bar while it copies your database, sign-in users and files.
  • When it finishes, everything is in Downloads/Hostwares/<project name>/: a backup-<date>.json file (database, app logic and sign-in users), a storage folder (your uploaded files) and a migrations folder (your schema as SQL).
  • Files in private storage: while copying, the tool briefly makes those storage buckets readable, then locks them again as soon as the copy ends. You don't need to give it any key.
  • Note the summary it prints at the end (tables, rows, functions, access rules, triggers, users, files). You'll use those numbers to check the restore.
3.

Restore into your project. Upload the backup in your project's Restore tab.

  • Zip the whole backup folder - the .json file together with the storage folder. On macOS: right-click the folder → Compress. On Windows: right-click → Send to → Compressed (zipped) folder.
  • Open your Supabase project → Restore → upload the .zip. It restores the database, data, sign-in users and files into the project and shows live progress.
  • If your app has no uploaded files, you can upload the .json on its own. A .json without its storage folder brings no files across.
  • Uploads can be up to 200 MB. For a bigger backup, open a support ticket and we restore it for you.
  • When it finishes, Restore history shows what was restored (tables, rows, app logic, users, files). Compare it with the numbers the backup tool printed.
  • Restoring the same app's backup again into the same project is safe: rows are never duplicated, and only what is missing is added.
4.

Connect your app and deploy. Point the site at your new project, then it rebuilds.

  • On the project's Overview, use "Connect to your frontend site": copy the variables, paste them into your site's Environment tab and redeploy. Or ask HW to do it for you.
  • Lovable apps are built with Vite, so the names start with VITE_. Next.js apps use NEXT_PUBLIC_ and Create React App uses REACT_APP_ instead. The block also includes the plain names (SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY) that apps rendering pages on the server read while running - keep them.
  • These values are baked in when the app is built, so the site rebuilds after you change them. Your current version keeps serving until the new build is ready.
5.

Check it's live. Open your app and sign in.

  • Open your site's address and sign in with an existing account - passwords carried over.
  • Open a page that shows uploaded images or files and check they load.
  • Happy with it? Add your own domain to the site.

Environment variable names, what migrates and troubleshooting: Migrate from Lovable.