> ## Documentation Index
> Fetch the complete documentation index at: https://getfloo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Leave floo anytime

> Move your code, data, and configuration off floo before deleting an app.

Move your repository and `Dockerfile`, export your data and configuration, and replace the floo features your app uses. Verify the app on its new host before deleting it from floo.

The steps below use `my-app` and `prod`; repeat them with `--env dev` for anything you keep from dev. Export everything before you [delete the app](#delete-the-app-on-floo): deletion destroys its databases, Storage buckets, and env vars.

## Get the code

An app deployed from your GitHub repository already has its code there. A floo-hosted project (made with `floo deploy --hosted`) keeps its code in a repository floo hosts, which `floo apps delete` destroys. Clone it first:

```bash theme={null}
floo clone my-app ./my-app
```

## Export the database

### With floo db dump

Requires floo CLI v2026.11.10 or later (`floo update`).

`floo db dump` runs your local `pg_dump` against the environment's `DATABASE_URL` and writes the dump to a file. It needs `pg_dump` from PostgreSQL 17 or newer on your `PATH` and a WRITE-scoped floo API key.

```bash theme={null}
floo db dump --app my-app --env prod -o my-app.sql
floo db dump --app my-app --env prod --format custom -o my-app.dump
```

`--env` is `dev` (default) or `prod`. `--format` is `plain` (default, SQL for `psql`) or `custom` (for `pg_restore`). The dump leaves out owners and grants, so it restores into any Postgres:

```bash theme={null}
psql "$NEW_DATABASE_URL" -f my-app.sql
pg_restore --no-owner -d "$NEW_DATABASE_URL" my-app.dump
```

The file appears only when the dump succeeds; a failed run leaves no partial file. `floo db dump` reads `DATABASE_URL` only; dump a named Postgres service [with pg\_dump directly](#with-pg_dump-directly). Errors:

| Error | Fix |
| - | - |
| `PG_DUMP_NOT_FOUND` | Install the PostgreSQL 17+ client tools: macOS `brew install libpq && brew link --force libpq`, Debian/Ubuntu `apt install postgresql-client-17` |
| `PG_DUMP_VERSION_MISMATCH` | Your `pg_dump` is older than the database server. Install a newer client |
| `DATABASE_NOT_FOUND` | The app has no `DATABASE_URL` in that environment. Check with `floo env list --app my-app --env prod` |
| `PG_DUMP_FAILED` | `pg_dump` exited with an error; its message is included |

### With pg\_dump directly

`floo env get` prints `DATABASE_URL` as a standard Postgres connection URL, which `pg_dump` accepts as-is. This works with any floo CLI version:

```bash theme={null}
pg_dump "$(floo env get DATABASE_URL --app my-app --env prod --reveal-secrets)" \
  --no-owner --no-privileges -f my-app.sql
```

`--reveal-secrets` prints the URL, password included. Run it only where the output stays on your machine. A named Postgres service has its own variable, such as `DATABASE_URL_ANALYTICS` for `[managed.analytics]`; dump each one.

## Export Storage files

floo Storage is S3-compatible: a deployed app receives `STORAGE_BUCKET`, `STORAGE_S3_ENDPOINT`, `STORAGE_S3_ACCESS_KEY_ID`, `STORAGE_S3_SECRET_ACCESS_KEY`, and `STORAGE_S3_REGION` (suffixed for a named service, such as `STORAGE_BUCKET_FILES`). The interface supports object list and get. See [Storage](https://getfloo.com/docs/guides/cloud-storage.md) for the client setup.

`STORAGE_S3_SECRET_ACCESS_KEY` is write-only: `floo env get` does not return it. Copy objects from code that runs inside the app, where the keys are injected, with the same S3 client the app already uses: list the bucket, get each object, and write it to the destination.

For a few objects, list them with `floo storage ls` and download each through a signed GET URL. A WRITE-scoped floo API key requests the URL:

```bash theme={null}
floo storage ls --app my-app --name files --env prod
```

```http theme={null}
POST /v1/apps/{app_id}/managed-services/{service_id}/signed-url?env=prod
Authorization: Bearer <write-api-key>
Content-Type: application/json

{"method":"GET","object_path":"uploads/photo.png"}
```

The response's `url` downloads the object for 60 to 3600 seconds (default 900). `--name` is the Storage service name from `floo.app.toml` (`default` if omitted). `floo storage ls` returns at most 75 objects per call; use a narrower prefix when the list is truncated.

A Storage service created before v2026.09.27.1 (September 27, 2026) has no S3 keys; copy its objects from inside the app with the storage SDK the app already uses ([Storage](https://getfloo.com/docs/guides/cloud-storage.md#use-it-from-code)).

## Export env vars and config

List every key, with values masked:

```bash theme={null}
floo env list --app my-app --env prod
floo env list --app my-app --env prod --json
```

`floo env get` returns a config value. Secrets are write-only and never returned; use the copies in your secret store on the new host. The following writes app-level config values to a local `.env` file. Use it for single-line values only, and keep the file private and out of git:

```bash theme={null}
floo env list --app my-app --env prod --json \
  | jq -r '.data.env_vars[] | select(.is_secret == false and .service_id == null) | .key' \
  | while read -r key; do
      printf '%s=%s\n' "$key" "$(floo env get "$key" --app my-app --env prod --reveal-secrets)"
    done > prod.env
```

Add multiline values and the secrets from your secret store to the new host separately. For a service's own variables, pass `--service SERVICE_NAME` to both `floo env` commands and drop `and .service_id == null` from the filter. Replace `SERVICE_NAME` with the service name. `DATABASE_URL`, `PG*`, `REDIS_URL`, `STORAGE_*`, and `FLOO_AUTH_*` come from floo's managed services; take their new values from the services you move to. `floo.app.toml` is in your repository and holds the rest of the app's configuration.

## Run the same image elsewhere

floo builds each service from its `Dockerfile`. Build and run it the same way:

```bash theme={null}
docker build -t my-app .
docker run --env-file prod.env -e PORT=8080 -p 8080:8080 my-app
```

The [container contract](https://getfloo.com/docs/reference/container-contract.md) holds on any host: bind `$PORT` on `0.0.0.0`. Variables with a build-time prefix (`NEXT_PUBLIC_`, `VITE_`, `REACT_APP_`) reach the build as build args, so pass them with `--build-arg` the way floo does. A multi-service app has one `Dockerfile` per service `path` in `floo.app.toml`; build and run each.

## Replace what is floo-specific

| On floo | Replace with |
| - | - |
| App sign-in: `access_mode = "accounts"` puts sign-in in front of the app and injects `X-Floo-User-Email`, `X-Floo-User-Id`, `X-Floo-User-Name`, `X-Floo-User-Role`, and `X-Floo-Auth-Method`; `GET /__floo/me` returns the same user | Your own authentication in front of the app, or in it. Code that reads `X-Floo-User-*` must read the user from it instead ([App sign-in](https://getfloo.com/docs/guides/app-auth.md)) |
| `[cron.<name>]` blocks in `floo.app.toml`, run in UTC in a service's image | Your new host's scheduler, running the same `command` in the same image ([Cron jobs](https://getfloo.com/docs/guides/cron-jobs.md)) |
| `migrate_command`, run by floo on each deploy | A migration step in your new deploy process |
| Managed Postgres, Redis, and Storage, with their variables injected | The services you restore into, with their connection values set as env vars |

An app that uses [User accounts](https://getfloo.com/docs/guides/user-accounts.md) needs a replacement sign-in service before it moves.

## Delete the app on floo

```bash theme={null}
floo apps delete my-app --preflight
floo apps delete my-app
```

`--preflight` shows what would be deleted. The delete prompts you to type the app name. It destroys every service, env var, managed service (databases and Storage buckets included), domain, the deploy history, and a repository floo hosts. A connected GitHub repository of your own is kept. Non-interactive runs (CI, `--json`, pipes) require `--yes-i-know-this-destroys-data`. Deletion is irreversible. See [`floo apps delete`](https://getfloo.com/docs/cli/apps#delete).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.