Step-by-Step Guide

Ready to move your project out of Lovable or Replit?

This guide walks you through every step in plain English — no assumptions, no jargon. Whether you're on Windows or Mac, we've got you covered from the very beginning.

🐶 No experience needed
🪟 Windows instructions
🍎 Mac instructions
Checklists at every step
0

Before You Start

Read this first — it'll save you headaches later.

Moving a project from Lovable or Replit is a bit like moving house. It's not instant, and there's a checklist to follow — but once you're done, your project is yours, living on infrastructure you control.

⏱️
How long will this take?

A simple project (just a website, no database): about 1–2 hours. A project with a database and logins: plan for a half day. Take it at your own pace — nothing here is urgent.

📸
Do this NOW before anything else

Take a screenshot of your working project. Note down every feature that works today. This is your "before" picture so you can confirm everything works the same after moving.

Things you'll need

1

Install Git & Get Your Code

Git is a free tool that saves every version of your code. Think of it as undo/redo on steroids.

💡
What is Git?

Git is like a filing system for your code. Every change you make gets saved in history, so you can always go back. Developers worldwide use it. It's free, and you'll need it to move your project.

A

Install Git on your computer

Only need to do this once, ever
1

Go to git-scm.com/download/win — the download will start automatically.

2

Open the downloaded file (it looks like Git-2.x.x-64-bit.exe). Click Yes if Windows asks for permission.

Git installer opening on Windows
3

Click Next through all the screens — the default options are fine. Click Install at the end, then Finish.

4

Check it worked: Press the Windows key, type cmd, press Enter. A black window opens. Type:

git --version

You should see something like git version 2.43.0. ✅

1

Open Terminal: press ⌘ Command + Space, type Terminal, press Enter.

📸Screenshot: Spotlight search for Terminal on Mac
2

Type this and press Enter:

xcode-select --install

A window will pop up asking to install Developer Tools. Click Install. This includes Git. Wait for it to finish (5–15 minutes).

📸Screenshot: Mac Developer Tools install popup
3

Check it worked: In the same Terminal window, type:

git --version

You should see something like git version 2.43.0. ✅

B

Download your code from Lovable or Replit

Choose the tab that matches your platform
1

Open your project in Lovable and click the GitHub icon or button in the top bar (it looks like a cat/octocat logo).

📸Screenshot: Lovable GitHub sync button location
2

Click "Connect to GitHub" or "Push to GitHub". If asked, log in to GitHub and allow Lovable access.

3

Lovable will create a new repository on your GitHub account. Write down the URL — it will look like:
https://github.com/your-name/your-project

📸Screenshot: Lovable showing the GitHub repo link after push
4

Alternatively, if you see a Download ZIP option — use that. Save the ZIP file somewhere easy to find, like your Desktop.

1

Open your Replit project. In the left sidebar, look for the three dots menu (⋯) or click "Version Control" / the Git icon.

📸Screenshot: Replit left sidebar showing Version Control option
2

Click "Connect to GitHub" and follow the steps to push your code to a new GitHub repository. Write down the URL.

3

Or download directly: Click the three dots next to your project name → "Download as ZIP". Save to your Desktop.

📸Screenshot: Replit download as ZIP option
4

If you downloaded a ZIP: right-click it and choose Extract All (Windows) or double-click to unzip (Mac). You now have a folder with your code.

C

Open a command window in your project folder

This is how you "talk" to your computer
💬
What's a command window?

It's a text-based way to give your computer instructions. It sounds scary but we'll only type a few simple things. Every instruction is written out in full for you.

1

Open File Explorer and navigate to your project folder.

2

Click the address bar at the top (where it shows the folder path), type cmd and press Enter.

Git installer opening on Windows

A black window opens already inside your project folder. ✅

1

Open Finder and find your project folder.

2

Right-click (or Control-click) on the project folder → select "New Terminal at Folder".

📸Screenshot: Mac Finder right-click menu showing "New Terminal at Folder"

If you don't see this option: open System Settings → Keyboard → Keyboard Shortcuts → Services → enable "New Terminal at Folder".

Now in your command window, type these commands one at a time, pressing Enter after each:

# Tell Git who you are (use your GitHub name and email)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

# If your code isn't from GitHub yet (downloaded ZIP), run these:
git init
git add .
git commit -m "My project, first save"
2

Save Your Secret Settings

Every app has settings and passwords stored behind the scenes. We need to copy these before moving.

🔐
What are "environment variables"?

Think of them as the keys to your app's locked doors — passwords for your database, secret codes for payment systems, and connection details. Without them, your moved app won't work. They're called "environment variables" because they live in your server environment, not in the code itself.

🟠 Finding your settings in Lovable
1

In your Lovable project, click on Settings (gear icon ⚙️) in the top right corner.

📸Screenshot: Lovable Settings gear icon
2

Look for a section called "Environment Variables", "Secrets", or "Configuration".

📸Screenshot: Lovable Environment Variables panel
3

Write down every single variable — the name on the left and the value on the right. Keep this somewhere safe (a private note, password manager, or local text file never uploaded anywhere). You'll need these exact values when you set up your new home.

4

Also note your Supabase URL and keys — go to your Supabase project → Settings → API and copy:
• Project URL
• anon/public key
• service_role key (keep this one extra safe)

📸Screenshot: Supabase Settings → API page showing keys
🔵 Finding your settings in Replit
1

Open your Replit project. In the left sidebar, click the 🔒 Secrets padlock icon (or look for "Secrets" in the Tools menu).

📸Screenshot: Replit sidebar showing Secrets (padlock) icon
2

You'll see a list of your secrets. Each one has a key (the name) and a value (the secret itself).

📸Screenshot: Replit Secrets panel showing list of variables
3

Click each secret and copy the value. Write them all down. They will not be exported with your code automatically — you must copy them manually.

4

Also note if you're using Replit's built-in Database — if your code mentions @replit/database, you'll need to export that data separately (see the Database section below).

Common variables and what they do

Here's a plain-English guide to what you might see:

Variable Name What it is You'll need it on new host?
VITE_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_URL
The address of your database ✅ Yes
SUPABASE_ANON_KEY
VITE_SUPABASE_ANON_KEY
A public key for reading your database ✅ Yes
SUPABASE_SERVICE_KEY
SUPABASE_SERVICE_ROLE_KEY
A powerful private key — keep this very secret ✅ Yes — never share publicly
OPENAI_API_KEY
ANTHROPIC_API_KEY
Your AI service password — costs you money if misused ✅ Yes — rotate after migration
STRIPE_SECRET_KEY
STRIPE_WEBHOOK_SECRET
Payment processing keys — very sensitive ✅ Yes — and update Stripe dashboard
DATABASE_URL Full address+password of your database ✅ Yes — will change on new host
NEXTAUTH_SECRET
JWT_SECRET
Secret code used for user login security ✅ Yes
NEXTAUTH_URL
PUBLIC_URL
The web address of your app ✅ Yes — will change to your new address
⚠️
These same keys work on your new host — for now

You can copy your existing keys directly to your new hosting platform and everything will keep working. However, as a best practice, you should eventually rotate (regenerate) your API keys — especially for payment services and AI APIs — to ensure no one who had access to the old platform can misuse them. You don't need to do this today; just keep it on your to-do list.

Create your .env file

In your project folder, create a file called .env and add your variables like this:

1

Open Notepad (search in Start menu). Type your variables like this — replace the example values with your real ones:

VITE_SUPABASE_URL=https://xxxxx.supabase.co
VITE_SUPABASE_ANON_KEY=your-key-here
OPENAI_API_KEY=sk-xxxxxxxxxxxx
2

Click File → Save As. Navigate to your project folder. In the "Save as type" dropdown, choose "All Files (*.*)". Name the file exactly: .env (with the dot at the start). Click Save.

Git installer opening on Windows
1

In your Terminal (already open in your project folder), type:

nano .env

This opens a simple text editor inside Terminal.

2

Type your variables (replace with your real values):

VITE_SUPABASE_URL=https://xxxxx.supabase.co
VITE_SUPABASE_ANON_KEY=your-key-here
OPENAI_API_KEY=sk-xxxxxxxxxxxx
3

Press Ctrl + X to exit, then Y to save, then Enter to confirm.

🚨
Never upload your .env file to GitHub!

Your .env file contains passwords. Make sure it's listed in your .gitignore file. In your command window, type:

echo ".env" >> .gitignore
3

Save Your Data

If your project stores any information (users, posts, orders, etc.) you need to back it up before moving.

Not sure if you have a database?

If your app lets users sign up, saves any information, or has any content that changes — you have a database. If it's a simple display-only website with no logins, you probably don't. When in doubt, follow these steps anyway.

A

Back up your Supabase database

Lovable uses Supabase — here's how to save everything
1

Log in at supabase.com and open your project.

2

In the left menu, go to Project Settings → Database.

📸Screenshot: Supabase left menu → Project Settings → Database
3

Scroll down to find the Backups section (available on paid plans) or use the Table Editor to export each table as a CSV file: go to a table, click Export, save the file.

📸Screenshot: Supabase Table Editor with Export button highlighted
4

Good news: Many people keep their Supabase database exactly as-is and just point their new hosting to the same Supabase project. This is the easiest option — your data never moves, only your app code does.

💡
Easiest path: keep Supabase

You don't have to move your Supabase database at all. Just deploy your code to a new host (like Vercel or Railway) and keep using the same Supabase project. Just copy your Supabase URL and keys to the new host's environment variables. Done.

B

Back up Replit's built-in database

Only needed if your app uses @replit/database
⚠️
Replit's database is NOT a real database

Replit has a simple built-in key-value store that's unique to each project. It won't move automatically and doesn't export easily. If your app uses @replit/database, you'll need to replace it with a real database after moving. The most common choice is Turso (free, simple, very similar to use).

1

In your Replit project, open the Shell tab and run this to export all your data to a file:

# This prints all your stored data
node -e "const D=require('@replit/database');
const d=new D();
d.list().then(k=>Promise.all(k.map(async key=>
({key,val:await d.get(key)}))).then(r=>
console.log(JSON.stringify(r,null,2))))"
2

Copy the output (all the data printed) and save it in a text file called replit-data-backup.json on your computer.

4

Deploy to Your New Home

We recommend Vercel for most projects — it's free, fast, and connects directly to GitHub.

🏠
Which host should I choose?

For most Lovable/Replit projects: Vercel (if it's a website/app built with Next.js or React) or Railway (if it has a backend server). Both have free tiers. The steps below use Vercel.

A

Deploy to Vercel (recommended for most projects)

Free to start, takes about 5 minutes
1

Make sure your code is on GitHub (from Step 1). Then go to vercel.com and click Sign Up → Continue with GitHub.

📸Screenshot: Vercel signup page
2

Click Add New ProjectImport your GitHub repository.

📸Screenshot: Vercel "Import Project from GitHub" screen
3

Before clicking Deploy, find the Environment Variables section and add all the variables you saved in Step 2. Add them one by one — Name on the left, value on the right.

📸Screenshot: Vercel Environment Variables section during setup
4

Click Deploy. Vercel will build your project. After 1–3 minutes, you'll get a URL like your-project.vercel.app. Open it and test everything.

📸Screenshot: Vercel successful deployment screen with live URL
B

Test everything before moving your domain

Don't touch your domain until this checklist is green
  • Homepage loads without errors
  • User sign up works (if you have auth)
  • User login works
  • Any forms submit correctly
  • Images and files load
  • If you have payments — test with Stripe's test card number (4242 4242 4242 4242)
  • Check on your phone too
  • Compare with your "before" screenshots from Step 0
C

Move your custom domain (if you have one)

Only do this once all tests pass
DNS changes take time

When you change where your domain points, it can take up to 48 hours to fully update worldwide. During this time, some visitors see the old site and some see the new one — this is normal. Plan to do this step on a quiet day (not before a big launch).

1

In Vercel: go to your project → Settings → Domains → add your custom domain.

2

Vercel will show you DNS records to add. Log in to wherever you bought your domain (GoDaddy, Namecheap, Cloudflare, etc.) and update those records.

📸Screenshot: Vercel domain setup showing DNS records to copy
3

Wait. After your domain is working, update the NEXTAUTH_URL or PUBLIC_URL environment variable to your real domain name.

5

Choosing a New Home

Not sure which platform is right for you? Here's a plain-English breakdown.

🌐 For your app (the website part)

Free to start

Vercel ⭐ Recommended

Best choice for React/Next.js projects. Super easy. Connects to GitHub and deploys automatically on every save.

Free to start

Netlify

Very similar to Vercel. Great for any website. Easy to use, reliable, good free tier.

From $5/mo

Railway ⭐ Replit users

The closest thing to Replit but for production. Runs any type of app. Includes a database. Good for backends.

From $7/mo

Render

Simple, reliable, runs any kind of project. Good if you have a backend server (Express, FastAPI, etc.).

🏗️ For your database (if moving away from Supabase)

Free to start

Keep Supabase ⭐ Easiest

You don't have to move the database at all. Just move your app code and point it at the same Supabase project.

Free to start

Neon

Another free PostgreSQL database. Very similar to Supabase's database. Easy to switch to.

Free to start

Turso

Best replacement for Replit's built-in database. Free, fast, simple.

Free to start

PlanetScale

Great for larger projects. Has a git-like branching system for your data.

Final Migration Checklist

Tick everything off before calling it done.

🎉
You did it!

Your project is now running on infrastructure you control. No more platform-specific lock-in, no more surprise pricing changes. From here, your code deploys automatically every time you push to GitHub.