DEV Community

Axonscape
Axonscape

Posted on Originally published at launchpad.axonscape.com

Replit Auth and Replit storage don't work outside Replit

An app built by Replit's Agent signs people in with their Replit accounts and keeps files in Replit's storage. Moved anywhere else, nobody can sign in. Change both first.

What you see

Deployed outside Replit, sign-in fails (REPLIT_DOMAINS isn't set), and saving or loading files errors.

Why it happens

server/replitAuth.ts signs people in through Replit's login service, and @replit/object-storage and @replit/database are Replit's own services. None of them exist outside Replit.

How to fix it

  1. Ask Replit's Agent, or your AI tool, to switch sign-in to Clerk or Supabase Auth.
  2. Move files to Cloudflare R2 or Supabase Storage, and Replit Database records into Postgres.
  3. Bring the Postgres data along: in Replit's Shell, pg_dump -Fc --no-owner --no-privileges "$DATABASE_URL" > replit.dump.

Or ask your AI tool to fix it

Paste this into Lovable, Bolt, v0, Replit or Cursor:

This app has to run outside Replit. Replace sign-in with Replit accounts (server/replitAuth.ts, REPLIT_DOMAINS) with Clerk, and replace @replit/object-storage and @replit/database with S3-compatible storage (Cloudflare R2) and Postgres. Keep every page and API route working the same way.


The full page, with the request ready to copy, is at launchpad.axonscape.com/fix/replit-auth-outside-replit. I work on Launchpad by Axonscape, which runs a free launch check for apps built with AI tools: it finds this and the other things that break at launch, from a public GitHub repo or a .zip of the code, and keeps nothing.

Top comments (0)