# See what a connector can do on its machine (/use/connector-sandbox)

Check whether a plugin's connector runs inside the operating-system sandbox on its host, and learn what the sandbox stops and what still applies without it.



[The connector host](/use/install-a-connector-host) runs each connector in a process of its own, inside a **sandbox** that the operating system enforces. On a machine that can't run the sandbox, the connector still runs, under fewer limits, and Marfa shows a warning. Connectors are in alpha: [what alpha means](/catalog/connectors#what-alpha-means).

## Check the sandbox [#check-the-sandbox]

The host reports each start to your instance. `marfa plugins status` reads the report, even before the connector registers:

```bash
marfa plugins status rss
```

Output:

```text
rss's connector: running as scheduled; host 01a1fa31-0d2e-7c4a-9b51-3f2c8e6d1a07; mapping version 0; 0 rewrites and 0 previews waiting
host sandbox: on
```

| `host sandbox` | What it means |
| - | - |
| `on` | The connector's last reported start was inside the sandbox. |
| `off` | It was not. The line adds: "At its last reported start, this connector ran without the operating-system sandbox. The host's usual limits still applied." |
| `unreported` | The host has sent no report for the connector's current key. |

Once the connector has registered, `marfa connectors list` and `marfa connectors get <id>` show the same report in the `host sandbox` column. With `--json`, it is `host_sandbox`: `null` for no report, or an object with `mode` and `warning`. The report describes a start, not the connector's progress, so resetting the connector's state leaves it as it is. A later start inside the sandbox clears the warning.

On the machine, `marfa-connector-host status` describes the running process. For a connector outside the sandbox it prints: "This connector is running without the operating-system sandbox, because it could not be started on this machine. It still has the host's usual limits."

## What the sandbox allows [#what-the-sandbox-allows]

* **It can read its own code,** and the public files the runtime needs to start. It can't read your other files, or another process's environment.
* **It can reach the network.** Outbound TCP and UDP reach any address, including services on the same machine.
* **It can't signal another process.** One exception is on macOS, where the kernel can still send `SIGIO` or `SIGURG` for it. macOS ignores both unless the receiving program handles them, so they can't end a process.
* **It can't connect to Unix sockets outside the sandbox,** except those the system's name lookup needs.
* **On Linux, it can't start another process** or make a namespace. It can still start threads.

## What applies without the sandbox [#what-applies-without-the-sandbox]

**The host's usual limits always apply.** The connector runs under Node's permission model, without SQLite or FFI. It can reach the network and read its own code file, and it gets only [what the host passes](/build/connectors#a-marfa-plugin). It can't write files, start child processes or worker threads, or load native add-ons.

Node's permission model guards against a faulty connector, not a hostile one. Without the sandbox, a connector can still signal other processes that run as you, open another Node program's inspector, and connect to Unix sockets on the machine. **Install only plugins you trust.** Installing a plugin with a connector needs `connectors.manage`.

## When the sandbox can't start [#when-the-sandbox-cant-start]

The host checks that the sandbox works before each start.

* **The machine can't run it.** The connector runs under the usual limits, and `marfa-connector-host logs` says why. The host checks again after a minute, then less often, up to once an hour. Once the sandbox works, the host restarts the connector inside it.
* **The host can't tell,** for example because no port or memory is free. It doesn't start the connector. It checks again after 5 seconds, then less often, up to every 5 minutes.

## On Linux [#on-linux]

A connector looks up host names with the services on the `hosts` line of `/etc/nsswitch.conf`. When a system file the sandbox was given is replaced, such as `/etc/resolv.conf` after a change of network, the host restarts the connector once the files have stayed the same for five seconds. The host's [README](https://github.com/withmarfa/plugins/blob/main/host/README.md#what-a-connector-can-do) lists the known limits.
