<!-- Source: https://docs.biosimulant.com/how-to/library/serve-local-lab -->

# How to Serve a Local Lab

`biosimulant labs serve` opens the bundled local lab UI for a runnable lab source
tree, `.bsilab` package, or public registry reference.

## Install

```bash
pipx install biosimulant
```

No UI extra is required. The local web runtime ships with the default package.

## Create a starter lab

```bash
biosimulant labs init ./serve-check --name "Serve Check" --force
```

## Start the UI

```bash
biosimulant labs serve ./serve-check
```

The browser opens by default at the root URL, for example
`http://127.0.0.1:8765/`.

For scripts, servers, and CI runners, suppress browser launch:

```bash
biosimulant labs serve ./serve-check --no-open --port 8766
```

## What persists

- Model, world, runtime, and wiring edits are saved to `lab.yaml`.
- Canvas layout is saved to `wiring-layout.json`.
- Run history is in memory for the active serve process.

**Info:**

  `/ui` and `/ui/` redirect to `/` for compatibility, but new links and scripts
  should use the root URL.

## Next steps

- [Labs Serve UI Reference](/references/library/labs-serve)
- [Custom Visualizations](/how-to/library/custom-visualizations)
- [Write a lab.yaml](/how-to/library/write-lab-manifest)
