Deploy a Replit app to Render

Free web services (with sleep) and free static sites.

Specific to Replit + Render
  • Replit Secrets and Replit DB don't move with the code — recreate env vars and migrate data first.

Step by step

  1. Check your project type

    • Static site: Build produces a folder of files (dist/ or build/).
    • Web server: Runs a server process (Express, Flask, FastAPI…).
  2. Get the code onto GitHub

    • Connect GitHub in Account → Connected Services, then use the Git pane in the project to push to a repository.
  3. Create the project on Render

    Render Dashboard → New → Static Site (or Web Service for a server), connect GitHub, pick the repository.

  4. Check the build settings

    Vite static site: build command npm run build, publish directory dist.

    For Replit: build command As configured in .replit / package.json, output For static deploys: the public directory (e.g. dist).

  5. Add environment variables before the first build

    In Render: Service → Environment. Copy these from Replit:

    • Replit Secrets don't travel with the code — re-create them at the new host.

    Changed a value later? Rebuild. Vite bakes variables in at build time. Troubleshoot missing env vars

  6. 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.html

    Server-rendered projects (TanStack Start, Next.js) don't need this. Render docs (opens in a new tab)

  7. Update login redirect URLs

    Add your new Render URL (and later your custom domain) to your auth provider's allowed URLs. Redirect troubleshooting

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

Other options for Replit