Paperless NG has been around for a while, and is an extremely powerful tool to manage your scans. Not only can it read and store most file types (some by converting to pdf) it can also learn the types of documents you regularly use, apply metadata automatically and make everything you have searchable.
This actually took me a little bit of research and time to get right. The basic Paperless image is great for only a handful of file types, and you cannot upload any plaintext or .docx or .xlsx documents to it. With the below, you can.
Let's get started.
You should have:
- Docker and docker-compose installed on your machine
- The ability to SSH / use CLI/terminal on your machine, or use Portainer to spin up your stacks
- Some sort of access and relevant permissions to manage and create new directories
If you want to access Paperless remotely over reverse proxy
- You should have your own domain name with a fully functioning reverse proxy (check out my SWAG article, and I recommend Cloudflare as an incredibly feature-packed, not to mention free CDN)
proxydocker network (either called proxy or something else, this is the network you use for your reverse proxy/SWAG container to communicate with the services it acts as RP for)
- You know how to create the relevant records and reverse proxy configurations
- Note that for nginx configurations there are some requirements, you can read about them here
Creating the containers
This service needs 5 separate containers:
- Redis (a cache to speed up db queries)
- Postgres database (we're going to call the service 'db')
- The webserver (paperless app itself)
- Gotenberg (required for converting documents to pdf)
- Tika (required for reading openoffice/word documents)
Prepping your file system
- SSH into your machine, and navigate to your docker or compose directory
- Copy/paste the following command:
Your folder structure should look like this:
cd ..followed by
Enterto go up one folder level back to your
Populating our docker files
We're now going to edit our docker-compose and .env files. You can do this using
vim from your CLI/terminal if you like, or through SMB or whatever method you like. Either way, open your
docker-compose.yml file and copy paste the following:
- Make the relevant changes where it requires it in the compose file
- Save the file
- We also need to populate the
.envtoo. Open that file, then copy paste the following:
- Complete each line as required
- Save the file
You should now be in a good place to now spin up your containers by typing
docker-compose -p "paperless" up -d into your CLI/terminal while in the
-pallows us to name our docker stack by defining it within the
- Check the logs of the containers as you spin them up to make sure there are no errors
- Once done, you should now be able to access your paperless instance at http://yourMachineIP:8777
the webserver will take the longest to spin up. It is the last to be created, and will also take some time to migrate the database. Don't be surprised if you can't access it immediately, you can follow along in the logs while it does what it needs
When you're in you should see this page:
Log in using the username and password you set for
ADMINPW, and it will take you to the dashboard which will be initially empty, save for some 'first use' tips:
From here you can check out the Admin and Settings pages, and begin uploading documents by either dragging and dropping into the box on the right, or clicking the
Browse files button.
There's a lot of functionality you can add to the documents you upload, which is what makes Paperless NGX so good. Read through the official documentation to get a better idea of what suits you.
The difference for Synology
For some reason, internal docker networking doesn't seem to work for communication between
webserver and both
tika, mainly because the front end is dependent on using the
http:// protocol. Normally I'd still expect the
http://[service]:[port] method to work, and apparently it does, just not on Synology.
We got around this by publishing the ports for both
tika. If you need to change the port mapping, that's fine, but don't change the http address for them in the webserver environment block.