# Import from Replit

URL: https://forculuslabs.tech/docs/deploy/import-replit/

> Move a Repl here from its files, with its run command, port and Secrets.

Replit has no public API for reading a Repl, so the import works from the Repl’s files on your computer. It reads `.replit` for how the Repl runs, and takes its Secrets from a file you save. [Import from another host](https://forculuslabs.tech/docs/deploy/import/) covers what every import does, and [Replit and Forculus](https://forculuslabs.tech/compare/replit) compares how each keeps an app private.

## Get the files

Either:

- **From GitHub.** In the Repl, open the **Git** pane and push it to a GitHub repository. Then import the repository by its address: `forculus import https://github.com/you/bot acme/bot`. Its `.replit` is read the same way.
- **As a download.** Download the Repl as a zip, unzip it, and import the folder.

## Save the Secrets

In the Repl, open **Secrets**, then the menu at its top, then **Edit as .env**. Copy what it shows into a file outside the project, like `~/bot-secrets.env`. Don’t add it to the repository.

The file is read on your computer. Each value goes straight to the app’s environment variables or secrets, the same way `forculus env set` and `forculus secret set` send them.

## Import

```sh
forculus import replit acme/bot ./bot --env-file ~/bot-secrets.env
```

The third argument is the Repl’s folder, and defaults to the current directory. It needs a `.replit` file.

## What’s read from .replit

The keys Replit documents at docs.replit.com/replit-workspace/configuring-repl (read 7 October 2026):

| .replit                                    | Here                                                                                                          |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `[deployment] deploymentTarget = "static"` | A static site, built with `[deployment] build` and served from `publicDir`.                                   |
| `[deployment] run`, or `run`               | A container, started with that command: `container.start` in forculus.json.                                   |
| `[[ports]]`                                | The local port Replit served as port 80 becomes `container.port`.                                             |
| `[env]`                                    | Environment variables.                                                                                        |
| `deploymentTarget = "scheduled"`           | An app with a path that does the job, called by a [schedule](https://forculuslabs.tech/docs/apps/schedules/). |
| `replit.nix` packages                      | Not installed here. Write the Dockerfile with `forculus dockerfile --write` and install them in it.           |

Replit’s own variables, `REPL_` and `REPLIT_` ones, are left out. `REPLIT_DB_URL` points at Replit Database, which doesn’t come along: use the app’s own [database](https://forculuslabs.tech/docs/database/). Replit Auth isn’t needed either, since everyone signs in through us.

A container app needs the Team plan or above.

## From the dashboard

In **Apps**, select **Import**, then **Replit**. It gives the command to run, since the import needs the Repl’s files.
