Quick Start
Deploy a full-stack application with Hostess in under 5 minutes.
This guide walks you through deploying a Next.js application with a PostgreSQL database to Hostess. By the end, you will have a live, fully connected application stack running in production.
Prerequisites
Before you begin, make sure you have:
- The Hostess CLI installed
- A Hostess account (run
hostess loginif you haven't already) - A project directory with a Next.js application (or follow along to create one)
Install the CLI
If you haven't already, install the Hostess CLI:
curl -fsSL https://hostess.sh/install.sh | shVerify the installation:
hostess --versionhostess version 0.1.xYour output may show a different version until you reinstall from the latest release via the install script.
Log in to your account
Authenticate with your Hostess account:
hostess loginhostess login runs an interactive flow in the terminal (not a browser). The flow is always email → OTP:
Login to Hostess
Enter your email address:
you@example.comIf the email is new, Hostess asks for first name and last name before sending the code. Then:
Check your email!
Enter code:
482901
✓ Logged in as you@example.comUse ↑/↓, Enter, Esc as indicated in each screen. Press r on the code step to resend the OTP.
Create your project directory
If you already have a Next.js app, navigate to its root directory. Otherwise, create a new one:
npx create-next-app@latest my-app
cd my-appYour project directory should look something like this:
my-app/
├── app/
│ ├── layout.tsx
│ └── page.tsx
├── package.json
├── Dockerfile
├── next.config.ts
└── ...Your project needs a Dockerfile so Hostess can build it. If you don't have one yet, here is a simple Dockerfile for a Next.js application:
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/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]Make sure your next.config.ts includes output: 'standalone' for this Dockerfile to work.
Write your hostess.yml
Create a hostess.yml file in the root of your project. This file tells Hostess what services to deploy and how they connect:
version: "1.0"
name: my-app
services:
web:
type: nextjs
build:
source: .
env:
DATABASE_URL: ${database.url}
depends_on:
- database
database:
type: postgres
resources: smallThis configuration defines two services:
web— Your Next.js application, built from the current directory. It receives aDATABASE_URLenvironment variable that automatically points to the Postgres database.database— A managed PostgreSQL database with thesmallresource preset (0.5 CPU, 512Mi memory, 10Gi storage).
The depends_on field ensures the database is healthy before the web service starts. The magic variable ${database.url} is resolved automatically at deploy time with the full database connection string, including the password.
Deploy
Run the deploy command from your project directory:
hostess deployIf the project name from hostess.yml does not exist yet, the CLI prompts you to pick an organization (project name is already known from the file — there is no separate “project name” prompt):
Project not found
Project 'my-app' does not exist. Create it in which organization?
▸ Acme (acme)
Personal (personal)
↑/↓ to select, Enter to confirm, Esc to cancelAfter you confirm, a line like this is printed before the deploy UI runs:
✓ Project 'my-app' created in organization 'acme'If you omit --env, Hostess uses the most recently created environment for that project. New projects are provisioned with production first, then preview, so the usual default is preview. Use hostess deploy --env production (or another name) when you need a specific target.
While the deployment runs, the CLI shows a five-step progress view (wording and sub-lines update as the API reports build/service state). It looks conceptually like this:
Deploying project: my-app
Environment: preview
Services: database, web
[1/5] Validating config... done
[2/5] Creating deployment... done (dep_abc123)
[3/5] Building images...
- web: built
[4/5] Starting services...
- database: ready
- web: ready
[5/5] Finalizing... doneWhen everything succeeds, the same header is shown again with a short summary (IDs and URLs are examples):
Deploying project: my-app
Environment: preview
Services: database, web
Deployment complete
Deployment ID: dep_abc123
web: https://my-app-web-k7xm9p2q.hostess.run
database: connection info available via `hostess inspect dep_abc123`
→ View deployment: https://hostess.sh/dashboard/org/acme/projects/prj_xyz/deployments/dep_abc123For private database services, the completion screen points at hostess inspect with that deployment id for connection details. You can still run hostess connect database or hostess ps to work with the service.
If you added custom domains that are still pending DNS verification, the CLI may print Custom domain DNS records: with CNAME lines after a successful deploy.
Visit your application
Open the URL from the deploy output in your browser:
open https://my-app-web-k7xm9p2q.hostess.runYour Next.js application is live, connected to a fully managed PostgreSQL database, with automatic HTTPS.
View in Studio
The Hostess Studio is a web dashboard where you can monitor your deployments, view logs, manage services, and more. Visit:
https://hostess.shIn Studio, you will see:
- Your project with its services listed
- Deployment status and history
- Service details including URLs, resource usage, and logs
- Database dashboards with connection info and metrics
You can also view your deployment from the CLI:
hostess pshostess ps is an alias for hostess services list. The table includes a PORTS column; ready services show status Running (not “healthy”):
SERVICE TYPE STATUS PORTS URL
────────────────────────────────────────────────────────────────────────────────
web nextjs Running 3000 https://my-app-web-k7xm9p2q.hostess.run
database postgres Running 5432 hostess connect databaseWhat just happened?
When you ran hostess deploy, Hostess performed the following behind the scenes:
- Parsed your
hostess.ymland validated the configuration - Uploaded your source code and built a container image for the
webservice - Provisioned a managed PostgreSQL database for the
databaseservice - Resolved magic variables — the
${database.url}reference was replaced with a fullpostgresql://...connection string containing auto-generated credentials - Deployed services in dependency order — the database was started first, and the web service was deployed only after the database was healthy
- Issued TLS certificates for your
*.hostess.runURLs - Set up routing so your application is accessible from the internet
Making changes
To redeploy after making changes to your code, simply run:
hostess deployHostess will rebuild your services, detect what has changed, and deploy only the updated components.
Deploy specific services
If you only changed your web service and want to skip rebuilding everything:
hostess deploy -s webThis deploys just the web service while keeping the database and other services as-is.
Using Hostess with AI agents
If you use an AI coding agent (Claude Code, Codex, Cursor, etc.), install the Hostess skill so your agent understands hostess.yml, CLI commands, and deployment workflows without guessing:
npx skills add howl-cloud/agent-skills --skill hostess --agent claude-codeSee the AI Agents page for installation instructions for other agents and example prompts.
Next steps
Configuration Reference
Learn about all the options available in hostess.yml, including environment variables, domains, scaling, lifecycle hooks, and more.
Magic Variables
Understand how services discover and connect to each other using magic variables.
Service Types
Explore all supported service types and their smart defaults.
Environments
Set up preview environments, staging, and custom environments for your project.