···5555quite cumbersome. So the nix flake provides a5656`nixosConfiguration` to do so.57575858-To begin, head to `http://localhost:3000/knots` in the browser5959-and create a knot with hostname `localhost:6000`. This will6060-generate a knot secret. Set `$TANGLED_VM_KNOT_SECRET` to it,6161-ideally in a `.envrc` with [direnv](https://direnv.net) so you6262-don't lose it.5858+To begin, grab your DID from http://localhost:3000/settings.5959+Then, set `TANGLED_VM_KNOT_OWNER` and6060+`TANGLED_VM_SPINDLE_OWNER` to your DID.63616464-You will also need to set the `$TANGLED_VM_SPINDLE_OWNER`6565-variable to some value. If you don't want to [set up a6666-spindle](#running-a-spindle), you can use any placeholder6767-value.6262+If you don't want to [set up a spindle](#running-a-spindle),6363+you can use any placeholder value.68646965You can now start a lightweight NixOS VM like so:7066···7175```72767377This starts a knot on port 6000, a spindle on port 65557474-with `ssh` exposed on port 2222. You can push repositories7575-to this VM with this ssh config block on your main machine:7878+with `ssh` exposed on port 2222.7979+8080+Once the services are running, head to8181+http://localhost:3000/knots and hit verify (and similarly,8282+http://localhost:3000/spindles to verify your spindle). It8383+should verify the ownership of the services instantly if8484+everything went smoothly.8585+8686+You can push repositories to this VM with this ssh config8787+block on your main machine:76887789```bash7890Host nixos-shell···999510096## running a spindle10197102102-You will need to find out your DID by entering your login handle into103103-<https://pdsls.dev/>. Set `$TANGLED_VM_SPINDLE_OWNER` to your DID.104104-105105-The above VM should already be running a spindle on `localhost:6555`.106106-You can head to the spindle dashboard on `http://localhost:3000/spindles`,107107-and register a spindle with hostname `localhost:6555`. It should instantly108108-be verified. You can then configure each repository to use this spindle109109-and run CI jobs.9898+The above VM should already be running a spindle on9999+`localhost:6555`. Head to http://localhost:3000/spindles and100100+hit verify. You can then configure each repository to use101101+this spindle and run CI jobs.110102111103Of interest when debugging spindles:112104
+7-5
docs/knot-hosting.md
···7373```74747575Create `/home/git/.knot.env` with the following, updating the values as7676-necessary. The `KNOT_SERVER_SECRET` can be obtained from the7777-[/knots](https://tangled.sh/knots) page on Tangled.7676+necessary. The `KNOT_SERVER_OWNER` should be set to your7777+DID, you can find your DID in the [Settings](https://tangled.sh/settings) page.78787979```8080KNOT_REPO_SCAN_PATH=/home/git8181KNOT_SERVER_HOSTNAME=knot.example.com8282APPVIEW_ENDPOINT=https://tangled.sh8383-KNOT_SERVER_SECRET=secret8383+KNOT_SERVER_OWNER=did:plc:foobar8484KNOT_SERVER_INTERNAL_LISTEN_ADDR=127.0.0.1:54448585KNOT_SERVER_LISTEN_ADDR=127.0.0.1:55558686```···128128Remember to use Let's Encrypt or similar to procure a certificate for your129129knot domain.130130131131-You should now have a running knot server! You can finalize your registration by hitting the132132-`initialize` button on the [/knots](https://tangled.sh/knots) page.131131+You should now have a running knot server! You can finalize132132+your registration by hitting the `verify` button on the133133+[/knots](https://tangled.sh/knots) page. This simply creates134134+a record on your PDS to announce the existence of the knot.133135134136### custom paths135137
+39
docs/migrations/knot-1.7.0.md
···11+# Upgrading from v1.7.022+33+After v1.7.0, knot secrets have been deprecated. You no44+longer need a secret from the appview to run a knot. All55+authorized commands between services to knots are managed66+via [Service77+Auth](https://atproto.com/specs/xrpc#inter-service-authentication-jwt).88+Knots will be read-only until upgraded.99+1010+Upgrading is quite easy, in essence:1111+1212+- `KNOT_SERVER_SECRET` is no more, you can remove this1313+ environment variable entirely1414+- `KNOT_SERVER_OWNER` is now required on boot, set this to1515+ your DID. You can find your DID in the1616+ [settings](https://tangled.sh/settings) page.1717+- Restart your knot once you have replace the environment1818+ variable1919+- Head to the [knot dashboard](https://tangled.sh/knots) and2020+ hit the "retry" button to verify your knot. This simply2121+ writes a `sh.tangled.knot` record to your PDS.2222+2323+## Nix2424+2525+If you use the nix module, simply bump the flake to the2626+latest revision, and change your config block like so:2727+2828+```diff2929+ services.tangled-knot = {3030+ enable = true;3131+ server = {3232+- secretFile = /path/to/secret;3333++ owner = "did:plc:foo";3434+ .3535+ .3636+ .3737+ };3838+ };3939+```