Chapter 1
1. Getting started
The decentral approach is very important to us. That is why Doctag is available in two versions: You can host this web service yourself (DOCTAG/own) or use the managed version (DOCTAG/cloud).
First step: Which installation to choose?
Subsections of 1. Getting started
Which installation to choose?
The decentral approach is very important to us. That is why Doctag is available in two versions: You can host this web service yourself (DOCTAG/own) or use the managed version (DOCTAG/cloud).
Hosted instance: DOCTAG/cloud
For a simple and quick start, choose the DOCTAG/cloud variant. Here, we handle the operation, maintenance and backup for your Doctag server. No IT expertise is required. In a few minutes, you will receive your fully functional Doctag server.
Start with hosted version
On-premise instance: DOCTAG/own
The second option is to operate Doctag on your own private server. This variant is for users who have solid knowledge of operating their own web server.
The installation is carried out according to the steps shown in the chapter Installation.
Start with on-premise version
Requirements
Only for DOCTAG/own on-premise instances
Note
The hosted service DOCTAG/cloud has no requirements.
Your own server will have to meet the following requirements:
- Web server with root access
- Java
- MongoDB
- optional: reverse proxy
Installation
Only for DOCTAG/own on-premise instances
Note
The hosted service DOCTAG/cloud has an easy step-by-step start-up procedure under setup.doctag.de
Installation on Debian/Ubuntu
1. Installing the basic technology
To install the required software use
sudo apt-get install openjdk-14-jre
sudo apt-get install mongodb
2. Download latest release of DOCTAG/own
Load the release from https://www.doctag.de/download/
Example command:
wget https://www.doctag.de/download/docsrv-2023-11-29.jar
# Rename file
mv docsrv-2023-11-29.jar docsrv.jar
java -jar docsrv.jar
Now visit http://127.0.0.1:16097/install in your browser to initially setup database hostname and root user.
3. Running as systemd service
Create a systemd service file named /etc/systemd/system/docsrv.service
with the following content:
[Unit]
Description=Docserver for serving documents
After=network.service
[Service]
Restart=always
RestartSec=10
TimeoutSec=300
# Please customize the working directory
WorkingDirectory=/root/
ExecStart=/usr/bin/java -Xms256m -Xmx512m -XX:MaxDirectMemorySize=512M -XX:MaxGCPauseMillis=50 -jar docsrv.jar
[Install]
WantedBy=multi-user.target
Reload systemd and start Doctag instance
sudo systemctl daemon-reload
sudo service docsrv start
To view the log output please execute
sudo journalctl -u docsrv.service -f
To automatically boot service on system start
sudo systemctl enable docsrv.service
4. Create cronjob for automatic mail import (if required)
The import of documents can be automated using the automatic mail import function. The mail import can be executed at a desired interval using the following cron job:
crontab -e
*/15 * * * * curl https://<your Docserver domain>/internal/cron > /var/log/doctag_cron.log
In this example, the job is executed every 15 minutes.
5. Ready to login and work
Now DOCTAG/own is ready to work. Open http://127.0.0.1:16097/ in your browser and login with the root user you created in step 2.
For correct operation of the server, the server needs to have a valid SSL certificate and a domain. Please refer to the chapter Donain and SSL to get more information.
Domain and SSL
Only for DOCTAG/own on-premise instances
Note
The hosted service DOCTAG/cloud has no domain and SSL requirements.
We recommend caddy for terminating SSL traffic and for certificate generation. Please follow the instruction to get a working installation that provides you with SSL certificates for your Doctag domain.
Please Note: It is impossible for Doctag to share a domain name with other http based services. Thus please give Doctag a dedicated subdomain e.g. doctag.your_hostname.com
.
Most importantly, please make sure to have a valid DNS record pointing to the host where Doctag is running.
To setup Doctag behind a TLS terminating reverse proxy please install caddy first. Once you have caddy installed on your machine, please edit the caddy config file in /etc/caddy/Caddyfile
. It shall have the following content:
doctag.your_hostname.com {
reverse_proxy 127.0.0.1:16097
}
Please note that you have to replace doctag.your_hostname.com
with the acutal hostname you want to use. Once you created that config file, you can reload caddy by executing:
sudo service caddy reload
Caddy will now automatically fetch Let’s Encrypt certificates and make sure that your Doctag instance is only accessible via TLS. The certificates will be automatically managed by caddy, so you don’t need to renew them repeatetly.
Doctag is now available behind a reverse proxy and has valid TLS certificates.
Updating
Only for DOCTAG/own on-premise instances
Note
The hosted service DOCTAG/cloud is automatically kept up to date. No updates need to be installed.
1. Download latest release of DOCTAG/own
Load the release from https://www.doctag.de/download/
Example command:
wget https://www.doctag.de/download/docsrv-2023-11-29.jar
# Rename file
mv docsrv-2023-11-29.jar docsrv.jar
2. Restart services
Reload systemd and start Doctag instance
sudo systemctl daemon-reload
sudo service docsrv restart
3. Check log
To view the log output please execute
sudo journalctl -u docsrv.service -f
Database backup
Only for DOCTAG/own on-premise instances
Note
The hosted service DOCTAG/cloud performs automatic backups. No configuration is necessary.
The instructions for the database backup are in progress.