Overview
This section covers running Colibri on your own machine to work on it. To run an instance for other people, read Self-Hosting. The architecture pages explain how the parts fit together.
What you’re going to run
Section titled “What you’re going to run”Colibri is split across two repositories, and local development normally involves both:
| Repository | Contains | Runs as |
|---|---|---|
| colibri-social/api | The AppView, a Node.js and TypeScript pnpm workspace, and the compose files for its dependencies | pnpm dev on port 3000 |
| colibri-social/colibri.social | The client, its component library, the website that hosts it, the native shell, and this documentation | pnpm dev:app on port 5173 |
The AppView stores its data in a libSQL file by default, so it starts with no database service. You’ll need two more things:
- A PDS running the spaces alpha, which hosts the account of every Space you create.
PDS_URLis required. Snowglobe runs one together with test accounts, and the AppView repository ships a compose overlay that runs one on its own. - Postgres, which is optional. An overlay switches the AppView to it. See AppView development.
To work on the client’s interface alone, skip the AppView. VITE_COLIBRI_MOCK=1 pnpm dev:app runs the client on built-in mock data with no sign-in.
Prerequisites
Section titled “Prerequisites”- Node.js
>=24.22.3, which the AppView repository requires. - pnpm through
corepack enable. Both repositories pin12.21.0inpackageManager. - Docker and Docker Compose, for the local network and Postgres.
Start a local network with Snowglobe
Section titled “Start a local network with Snowglobe”Snowglobe runs a private AT Protocol network on your machine: a PDS, a PLC directory, Jetstream, and test accounts. Every service gets an https://*.local.snowglobe.at name and a certificate from a local certificate authority. Snowglobe contains no AppView, so the Colibri AppView runs next to it and joins the network as an app.
Snowglobe runs on Linux, on Windows under WSL 2, and on macOS with Docker Desktop, Apple silicon included.
The AppView repository includes everything Snowglobe needs. snowglobe.yml in its root describes a network named colibri with one spaces alpha PDS, the accounts alice and bob, and the AppView as an app on port 3000. It publishes every social.colibri.beta.* lexicon to an account on the network. Snowglobe is a dev dependency, so pnpm exec snowglobe runs it without a global install.
-
Clone the AppView repository and install its dependencies:
Terminal window git clone https://github.com/colibri-social/api.gitcd apipnpm install -
Start the network and trust its certificate authority:
Terminal window pnpm snowglobe:uppnpm exec snowglobe trustsnowglobe:upruns the images aslinux/amd64, the only platform the spaces alpha PDS image is published for. On an ARM machine, Docker runs them under emulation.snowglobe trustadds the certificate authority to the system store that Chrome, Edge, and Safari read. On macOS, that’s your login keychain. A Firefox-based browser keeps its own list. Import~/.local/share/snowglobe/ca/ca.crtthere under Settings > Privacy & Security > View Certificates > Authorities.Wait for
snowglobe:upto return before you open the client. The lexicons are published at the end of the command. -
Copy
.env.snowglobe.exampleto.envand fill in the three empty values:Terminal window cp .env.snowglobe.example .envGenerate
SIGNING_KEYandCREDENTIAL_ENCRYPTION_KEYwith theopensslcommands in.env.example. CopyPDS_ADMIN_PASSWORDfromSG_PDS_ADMIN_PASSWORDin~/.local/share/snowglobe/colibri/secrets.env. -
Run the AppView with the network’s settings:
Terminal window pnpm dev:snowglobedev:snowglobewrapspnpm devinsnowglobe run, which sets the variables from theenvblock ofsnowglobe.ymlandNODE_EXTRA_CA_CERTS, so the AppView trusts the network’s certificates. -
Check that the AppView answers on its network name:
Terminal window curl --cacert ~/.local/share/snowglobe/ca/ca.crt \https://appview.app.colibri.local.snowglobe.at/health -
In the client repository, start the dev server with the network’s AppView and PLC directory:
Terminal window VITE_COLIBRI_APPVIEW_URL=https://appview.app.colibri.local.snowglobe.at \VITE_COLIBRI_PLC_URL=https://plc.colibri.local.snowglobe.at \pnpm dev:app -
Open
http://127.0.0.1:5173/app/and sign in asalice.colibri.local.snowglobe.at. The passwords of both accounts are in~/.local/share/snowglobe/colibri/accounts.env.
Troubleshooting sign-in
Section titled “Troubleshooting sign-in”- The sign-in request to
plc.directoryfails. The client looks up accounts in the public PLC directory unlessVITE_COLIBRI_PLC_URLnames the network’s own. /oauth/paranswersinvalid_scopewith “Unable to resolve Lexicon schema social.colibri.beta.permissionAccount”. The PDS found no published lexicon. Runpnpm snowglobe:upagain. The PDS stores a failed lookup for five minutes. A restart does not fix this. Wait five minutes, or runpnpm exec snowglobe down -vandpnpm snowglobe:upto start from an empty network.- The browser rejects the certificate. Run
pnpm exec snowglobe trustand restart the browser, or import the certificate authority by hand in a Firefox-based browser. - Creating a Space fails with
UpstreamFailure. Theimageinsnowglobe.ymlis Snowglobe’s built-inspaces-alphaname, which is pinned to a build withoutcom.atproto.space.createSpace. Set it toghcr.io/bluesky-social/atproto:pds-spaces-alpha.
pnpm snowglobe:down stops the network and keeps its data. pnpm exec snowglobe down -v deletes the data as well. pnpm exec snowglobe account carol CAROL adds another account.
The next two sections set up the same pieces with the compose overlay from the AppView repository, as an alternative to Snowglobe.