H
Hostess

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

Terminal
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:

FlagApplies toDefaultWhat it sets
--nameallwebService name
--publicalltype defaultvisibility: public
--portnextjs, fastapitype default (3000 / 8000)Listen port
--spastaticfalseSPA fallback to index.html
--outputstatic directoryNative Build defaultOutput directory
--build-commandstatic directorypackage.json buildBuild command
  • Use a single HTML file with --spa if you want SPA fallback routing.
  • Use a directory when you need to specify --output or --build-command.
  • The --port flag is available for Next.js and FastAPI deployments.
  • Use --public to make your deployment public:
    • FastAPI defaults to private.
    • Next.js and static sites default to public.
Terminal
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.

Terminal
hostess deploy ./api --type fastapi --project my-api --print-config
stdout
version: "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.

Terminal
hostess deploy ./api --type fastapi --project my-api --save

After --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.

On this page