Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Recipes

This is the primary entry point for StartOS service packaging — for both you and your AI coding agent. Each recipe describes a common packaging pattern, names the SDK constructs involved, links to reference pages for API details, and points to real packages for working code. Your agent reads these to understand what to build; you read them to understand what to ask for.

If you’re using Claude Code (recommended), point your agent at the recipe for your task and let it follow the reference and package links from there.

Configuration

RecipeDescription
Set Up a Basic ServiceMinimal single-container service with a web UI, health check, and backup
Create Configuration ActionsLet users configure your service through actions with input forms
Generate Config FilesProduce YAML, TOML, INI, JSON, or ENV files from user settings using FileModel
Pass Config via Environment VariablesConfigure your service through environment variables in the daemon definition
Hardcode Config ValuesLock down ports, paths, or auth modes so users cannot change them
Set a Primary URLLet users choose which hostname the service uses for links, invites, and federation
Set Up SMTP / EmailLet users configure email sending with disabled/system/custom modes

Credentials & Access Control

RecipeDescription
Auto-Generate Internal SecretsGenerate passwords or tokens in init for internal use (database auth, secret keys)
Prompt User to Create Admin CredentialsCritical task on install that triggers an action to generate and display a password
Reset a PasswordAction that regenerates credentials and updates the running application
Gate User RegistrationToggle action that enables/disables public signups with a dynamic label

Setup & Lifecycle

RecipeDescription
Require Setup Before StartingBlock service startup with a critical task until the user completes configuration
Run One-Time Setup on InstallGenerate passwords, seed databases, or bootstrap config on first install only
Bootstrap via Temporary Daemon ChainStart the service during init, call its API to bootstrap, then tear it down
Handle Version UpgradesMigrate data between package versions using the version graph
Handle Restore from BackupRe-register services or fix state after restoring from backup

Daemons & Containers

RecipeDescription
Run Multiple ContainersApp + database, app + cache, app + worker — multi-daemon setups
Run a PostgreSQL SidecarPassword generation, pg_isready health check, pg_dump backup
Run a MySQL/MariaDB SidecarMySQL daemon, health check, mysqldump backup and restore
Run a Redis/Valkey CacheEphemeral cache daemon with valkey-cli ping health check
Create Dynamic DaemonsVariable number of daemons based on user configuration
Run a One-Shot CommandMigrations, file ownership fixes, or setup scripts before the main daemon starts

Networking

RecipeDescription
Expose a Web UISingle HTTP interface for browser access
Expose Multiple InterfacesRPC, API, peer, WebSocket, or SSH on different ports
Expose an API-Only InterfaceProgrammatic access with no browser UI

Dependencies

RecipeDescription
Depend on Another ServiceDeclare a dependency, read its connection info, and auto-configure
Enforce Settings on a DependencyCreate a cross-service task that requires specific dependency configuration
Mount Volumes from Another ServiceRead-only access to a dependency’s data volume
Support Alternative DependenciesLet users choose between backends (e.g., LND vs CLN)

Data & Health

RecipeDescription
Back Up and Restore DataVolume snapshots, pg_dump, mysqldump, and incremental rsync strategies
Add Standalone Health ChecksSync progress, reachability, and other ongoing checks beyond daemon readiness