Step by step
-
Check your project type
- Static / SPA (Vite, Astro, plain HTML): Build produces a folder of HTML/JS/CSS (dist/, build/, out/).
- Next.js / SSR framework: next.config.* or a server adapter.
- Long-running server (Express, FastAPI, bots, websockets): A start command like node server.js or uvicorn that must keep running.
-
Get the code onto GitHub
- Create a GitHub repo and push (Cursor's Source Control panel or git in the terminal).
-
Create the project on Render
Render Dashboard → New → Static Site (or Web Service for a server), connect GitHub, pick the repository.
-
Check the build settings
Vite static site: build command
npm run build, publish directorydist.For Cursor: build command
Whatever package.json says (usually npm run build), output Depends on framework. -
Add environment variables before the first build
In Render: Service → Environment. Copy these from Cursor:
-
Everything in your local .env — never commit it; add each value in the host dashboard.
Changed a value later? Rebuild. Vite bakes variables in at build time. Troubleshoot missing env vars
-
-
Make page refreshes work (Vite / React Router single-page apps)
Dashboard → Redirects/Rewrites (or render.yaml) # Dashboard rule: Source /* Destination /index.html Action Rewrite routes: - type: rewrite source: /* destination: /index.htmlServer-rendered projects (TanStack Start, Next.js) don't need this. Render docs (opens in a new tab)
-
Update login redirect URLs
Add your new Render URL (and later your custom domain) to your auth provider's allowed URLs. Redirect troubleshooting
-
Add your domain
Service → Settings → Custom Domains → Add. Hobby includes 2 custom domains (then $0.25/domain/month).
What it will cost
Free tier Hobby workspace $0: free static sites + free 512 MB web service that sleeps after 15 min idle. Paid from $7/mo: Paid compute from $7/month (0.5 CPU, 512 MB). Pro workspace: $25/month + compute. Checked 17 Oct 2026 on Render's pricing page (opens in a new tab).
- Free web services sleep — the first visitor after a quiet period waits about a minute.
- Free Postgres is deleted after the 30-day expiry + 14-day grace period unless you upgrade.