Render, Fly & Railway
Every platform needs the same three things:
- Start command:
uvicorn app:app --host 0.0.0.0 --port $PORT --proxy-headers - Persistent disk mounted at your app’s
.dyuidirectory, or setApp(data_dir=...)to the mount path - Environment variables: your model API key, plus
DYUI_SECRETif you usepassword=. Each provider’s variable name is on API keys & environment.
Run a single instance (or enable sticky sessions); see Production server.
Render
Section titled “Render”Create a Web Service from your repository.
| Setting | Value |
|---|---|
| Build command | pip install -r requirements.txt |
| Start command | uvicorn app:app --host 0.0.0.0 --port $PORT --proxy-headers |
| Disk | Mount path /opt/render/project/src/.dyui |
| Instances | 1 |
Fly.io
Section titled “Fly.io”Use the Docker image, then:
fly launch --no-deployfly volumes create dyui_data --size 1fly secrets set OPENAI_API_KEY=... DYUI_SECRET=...[mounts] source = "dyui_data" destination = "/app/.dyui"
[http_service] internal_port = 8000 force_https = true min_machines_running = 1Railway
Section titled “Railway”Deploy the repository (or the Dockerfile), then:
- set the start command to
uvicorn app:app --host 0.0.0.0 --port $PORT --proxy-headers; - add a Volume mounted at
/app/.dyui; - add your API keys under Variables.
Serverless platforms
Section titled “Serverless platforms”DyUI streams long-lived responses and keeps conversation state on disk, which suits containers and VMs. Serverless functions with short timeouts and ephemeral filesystems are a poor fit unless you add your own Store and keep replies short.