Monorepo for Tangled tangled.org

Self-hosted knot requires restart to display any pushed changes #4855

Open gabbie.blue
Open opened by gabbie.blue

Title, when pushing changes to my knot they only show up in the web UI after running systemctl restart knot-rs.service The knot is running on nixos, here is the relevant config:

{ config, ... }: {
  services.tangled.knot-rs = {
    enable = true;
    environmentFile = config.sops.secrets.tangled-env.path;
    settings = {
      server = {
        hostname = "knot.gabbie.blue";
        admins = [ "did:plc:cmbtcfdmyv34df52cun76zto" ];
      };
      git.object_format = "sha1";
      atproto.plc_directory = "https://plc.directory";
      lfs.store_path = "/var/lib/knot/lfs";
      contact.email = "redacted";
    };
  };
  services.caddy.virtualHosts = {
    "knot.gabbie.blue".extraConfig = ''
      reverse_proxy 127.0.0.1:5555
    '';
  };
  sops.secrets.tangled-env = {sopsFile = ./secrets/tangled.sops.env; format="dotenv";};
}

Seems like your knot doesn't support websocket connection!

% websocat wss://knot.gabbie.blue/xrpc/com.atproto.sync.subscribeRepos
websocat: WebSocketError: WebSocketError: Received unexpected status code (503 Service Unavailable)
websocat: error running

Here is how our prod knot does it (nginx):

locations."/xrpc/com.atproto.sync.subscribeRepos" = {
  proxyPass = "http://127.0.0.1:5555";
  proxyWebsockets = true;
};

Interesting, it was working on a previous version of knot, I use caddy which should proxy websockets by default but I had to set the reverse_proxy directive to [::1]:5555 instead of 127.0.0.1:5555 for it to work properly, after updating I found that this didn't work and I swapped back to using what you see above. Do you know why this might be?

Sign up or Sign in to add to the discussion.