# tangled Hello Tanglers! This is the codebase for [Tangled](https://tangled.sh)—a code collaboration platform built on the [AT Protocol](https://atproto.com). Read the introduction to Tangled [here](https://blog.tangled.sh/intro). ## knot self-hosting guide So you want to run your own knot server? Great! Here are a few prerequisites: 1. A server of some kind (a VPS, a Raspberry Pi, etc.). Preferably running a Linux of some kind. 2. A (sub)domain name. People generally use `knot.example.com`. 3. A valid SSL certificate for your domain. There's a couple of ways to get started: * NixOS: refer to [flake.nix](https://tangled.sh/@tangled.sh/core/blob/master/flake.nix) * Manual: Documented below. ### manual setup First, clone this repository: ``` git clone https://tangled.sh/@tangled.sh/core ``` Then, build our binaries (you need to have Go installed): * `knotserver`: the main server program * `keyfetch`: utility to fetch ssh pubkeys * `repoguard`: enforces repository access control ``` cd core export CGO_ENABLED=1 go build -o knot ./cmd/knotserver go build -o keyfetch ./cmd/keyfetch go build -o repoguard ./cmd/repoguard ``` Next, move the `keyfetch` binary to a location owned by `root` -- `/keyfetch` is a good choice: ``` sudo mv keyfetch /keyfetch sudo chown root:root /keyfetch sudo chmod 755 /keyfetch ``` This is necessary because SSH `AuthorizedKeysCommand` requires [really specific permissions](https://stackoverflow.com/a/27638306). Let's set that up: ``` sudo tee /etc/ssh/sshd_config.d/authorized_keys_command.conf <