# Daemon (/daemon)



`mlabd` keeps bots, strategies, scripts, managed orders, and job state running after the deploying terminal closes.

The daemon has two backends: **Native** and **Docker**. Transport is separate: it decides which Market Lab installation receives a command, not where that installation runs its daemon.

## Status and Control [#status-and-control]

```bash
mlab daemon backend
mlab daemon status
mlab daemon start
mlab daemon stop
mlab daemon events --limit 20
```

Live commands start the selected daemon automatically when needed.

## Choose a Backend [#choose-a-backend]

Every Market Lab installation chooses one daemon backend:

| Backend | Location                                         |
| ------- | ------------------------------------------------ |
| Native  | Directly under the current operating-system user |
| Docker  | Inside the Market Lab daemon container           |

```bash
mlab daemon backend native
mlab daemon backend docker
```

The selected backend is stored in `~/.market-lab/daemon.json`. Market Lab will not switch it while jobs or managed orders are active.

Both backends keep state under `~/.market-lab/`, including credentials, market snapshots, artifacts, logs, and jobs.

## Continue [#continue]

* [Native backend](/daemon/native): run `mlabd` directly on the host
* [Docker backend](/daemon/docker): run `mlabd` in the official container
* [Troubleshooting](/daemon/troubleshooting): logs, events, upgrades, and common failures
* [Transport](/transport): choose the local installation or another installation over SSH

Execution credentials belong to the machine running the daemon. See [Authentication](/authentication).
