Skip to content

Instantly share code, notes, and snippets.

@ajin
Created January 16, 2021 23:17
Show Gist options
  • Save ajin/049d7660095456e81368053698281b9b to your computer and use it in GitHub Desktop.
Save ajin/049d7660095456e81368053698281b9b to your computer and use it in GitHub Desktop.
Installation Guide of Paperless-NG on Synology
# The UID and GID of the user used to run paperless in the container. Set this
# to your UID and GID on the host so that you have write access to the
# consumption directory.
USERMAP_UID=101
USERMAP_GID=1024
# Additional languages to install for text recognition, separated by a
# whitespace. Note that this is
# different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines the
# default language used when guessing the language from the OCR output.
# The container installs English, German, Italian, Spanish and French by
# default.
# See https://packages.debian.org/search?keywords=tesseract-ocr-&searchon=names&suite=buster
# for available languages.
PAPERLESS_OCR_LANGUAGES=nld eng
###############################################################################
# Paperless-specific settings #
###############################################################################
# All settings defined in the paperless.conf.example can be used here. The
# Docker setup does not use the configuration file.
# A few commonly adjusted settings are provided below.
# Adjust this key if you plan to make paperless available publicly. It should
# be a very long sequence of random characters. You don't need to remember it.
#PAPERLESS_SECRET_KEY=change-me
# Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC.
#PAPERLESS_TIME_ZONE=America/Los_Angeles
# The default language to use for OCR. Set this to the language most of your
# documents are written in.
PAPERLESS_OCR_LANGUAGE=nld
version: "3.4"
services:
broker:
image: redis:6.0
restart: always
db:
image: postgres:13
restart: always
volumes:
- /volume1/docker/paperless-ng/database:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: paperless
webserver:
image: jonaswinkler/paperless-ng:0.9.11
restart: always
depends_on:
- db
- broker
ports:
- 8000:8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- /volume1/docker/paperless-ng/data:/usr/src/paperless/data
- /volume1/docker/paperless-ng/media:/usr/src/paperless/media
- /volume1/docker/paperless-ng/export:/usr/src/paperless/export
- /volume1/docker/paperless-ng/consume:/usr/src/paperless/consume
env_file: docker-compose.env
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
ssh <SYNOLOGY_HOST> -ladmin
sudo su -
mkdir /volume1/docker/paperless-ng
cd /volume1/docker/paperless-ng
wget https://github.com/jonaswinkler/paperless-ng/releases/download/ng-0.9.11/paperless-ng-0.9.11-dockerfiles.tar.xz
tar -xf paperless-ng-0.9.11-dockerfiles.tar.xz
cd paperless-ng-dockerfiles
mv docker-compose.postgres.yml docker-compose.yml
mkdir /volume1/docker/paperless-ng/data
mkdir /volume1/docker/paperless-ng/media
mkdir /volume1/docker/paperless-ng/export
mkdir /volume1/docker/paperless-ng/consume
mkdir /volume1/docker/paperless-ng/database
vi docker-compose.yml
docker-compose up -d
docker-compose run --rm webserver createsuperuser
@sanderant
Copy link

Thanks for the gist. I'm doing this now, but will update to https://github.com/paperless-ngx/paperless-ngx since apparently that's the active version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment