GenerateSaaS

Render

Run the node deploy target on Render as a managed Web Service built from the owner app's Dockerfile, with attached Postgres and a Key Value cache.

Render is managed cloud for long-running web services. It runs the standard node target - the same Dockerfile you would run anywhere - and supports both fullstack and separate.

Deploy

Create a Web Service. In the Render dashboard pick New → Web Service and connect your repository.

Choose the Docker runtime so Render builds the owner app's Dockerfile - the frontend app's for fullstack, apps/backend/Dockerfile (EXPOSE 3010) for separate. A Node build also works; the Dockerfile is the portable default.

For a frontend image, set NEXT_PUBLIC_API_URL=https://yourdomain.com/api as an environment variable before the first build - Render exposes env vars to Docker builds, and Next.js bakes it into the browser bundle at build time (see Self-hosting with Docker).

Add environment variables in the service's Environment tab (table below). They are validated at boot - the server throws if any are missing or malformed.
Attach a database and cache. Add a Render PostgreSQL instance, or any external DATABASE_URL. For cache, the provider chosen at init decides the vars - see the table below and Caching.
Deploy. Render builds the image and runs CMD pnpm start. The schema step the CLI prepended to the owner's start script applies migrations before the server boots.
Use the TLS domain. Render issues a managed *.onrender.com URL, or attach a custom domain. Set that origin as API_URL / BASE_URL and add it to TRUSTED_ORIGINS.

Required environment variables

Set these before the first deploy - validated at boot by @repo/runtime. Full list in Environment variables.

VariablePurpose
DATABASE_URLPostgres connection, required by the boot-time schema step
BETTER_AUTH_SECRETAuth signing secret, min 32 chars
API_URLThe backend's public URL - your Render domain
REDIS_URLCache connection, only on the self-hosted Redis variant
UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKENCache connection, only on the Upstash variant
INNGEST_APP_ID, INNGEST_EVENT_KEY, INNGEST_BASE_URLBackground jobs
TRUSTED_ORIGINSComma-separated production domains for CORS and Better Auth
TRUSTED_PROXYNot needed - Render's load balancer is detected from its own RENDER variable. Verify per Client IP

Database and cache options

The cache provider is fixed at init - set the vars for that variant only, never both.

ServiceRender-hostedExternal managed
PostgresRender PostgreSQL → DATABASE_URLNeon or Supabase → DATABASE_URL (Database)
Cache (Redis variant)Render Key Value → REDIS_URLSelf-hosted Redis → REDIS_URL
Cache (Upstash variant)-Upstash → UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN

pnpm infra has no place here - it is local development only. On Render the database and cache are managed services you attach.

Never deploy a --demo build - its schema step resets the database and force-pushes the schema on every boot.

On this page