Blog

Tutorials, guides and product news.

Developers

How to move a Replit project to your own server

2 November 2026 5 min read
Share this post

To move a Replit project to your own server, download the code as a zip or push it to GitHub, collect your Secrets and database separately, connect the code to the Coolify panel on your server, and switch your domain once you've seen it working. The code is the easy part. Replit's own guide says the database and the web address take the most time.

The old project keeps running throughout. Don't shut anything down until you've tested everything on the new server.

What comes with the code, and what doesn't?

PartStatusWhat to do
Source codeComes alongZip or GitHub
.replit, replit.nixCome along, but only Replit reads themUse them to learn the run command and system packages
SecretsStay behindEnter the values on the server by hand
DatabaseStays behindExport with pg_dump and load it on the server
App Storage filesStay behindDownload them and change the storage code
Replit AuthTied to Replit accountsSwitch to another sign-in method
ConnectorsStay behindSet each service's API key as a variable

How do you get the code?

Through GitHub: In the Project Editor, open Git from Tools. Select Initialize Git Repository if needed, connect a repository, then commit and push. Keep it private. We recommend this route because it carries later changes too.

As a zip: From the three-dot menu at the top of the file tree, choose Download as zip. If that fails, build the zip yourself in the Shell, leaving out the .cache folder where Replit keeps cached secret values: zip -r project.zip . -x ".cache/*" "node_modules/*"

Step by step

  1. Order a server from the Next.js VPS page. This option comes with Coolify, so Python and plain Node projects deploy from the same panel.
  2. Find the start command in .replit and the port in your code. Replit's own publishing also requires listening on 0.0.0.0, so that part is usually done. The Flask values we have tried are port 5000 and python -m flask run --host=0.0.0.0 --port=5000.
  3. A Python project needs its dependencies in requirements.txt or pyproject.toml. For system packages listed in replit.nix, use the RAILPACK_DEPLOY_APT_PACKAGES build variable, though Nix and APT names don't always match.
  4. Clone the repository and open the folder in a coding tool such as Claude Code or Cursor. Copy the Paste into your AI tool row from the Overview tab of your Seturack panel and paste it in. The tool handles the deployment, or you can do it by hand.
  5. Enter the values from Replit's Secrets tool as environment variables on the server, including deployment secrets, which Replit keeps separately.
  6. Copy the database once for testing (see below) and test the app end to end on its HTTPS address.
  7. Take the old app offline, copy the database one last time, and point your domain's A record at the server's IP address. The certificate is issued automatically.

You have root access, and you can manage everything from the panel if you prefer.

How do you move the database?

Replit's database is PostgreSQL-compatible, and the tools are ready in its Shell:

  1. Export it in the Replit Shell: pg_dump -Fc "$DATABASE_URL" --no-owner --no-privileges -f backup.dump
  2. That command exports the development database, and live data usually sits in production. In the Database tool, select the production database, copy the connection string from Settings and use it in place of "$DATABASE_URL".
  3. Download backup.dump. Keep it out of the repository, because it holds all your data.
  4. Create PostgreSQL in Coolify and upload the file with Import backup on the database's Backups page.
  5. Set the database's internal address as DATABASE_URL in the app and deploy again.

Anything written after pg_dump runs isn't in the copy, which is why the final copy comes after you stop the old app.

Files and sign-in

App Storage buckets don't move, so download the files from Replit's storage tool. If your code uses Replit's SDK, that part has to change. The simplest replacement is writing files to a folder on the server and mounting it with Persistent Storage in Coolify.

Replit Auth has your users sign in with Replit accounts. To stop depending on Replit, you may need another sign-in method. Your coding tool can rewrite that section, but back up your user table and test on the temporary address first.

Frequently asked questions

What size does a Replit project need?

The sales page recommends at least 4 GB of RAM, 2 vCores and 40 GB of disk, based on Next.js builds: a project with 85 packages failed at 2 GB and built at 4 GB. Allow extra if the database shares the server, and scale up from your panel if you need to.

What will it cost per month?

The recommended minimum size is about $6 a month (VAT included), and outside Turkey you pay in US dollars. Daily backups are included in the price and traffic is unlimited. Your Replit usage and subscription continue until you close them.

How do I move my domain away from Replit?

Remove the domain under Publishing, Domains in Replit, point the A record at the server's IP address, then add it with https on the Domains page in Coolify and deploy again.

Can I keep developing in Replit?

Yes. Turn on auto-sync in the Git pane so changes reach GitHub. With a webhook, the server rebuilds on every push. Without one, press Redeploy in Coolify. Remember that the Replit preview and the live server use different databases.

Can I leave the database on Replit?

You can try by giving the server its connection string, but your app and data then live apart and your Replit bill continues. If you're really moving the app, it's cleaner to bring the database onto the same server.

Ready-made on Seturack: Next.js, Coolify.

Comments0

No Comments Yet

Be the first to share your thoughts.

Join the Discussion

Please sign in or sign up to leave a comment.

Never Miss a Post

Get our latest tutorials, guides and product news in your inbox.

You're subscribed to our newsletter.