# Build and start Zotonic

Source: https://zotonic.com/docs/2913/build-and-start-zotonic

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

Language: en

Compile Zotonic, start it, check the status page, and continue to your first site.

Complete one [installation route](/id/1526) first. For a native or Nix setup, the tools and [database connection](/id/3045) should now be ready. Container users whose node is already running can go straight to [Create your first site](/id/2914).

1. Build
--------

From the Zotonic repository root, as your normal user:

```sh
make
```

The first build downloads dependencies and compiles Zotonic. Wait for the successful-compilation message. If it fails, resolve the first build error before continuing; a missing compiler or wrong Erlang version is a setup issue.

2. Start
--------

For the first walkthrough, start in the background so the same terminal remains available:

```sh
bin/zotonic start
bin/zotonic status
```

Expect a running node and sites with their states. Open [the local status site](https://localhost:8443/). This is the installation's management page, not your new website. The initial HTTPS certificate is self-signed; accept it only for this local development address.

If the node is already running, use `status` rather than starting a second instance. If startup fails, check whether ports 8000/8443 are occupied and read the reported log location.

3. Create a site
----------------

Continue with [Create your first site](/id/2914). Keep using this repository root for `bin/zotonic` commands.

Foreground development and stopping
-----------------------------------

For startup output and an interactive Erlang shell, use `bin/zotonic debug` instead of `start`, with Zotonic stopped first. Run further OS commands from a second terminal in the same environment. Do not type shell commands such as `bin/zotonic status` at the Erlang prompt.

Use `bin/zotonic stop` to stop this installation. Attach to an existing node with `bin/zotonic shell`; Ctrl-C twice detaches that remote shell without stopping the node. See [startup modes](/id/2929) for details.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2913?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/2913?language=en>)
