GitHub Repository
Deploy any public GitHub repository. Hostwares clones the repo, auto-detects the framework, and configures optimal build settings.
Setup
- Click New Project → GitHub Repository
- Enter the repository URL (e.g.,
github.com/user/my-app) - Select the branch (default:
main) - Review auto-detected settings
- Click Deploy
Auto-detected settings
Repository: github.com/user/my-app
Branch: main
Build command: npm run build (detected from package.json)
Start command: npm start (detected from package.json)
Port: 3000 (detected from framework)
Node version: 20 (detected from engines field)Supported package managers
- npm — Detected via
package-lock.json - yarn — Detected via
yarn.lock - pnpm — Detected via
pnpm-lock.yaml - bun — Detected via
bun.lockb
Docker Image
Deploy pre-built images from Docker Hub or any container registry:
Image: nginx:alpine
Port: 80
Image: node:20-alpine
Port: 3000
Command: node server.js
Image: ghcr.io/user/my-app:latest
Port: 8080Private registries
For private images, provide registry credentials in your site's environment variables:
DOCKER_REGISTRY_URL=ghcr.io
DOCKER_REGISTRY_USER=username
DOCKER_REGISTRY_TOKEN=ghp_xxxxDockerfile
Full custom control — paste any valid Dockerfile and we build it:
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
EXPOSE 3000
ENV NODE_ENV=production
CMD ["npm", "start"]Multi-stage builds
We recommend multi-stage builds to minimize image size. The final stage should contain only runtime dependencies.
Build Settings
Configure these per site from Site → Settings → Build:
| Setting | Description | Example |
|---|---|---|
| Build command | Command to build your app | npm run build |
| Start command | Command to start the app | npm start |
| Install command | Dependency installation | npm ci |
| Port | Port your app listens on | 3000 |
| Root directory | Subdirectory for monorepos | apps/web |
| Node version | Runtime version | 20 |
Environment Variables
Set environment variables before deploying — they're available during both build and runtime:
- From the dashboard: Site → Environment
- Via AI:
"Set DATABASE_URL to postgres://... on my-site" - Via API:
PATCH /api/sites/:idwith envVariables
See the Environment Variables guide for full documentation.
Rollbacks
Every successful deployment is stored. To rollback:
- Go to Site → Deployments
- Find the previous working deployment
- Click Rollback to this version
Or via AI: "Rollback my-site to the previous deployment"
Rollbacks are instant (no rebuild needed) and use the same container image from the original deployment.
Zero-Downtime Deploys
Hostwares uses a blue-green deployment strategy:
- New container is built and started
- Health checks verify the new container is healthy
- Traffic is switched to the new container
- Old container is stopped and removed
If the new container fails health checks, the deployment is marked as failed and the old container continues serving traffic.
Deployment Statuses
| Status | Meaning | Action |
|---|---|---|
QUEUED | Waiting to build | Wait — build will start soon |
BUILDING | Build in progress | Watch build logs for progress |
DEPLOYING | Container starting | Wait for health check |
RUNNING | Live and healthy | No action needed |
STOPPED | Manually stopped | Start when ready |
FAILED | Build or runtime error | Check logs, fix, redeploy |
Triggering Deploys
Multiple ways to trigger a new deployment:
- Dashboard — Click Redeploy on the site page
- AI —
"Redeploy my-site"or"Deploy my-site from the develop branch" - API —
PATCH /api/sites/:id { "action": "deploy" } - Git push — Automatic deploy on push to configured branch
Common Issues
- Build fails — Check logs for missing deps, wrong Node version, or TypeScript errors
- Port mismatch — Ensure your app listens on the configured port (use
process.env.PORT) - Missing env vars — Add all required variables before deploying
- Out of memory — Upgrade plan or optimize your build
- Timeout — Build exceeds 10-minute limit. Optimize or use a pre-built Docker image
For detailed solutions, see the Troubleshooting guide.