Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Info about installing on subpath (#1350)

viktor-c3828d712bd51
diff --git a/docker/compose/docker-compose.env b/docker/compose/docker-compose.env
index 34e694b92..c4dbb4cce 100644
--- a/docker/compose/docker-compose.env
+++ b/docker/compose/docker-compose.env
@@ -36,3 +36,7 @@
# The default language to use for OCR. Set this to the language most of your
# documents are written in.
#PAPERLESS_OCR_LANGUAGE=eng
+
+# Set if accessing paperless via a domain subpath e.g. https://domain.com/PATHPREFIX and using a reverse-proxy like traefik or nginx
+#PAPERLESS_FORCE_SCRIPT_NAME=/PATHPREFIX
+#PAPERLESS_STATIC_URL=/PATHPREFIX/static/ # trailing slash required
diff --git a/docs/configuration.rst b/docs/configuration.rst
index 94c7c2e64..7eac9440f 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -215,9 +215,16 @@ PAPERLESS_FORCE_SCRIPT_NAME=<path>
PAPERLESS_STATIC_URL=<path>
Override the STATIC_URL here. Unless you're hosting Paperless off a
subdomain like /paperless/, you probably don't need to change this.
+ If you do change it, be sure to include the trailing slash.
Defaults to "/static/".
+ .. note::
+
+ When hosting paperless behind a reverse proxy like Traefik or Nginx at a subpath e.g.
+ example.com/paperlessngx you will also need to set ``PAPERLESS_FORCE_SCRIPT_NAME``
+ (see above).
+
PAPERLESS_AUTO_LOGIN_USERNAME=<username>
Specify a username here so that paperless will automatically perform login
with the selected user.