From 760de11c4223258b72eac316cc541384fd130904 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Wed, 31 Dec 2025 15:03:24 +0000 Subject: [PATCH] paperless-ai --- hosts/tahani/paperless.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/hosts/tahani/paperless.nix b/hosts/tahani/paperless.nix index ce58007..bd447ac 100644 --- a/hosts/tahani/paperless.nix +++ b/hosts/tahani/paperless.nix @@ -12,6 +12,38 @@ reverse_proxy localhost:${toString config.services.paperless.port} ''; }; + virtualHosts."docs-ai.manticore-hippocampus.ts.net" = { + extraConfig = '' + tls { + get_certificate tailscale + } + reverse_proxy localhost:3000 + ''; + }; + }; + + virtualisation.oci-containers = { + backend = "docker"; + containers.paperless-ai = { + image = "clusterzx/paperless-ai:latest"; + autoStart = true; + ports = ["3000:3000"]; + volumes = [ + "paperless-ai-data:/app/data" + ]; + environment = { + PUID = "1000"; + PGID = "1000"; + PAPERLESS_AI_PORT = "3000"; + # Initial setup wizard will configure the rest + PAPERLESS_AI_INITIAL_SETUP = "yes"; + # Paperless-ngx API URL accessible from container + PAPERLESS_API_URL = "http://host.docker.internal:${toString config.services.paperless.port}/api"; + }; + extraOptions = [ + "--add-host=host.docker.internal:host-gateway" + ]; + }; }; services.redis.servers.paperless = {