From 97b684b5af702c14faad9e57c3544faf66ff012c Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Tue, 8 Apr 2025 16:23:39 +0300 Subject: [PATCH] readme: add links to documentation --- readme.md | 110 ++---------------------------------------------------- 1 file changed, 3 insertions(+), 107 deletions(-) diff --git a/readme.md b/readme.md index 2f2fd607..6fda9769 100644 --- a/readme.md +++ b/readme.md @@ -6,111 +6,7 @@ on the [AT Protocol](https://atproto.com). Read the introduction to Tangled [here](https://blog.tangled.sh/intro). -## knot self-hosting guide +Documentation: -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) -* Docker: Documented below. -* Manual: Documented below. - -## docker setup - -Clone this repository: - -``` -git clone https://tangled.sh/@tangled.sh/core -``` - -Modify the `docker/docker-compose.yml`, specifically the -`KNOT_SERVER_SECRET` and `KNOT_SERVER_HOSTNAME` env vars. Then run: - -``` -docker compose -f docker/docker-compose.yml up -``` - -### 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` -- -`/usr/local/libexec/tangled-keyfetch` is a good choice: - -``` -sudo mv keyfetch /usr/local/libexec/tangled-keyfetch -sudo chown root:root /usr/local/libexec/tangled-keyfetch -sudo chmod 755 /usr/local/libexec/tangled-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 <