# Install and serve

Install the binary from crates.io, validate a configuration, serve it and read the health page.

You will install `liminal`, write the smallest useful configuration, prove it valid without starting anything, and serve it. At the end a health page answers on the health address.

## Before you begin

Have a Rust toolchain and a Lys network to enrol in. The configuration below points at Lys; a liminal that cannot reach its Lys issuer still serves, but it admits no pass until it can.

> warning
> The store path must be a directory the server may create files in. The server refuses to open a store another live server holds; stop the old one first.


## Complete the task


1. Install the binary. The `liminal-cli` crate on crates.io builds the `liminal` binary.

**Terminal**

```bash
cargo install liminal-cli --locked
liminal --help
```


2. Write the configuration. Listeners, channels, the store path, the console's WebSocket and the Lys section are all that a first server needs.

**liminal.toml**

```toml
listen_address = "127.0.0.1:7600"
health_listen_address = "127.0.0.1:7601"
persistence_path = "/var/lib/liminal/store"

[[channels]]
name = "console.topology"
durable = false

[[channels]]
name = "demo.hello"
durable = true

[websocket]
listen_address = "127.0.0.1:7602"
path = "/ws"
allowed_origins = ["http://127.0.0.1:5178"]

[auth.lys]
issuer = "https://lys.example"
network_id = "example"
live = true

[participant]
wire_frame_limit = 65536
```


3. Check it. Nothing is opened and nothing is written; the first refusal is named, or the file is valid.

**Terminal**

```bash
liminal check --config liminal.toml
# liminal.toml: configuration valid
```


4. Serve. The binary with a configuration and no command serves in the foreground.

**Terminal**

```bash
liminal --config liminal.toml
```


5. Confirm. The health page answers with the server's status and its links.

**Terminal**

```bash
curl -s http://127.0.0.1:7601/health
```



## If something goes wrong

A configuration refusal names the field. A store that is locked by another live writer names the lock file: stop the other server. A Lys issuer that cannot be reached is logged at the `lys` start stage with the time it cost; the server is up without it.

## Next step

Hand an agent a seat: [The first ticket](/liminal/getting-started/first-ticket/).
