# Start in the foreground or background

Source: https://zotonic.com/docs/2929/start-in-the-foreground-or-background

URI: https://zotonic.com/id/2929

Language: en

Choose a startup mode for the environment:

```sh
bin/zotonic debug
bin/zotonic start_nodaemon
bin/zotonic start
```

Run one of these, not all three. `debug` keeps an interactive Erlang shell in the foreground. `start_nodaemon` runs in the foreground without that shell, which suits a process supervisor. `start` runs in the background.

Use `bin/zotonic status` afterwards to inspect the node and sites. To attach to an existing instance, use `shell`.

`stop` stops the Erlang VM and every site on it. `restart` restarts Zotonic and its sites within the VM. Use site-specific commands for a change that should affect only one site. See [Start, stop, and restart a site](/id/2930).

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2929?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2929?language=en>)
