From 3828d712bd516cebeb5f6dc534f6c62240c6c2a9 Mon Sep 17 00:00:00 2001 From: viktor-c Date: Thu, 1 Sep 2022 01:36:13 +0200 Subject: [PATCH] Info about installing on subpath (#1350) * Update docker-compose.env * Update configuration.rst example.com/paperless is not a subdomain, but a subpath. Also when hosting from a subdomain like paperless.example.com one does not have to change anything in the configuration, it just works, because paperless expects to be hosted at root, i.e. paperless.example.com This however changes when paperless is not hosted at root anymore but for example at paperless.example.com/paperlessNgx * Update docker-compose.env * Apply suggestions from code review Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- docker/compose/docker-compose.env | 4 ++++ docs/configuration.rst | 7 +++++++ 2 files changed, 11 insertions(+) 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= PAPERLESS_STATIC_URL= 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= Specify a username here so that paperless will automatically perform login with the selected user.