# Knot 2

In Tangled, a "knot" is simply a git server that does its auth layer over the AT Protocol.
Essentially:

1. Atproto users declare their public SSH key for themselves, in their PDS.
2. A knot admin (defined by atproto DID in the knot config) makes a request to the knot to allow membership to a given atproto user.
3. Said user can now create/update/delete a git repo on the knot, and do normal git things to that git repo over SSH.
4. Said user makes a request to the knot to allow more atproto users as collaborators on their specific git repo.

- **It has no database, or should I say, git is the only database, along with a secret-key-file.**
- It aims to be small, fast, and modern - for example: http3/quic support, SHA256 by default, and no need for unix `git` user, to name a couple of features.

# Running a knot

The operator documentation: [the docs](https://tangled.org/docs):

- [Run a knot](https://tangled.org/docs/self-hosting/knot/) - a knot on NixOS or in a container.
- [Self-hosting a knot](https://tangled.org/docs/knots/self-hosting/) - more detail: ports, systemd, TLS, members, LFS, backups.
- [Knot configuration](https://tangled.org/docs/reference/knot-config/) - list of keys, defaults, and `KNOT_*` env vars.
- [Knot](https://tangled.org/docs/knots/) - what a knot does and how it talks to the rest of Tangled.
- If running the old golang knot and want this instead: [Migrate](https://tangled.org/docs/upgrading/knot-2/) with `knot-migrate` tool - afterwards the knot will serve the same hostname with the same repos, owners, members and collaborators.

Happy knotting!
