Docspell is a simple yet powerful document Document Management System (DMS). It is designed to be your organizer and helps with stowing documents away very quickly and finding them at later time faster and reliably. Docspell is targeted for home and a small to medium organizations use. If you have physical documents such as receipts, contracts, invoices, bills, e.t.c that need to be scanned and stored in formats such as PDF, Docspell DMS is must try tool.
Docspell has a web management dashboard but is available via a REST or HTTP api and can be easily used within your own scripts and tools, for example using curl
. You can visit Docspell features page to check and understand all the features that this great piece of software comes with. Some of the tops features includes:
- Can handle multiple documents as one unit. This simplifies management of files.
- OCR using tesseract
- Full-Text Search feature that’s based on Apache SOLR or PostgreSQL’s text search
- Default Conversion to PDF: Docspell converts all files into a PDF file after scanning.
- A powerful query language to find documents
- It is non-destructive: Once the file is uploaded it is never modified and can always be downloaded untouched
- Files can be organized using tags, folders, Custom Fields and other metadata
- and many other features
1: Install Docker Container Engine
In this article we’ll run Docspell Document Management System (DMS) in Docker Container. For you to run containers Docker Engine must be installed on the local system.
Confirm your installation of Docker
$ docker --version
Docker version 24.0.5, build ced0996
$ docker compose version
Docker Compose version v2.20.2
Also consider installing git on th system.
sudo apt install git vim -y
2: Clone docspell git source
Using git pull the latest sources of Docspell
git clone https://github.com/eikek/docspell
Change your working directory to docspell
folder. Then to docker/docker-compose/
which contains the compose configuration file used to run Docker containers of Docspell applications.
cd docspell/docker/docker-compose/
You can edit the compose file
$ vim docker-compose.yml
...
environment:
- TZ=Europe/Berlin
Several environment variables can be modified, for example:
- DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET
- DOCSPELL_SERVER_AUTH_SERVER__SECRET
- DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE
3: Running Docspell DMS in Docker containers
When done with the configurations you can spin Docspell containers by running the following commands:
$ docker compose up -d
[+] Running 8/8
✔ Network docker-compose_default Created 0.1s
✔ Volume "docker-compose_docspell-postgres_data" Created 0.0s
✔ Volume "docker-compose_docspell-solr_data" Created 0.0s
✔ Container postgres_db Started 0.7s
✔ Container docspell-solr Started 0.7s
✔ Container docspell-joex Started 1.2s
✔ Container docspell-restserver Started 1.4s
✔ Container docspell-consumedir Started
The status check should return status of Up for the following 5 containers.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3112cf002922 docspell/dsc:latest "dsc -d http://docsp…" 32 seconds ago Up 30 seconds docspell-consumedir
6f678c80f3a3 docspell/joex:latest "/opt/joex-entrypoin…" 32 seconds ago Up 31 seconds (health: starting) 0.0.0.0:7878->7878/tcp, :::7878->7878/tcp docspell-joex
07d5d911ffc2 docspell/restserver:latest "/opt/docspell-rests…" 32 seconds ago Up 30 seconds (health: starting) 0.0.0.0:7880->7880/tcp, :::7880->7880/tcp docspell-restserver
c701229cb9af solr:9 "docker-entrypoint.s…" 32 seconds ago Up 31 seconds (health: starting) 8983/tcp docspell-solr
7112a6d48b16 postgres:15.4 "docker-entrypoint.s…" 32 seconds ago Up 31 seconds 5432/tcp postgres_db
If you need to check on startup logs of any container then use.
docker logs <container>
# example
docker logs
You can as well list containers using compose commands.
$ docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
docspell-consumedir docspell/dsc:latest "dsc -d http://docsp…" consumedir 13 hours ago Up 13 hours
docspell-joex docspell/joex:latest "/opt/joex-entrypoin…" joex 13 hours ago Up 13 hours (healthy) 0.0.0.0:7878->7878/tcp, :::7878->7878/tcp
docspell-restserver docspell/restserver:latest "/opt/docspell-rests…" restserver 13 hours ago Up 13 hours (healthy) 0.0.0.0:7880->7880/tcp, :::7880->7880/tcp
docspell-solr solr:9 "docker-entrypoint.s…" solr 13 hours ago Up 13 hours (healthy) 8983/tcp
postgres_db postgres:15.4 "docker-entrypoint.s…" db 13 hours ago Up 13 hours 5432/tcp
4: Access Docspell DMS Web Dashboard
Docspell web console can be accessed via http://serverip_or_domain:7880

Click “Sign up” to create login user. When signing up, choose the same name for “Collective ID” and “User Login“.

Once done login with the created username and the password.

Docspell complete dashboard will have this look. Red through Docspell documentation to master its functionality and how you can tweak its settings to suit your use case.

5: Configuring Nginx Proxy for Docspell
To secure our service using SSL certificate, using Nginx is highly recommended. But first you’ll need to install nginx
package.
### Debian based systems ###
sudo apt install nginx
### RHEL based systems ###
sudo yum install nginx
Start and enable nginx service to start at system boot.
sudo systemctl enable --now nginx
Create docspell.conf
configuration file
sudo vim /etc/nginx/conf.d/docspell.conf
If not using SSL, below default configuration file should work. Just update your FQDN.
server {
listen 80 ;
server_name edms.example.net ;
location / {
proxy_pass http://127.0.0.1:7880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-Host $host;
}
}
Using Let’s Encrypt / Any other SSL
For SSL update your Nginx configurations file to include extra security settings.
server {
listen 80 ;
server_name edms.example.net ;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2 ;
server_name edms.example.net ;
ssl_certificate /etc/letsencrypt/live/edms.example.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/edms.example.net/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/edms.example.net/fullchain.pem;
location / {
proxy_pass http://127.0.0.1:7880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
}
}
Note that the domain used in server_name
should be FQDN and have DNS record set correctly. The local /etc/hosts
file can be used to map IP address to domain name for test purposes.
We hope this article was educative and enjoy Docspell as your documents management system. For any assitance needs, kindly reach out to us through our social media pages or comments section.
Reference: Docspell documentation