Zeltro › How to run a Replit project locally

Running a Replit project on your own machine

How to export a Replit project as a zip or to GitHub, run it on your own computer, move its Postgres database and secrets, and keep building it with your own AI. Real steps, for Python and Node projects alike.

Replit is a whole computer in a browser tab, and that is both its strength and the reason moving a project off it takes a little thought. A Replit project can be a Python script, a Flask or FastAPI app, or a Node and React app with a Postgres database behind it. The code exports easily. The things around the code (the database, the secrets, the run configuration) do not.

This page covers all of it: getting the code out, running it on your own machine, moving the data, and continuing to build it with an AI agent you choose.

What comes with an export, and what does not#

Replit's own help page is clear: secrets, the database, and deployment configuration "aren't included in the copy."

Piece Comes out with the code? What to do
Your code Yes, zip or GitHub Clone or unzip it
.replit and replit.nix Yes, as files Read them for the run command and system packages
Secrets No Recreate them in a local .env
PostgreSQL database No Dump it and load it locally
Replit services (Auth, Object Storage, key-value Database) No Replace them with your own

Step 1: export the code from Replit#

Download a zip. Open the three-dot menu at the top of the file tree and choose Download as zip. If a large project will not download, Replit's docs suggest opening the Shell and running:

zip -r project.zip .

then downloading project.zip from the file tree.

Or export to GitHub, which is better if you will keep going. Link GitHub from your account's connected services, open the Git tool in the project, and connect or create a repository. Turn on auto-sync in the Git pane and it syncs both ways, so you can work locally and still open the project in Replit.

Before you leave, open the Secrets tool and copy out the names of everything in it. You will need the values again.

Step 2: run the Replit project locally#

Look at .replit first. Its run line is the command Replit used to start the app, and replit.nix lists any system packages it pulled in.

You can run it by hand: install the right Python or Node version, create a virtualenv or run npm install, set the secrets as environment variables, start Postgres if the app needs one, and run the command from .replit. For one project, that is fine.

Zeltro already has the pieces standing: Python 3.12 and Node 22 base images with every database driver compiled in, and one shared Postgres, MariaDB, MongoDB and Redis for every project on the machine.

zeltro clone work-directly https://github.com/you/your-replit-app --database postgres

Zeltro reads the project's files (main.py, app.py, manage.py, package.json) to work out the framework, creates the project, gives it its own database on the shared Postgres, writes the connection settings into .env, and assigns it an address. With an AI agent configured, the clone also has it adapt the repository to Zeltro. zeltro status your-replit-app prints the address.

From a zip instead, unzip it into your projects folder (~/zeltro-projects by default) and run zeltro setup your-replit-app postgres.

Replit apps usually listen on whatever port Replit gave them, often on 0.0.0.0. Inside Zeltro, a Python app listens on port 8000 and a Node app on port 3000, and nginx serves them on port 80. If the page does not come up, the port is the first thing to check, and your agent can change it.

Step 3: move the database and secrets#

Replit's PostgreSQL is built on Neon, and the app finds it through DATABASE_URL. To take the data with you, dump it from the Replit Shell:

pg_dump "$DATABASE_URL" --no-owner --no-acl -f dump.sql

Download dump.sql, then load it into the project's database on Zeltro's shared Postgres (host zeltro-postgres, user root), or ask your agent to. Replit users have reported pg_dump refusing to run because the workspace's client is older than the server; if that happens, run the same command from your own machine with a newer pg_dump against the same connection string.

For the secrets, add each one to the project's .env. Any that pointed at Replit itself, such as Replit Auth, Object Storage or the key-value Database, need a replacement: your own sign-in, a local folder or S3-compatible storage, and Redis or a table in Postgres.

Step 4: keep building, with your own AI#

On Replit, Agent work is billed by Replit. Once the project runs locally, the agent can be yours: Claude Code, Codex, Gemini, Qwen Code, Aider, OpenCode or Hermes, on a subscription you already pay for, an API key at the provider's price, or a free local model.

cd ~/zeltro-projects/your-replit-app
zeltro ai "read AGENTS.md, then replace Replit Auth with email and password sign-in"

Every project has an AGENTS.md describing its address, database and commands, so the agent starts oriented. See bring your own key for how that works, or try your own numbers in the savings calculator.

Because Zeltro runs PHP, Python and Node side by side, the next project does not have to be the same stack. A Laravel admin, a FastAPI service and a Next.js front end can sit in neighbouring folders and reach each other by name.

Worth knowing#

Zeltro does not host. Replit can deploy for you; once the project is on your machine, putting it online is up to you. Any host works, or I will take it live for you.

You need Docker. Zeltro installs it for you on Linux and macOS. On Windows it runs in WSL2, which is in preview.

Sources#

Checked on 18 October 2026: Replit's projects and files, Git interface and PostgreSQL pages, and a Replit forum report on pg_dump version mismatches. Features change, so check them against your own account.

Questions

Can I run a Replit project locally?

Yes. Download it as a zip or sync it to GitHub, then run it with the same command as the run line in .replit. Secrets, the database and deployment settings do not come with it, so recreate those on your machine.

How do I export code from Replit?

Use Download as zip from the three-dot menu at the top of the file tree, or connect GitHub in the Git tool and push to a repository. If the zip download fails, run zip -r project.zip . in the Shell and download that file.

How do I export a Replit database?

Replit's PostgreSQL runs on Neon and is reachable through DATABASE_URL. Run pg_dump "$DATABASE_URL" from the Shell, or from your own machine, and load the dump into a local Postgres.

How do I export a Replit project to GitHub?

Link GitHub from your account's connected services, then connect a repository in the project's Git tool. Turn on auto-sync for two-way syncing.

Do my Replit secrets come with the export?

No. Replit leaves secrets out of copies by design. Write down the names before you leave and add the values to a local .env.

Is there a local Replit alternative?

For building with AI on your own machine, Zeltro is one: it runs locally, uses your own AI agent, and builds PHP and Python apps as well as JavaScript. Its command line tool is open source. See the full comparison of AI app builders.

What does Zeltro cost?

The Zeltro app is free for personal use, hobby projects and learning, with no account. A business using it, including for paid client work, buys a lifetime commercial license once, for US$99.99. The zeltro command line tool is open source (MIT). Separately, you pay for your AI: a subscription you already have, an API key billed per use, or nothing with a local model.

Bring your Replit project home

Install Zeltro, clone your Replit project, and keep building it with the AI you already pay for, or a free local model. Python and Node both run out of the box. Free for personal use, with no account.

Install Zeltro Why bring your own key

Rather not set it up yourself? I’ll do it for you.

Checked 2026-10-18. Other products change often — if something here is out of date, tell us and it gets fixed.