I recently got a network-attached storage (NAS) device called the Synology DS224+. My backup strategy is as follows:
This has worked well so far. HyperBackup has already gotten me out of a tough spot where I deleted some files accidentally and it helped me restore a previous version.
I have thousands of odd documents, many of them duplicated backups of backups, and I wanted to clean them up. Synology also has a feature named Universal Search which can index all the files on the NAS and it does a pretty good job at searching them. It also has a feature called Storage Analyzer which can show large and duplicated files. But these two features don’t go quite far enough to solve document clutter. There is still a lot of manual reorganization work required.
I wanted a tool that could automatically organize my documents and remove duplicates. I found a tool called Paperless NGX, an actively developed community fork of the original project of the same name. It is a document management system that can automatically organize documents and remove duplicates.
Synology’s Container Manager can help run Paperless using a Docker Compose file. There are a myriad of tutorials out there, but here is a quick guide to get it running simply:
docker
shared folder. Call it something like paperless-ngx
.paperless-ngx/docker-compose.yml
file and copy the contents of https://github.com/paperless-ngx/paperless-ngx/blob/main/docker/compose/docker-compose.portainer.yml into it.
PAPERLESS_
environment variablesUSERMAP_UID
(usually 1026) and USERMAP_GID
(usually 100) is correcttika
and gotenberg
containers from https://github.com/paperless-ngx/paperless-ngx/blob/main/docker/compose/docker-compose.postgres-tika.ymldocker/paperless-ngx/consume
and docker/paperless-ngx/export
folders. These are where Paperless will consume documents and export backups.
export
path to any other folder. I set it to a folder in my synced OneDrive. If you do this then you need to set appropriate Read/Write permissions on that folder and its subfolders, else it won’t be visible as a bind mount.paperless-ngx
.Set Path
and navigate to the docker/paperless-ngx
folder you created earlier. It will detect your existing docker-compose.yml
file, and you can click Next
. Continue to create the project and run the containers. You will see three containers:Then navigate to your Synology on port 8010
and log into the Paperless interface.
Create a user defined script as a scheduled task with Control Panel
> Task Scheduler
.
The script should look something like this:
../export
should be unchanged (it will map to the docker/paperless-ngx/export
) folder you created earlier.-d
flag to remove deleted documents.Synology has a feature called QuickConnect which can help you access your NAS from anywhere. But I prefer to use Tailscale, a VPN service that can help you access your NAS and other devices securely. You can install Tailscale on your Synology using the package manager, and make sure Magic DNS is enabled.
Then you can access Paperless by navigating to http://<nas_tailscale_name>:8010
in your browser.