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

# Preview adopting an existing Docker host

> List the containers already running on this server that Levelrail does not manage, and see what adopting them would involve. Read only.

If you install Levelrail on a server that already runs containers, discovery shows what is there before you move anything. It only lists and inspects containers. It never stops, changes or runs a command in one, and there is no apply step yet.

## Run it

In the dashboard, open **Migrate**, then **Adopt this host**. From the CLI:

```bash theme={"dark"}
levelrail-cli import adopt discover
levelrail-cli import adopt discover my-container
levelrail-cli import adopt discover --json
```

The API route is `GET /api/v1/migration/adopt/discovery`.

## Who can run it

Discovery reads the whole host, so it needs the root ability. Agent tokens are refused. It covers the Docker daemon of the control plane's own node, not remote nodes.

## What is returned

For each container: name, image, state, ports, volumes and bind mounts, networks, restart policy, and Compose project and service labels.

Environment variable values are never returned, only names. Names that look secret, judged by the name or the value, are marked. Commands and other label values are not returned either. Host paths of bind mounts and Compose files are shown.

Containers carrying Levelrail labels, from this instance or another one, are counted and left out.

## How containers are classified

| Kind | Meaning |
| - | - |
| Compose project | Containers sharing a Compose project label |
| Database | The image name matches a known database engine. This is a guess from the name only |
| App | A named image with at least one exposed or published port, and none of the signs below |
| Unknown | No port, an image without a name, a container removed on stop, or one that controls the host |

An unknown container gets no proposed resource, and the preview says why.

## What the preview tells you

* What would be created: apps, databases or a Compose app.
* What cannot be carried over: environment values, database and volume data, bind mounts, the Compose file, Docker socket access, privileged settings, devices, host networking and health checks.
* Risks: host ports that stay taken, shared volumes, moving image tags, stopped containers, missing restart policies and signs of another deploy tool.

The preview does not discover domains, TLS certificates or what a container depends on at run time. An empty list of risks does not mean a move is safe.

To bring a workload over today, create it yourself with [importing apps](https://docs.levelrail.com/importing-apps.md), and see [moving on the same server](https://docs.levelrail.com/migrate-same-server.md).


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