Deploy without hostess.yml
Deploy a FastAPI, Next.js, or static app from a folder or HTML file with one command.
Point hostess deploy at a directory or an HTML file. Hostess synthesizes a one-service config, uploads the source, and deploys it — no hostess.yml required.
Quick mode starts when you pass a path or --type. --project names the Hostess project and is required. The service is named web unless you pass --name. The target environment is production unless you pass --env.
Deploy a folder or file
hostess deploy --type fastapi --project my-api
hostess deploy ./api --type fastapi --project my-api--type with no path uses the current directory. Hostess can also infer FastAPI from requirements.txt or pyproject.toml (PEP 621, Poetry, or uv).
Bare hostess deploy still reads hostess.yml from the current directory. --project by itself still overrides the project name on that path. Quick mode is only the path or --type form.
Pass --type when the directory is ambiguous — for example a generic package.json with no Next.js dependency.
First-deploy flags
These flags apply to the synthesized one-service config:
| Flag | Applies to | Default | What it sets |
|---|---|---|---|
--name | all | web | Service name |
--public | all | type default | visibility: public |
--port | nextjs, fastapi | type default (3000 / 8000) | Listen port |
--spa | static | false | SPA fallback to index.html |
--output | static directory | Native Build default | Output directory |
--build-command | static directory | package.json build | Build command |
- Use a single HTML file with
--spaif you want SPA fallback routing. - Use a directory when you need to specify
--outputor--build-command. - The
--portflag is available for Next.js and FastAPI deployments. - Use
--publicto make your deployment public:- FastAPI defaults to private.
- Next.js and static sites default to public.
hostess deploy ./api --type fastapi --project my-api --public --port 8080
hostess deploy ./site --type static --project my-demo --spa --output dist--file, --repo, and --url select a hostess.yml source. Do not combine them with a path or --type.
Quick mode always deploys the synthesized one-service config. If that directory already has a hostess.yml, Hostess warns and leaves the file as-is.
Keep a hostess.yml
--print-config writes the synthesized YAML to stdout and detection notes to stderr, then exits. It does not sign in or talk to the API.
hostess deploy ./api --type fastapi --project my-api --print-configversion: "1.0"
name: my-api
services:
web:
type: fastapi
source: .--save writes that file and deploys. For a directory it writes hostess.yml inside the directory; for an HTML file it writes hostess.yml beside the file. Hostess writes only when hostess.yml is not already there. Use --print-config or --save, not both.
hostess deploy ./api --type fastapi --project my-api --saveAfter --save, edit hostess.yml for the rest of the stack: more services, databases, secrets, custom domains, replicas, and environment-specific config. See Configuration.
Source uploads
Uploads use the same ignore rules as a hostess.yml deploy: .gitignore, optional .hostessignore, and .dockerignore when .hostessignore is absent. For a directory, the archive root is that directory and source is .. For an HTML file, the archive root is the parent and source is ./file.html.
See Source Uploads for ignore files, required source paths, and size limits.