LogicalDOC is an open source document management system (DMS) built on Java that helps organizations store, organize, and retrieve digital documents. It supports full-text search, version control, workflow automation, and access control – making it a solid choice for teams that need structured document handling without paying for proprietary solutions like SharePoint.
This guide walks through installing LogicalDOC Community Edition 9.2 on Ubuntu 24.04 LTS with MariaDB as the database backend, Nginx as a reverse proxy, and SSL from Let’s Encrypt for production use.
Prerequisites
Before starting, make sure you have the following in place:
- A server running Ubuntu 24.04 LTS with at least 4GB RAM (8GB recommended) and 2 CPU cores
- Root or sudo access to the server
- A domain name pointed to your server IP (for SSL configuration)
- Ports 80, 443, and 8080 (TCP) available
Switch to root for the rest of this guide:
sudo -i
Step 1: Install Java 21 on Ubuntu 24.04
LogicalDOC 9.2 requires Java 21 or newer. Ubuntu 24.04 includes OpenJDK 21 in its default repositories, so installation is straightforward. If you need a detailed walkthrough, check our guide on installing Java on Ubuntu.
apt update
apt install -y openjdk-21-jdk
After installation completes, confirm the Java version:
java -version
The output should show OpenJDK 21:
openjdk version "21.0.6" 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)
Set the JAVA_HOME environment variable so LogicalDOC can find your Java installation:
echo 'export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64' >> /etc/profile.d/java.sh
source /etc/profile.d/java.sh
Step 2: Install MariaDB Database Server
LogicalDOC stores all metadata, users, and document indexes in a relational database. MariaDB works well for this and ships in Ubuntu’s default repositories.
apt install -y mariadb-server mariadb-client
Enable and start the MariaDB service:
systemctl enable --now mariadb
Verify MariaDB is running:
systemctl status mariadb
You should see the service as active (running):
● mariadb.service - MariaDB 10.11.8 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Active: active (running)
Run the security hardening script to set a root password and remove test databases:
mariadb-secure-installation
Answer the prompts as follows – set a strong root password when asked:
- Switch to unix_socket authentication: n
- Change the root password: Y (set a strong password)
- Remove anonymous users: Y
- Disallow root login remotely: Y
- Remove test database: Y
- Reload privilege tables: Y
Step 3: Create LogicalDOC Database and User
Create a dedicated database and user for LogicalDOC. Log into the MariaDB shell:
mariadb -u root -p
Run the following SQL commands to create the database, user, and grant the necessary privileges. Replace StrongPassword123 with your own secure password:
CREATE DATABASE logicaldoc CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'logicaldoc'@'localhost' IDENTIFIED BY 'StrongPassword123';
GRANT ALL PRIVILEGES ON logicaldoc.* TO 'logicaldoc'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 4: Download LogicalDOC Community Edition
Download the LogicalDOC CE 9.2 installer from SourceForge. This is the Linux installer packaged as a zip archive containing the Java-based installer JAR file.
cd /opt
wget https://sourceforge.net/projects/logicaldoc/files/distribution/LogicalDOC%20CE%209.2/logicaldoc-community-installer-9.2.0.zip/download -O logicaldoc-community-installer-9.2.0.zip
Install the unzip utility if not already present, then extract the installer:
apt install -y unzip
unzip logicaldoc-community-installer-9.2.0.zip
Step 5: Run the LogicalDOC Installer
Run the installer in console mode since we are working on a server without a graphical interface. The installer handles application deployment, database schema creation, and initial configuration.
java -jar logicaldoc-community-installer-9.2.0.jar -console
The installer walks through several configuration screens. Here are the key settings to enter:
- Installation path: Accept the default
/opt/LogicalDOCor set your preferred path - Database type: Select MySQL (this works with MariaDB)
- Database host:
localhost - Database port:
3306 - Database name:
logicaldoc - Database username:
logicaldoc - Database password: The password you set in Step 3
The installer creates the database tables and deploys the application. Wait for it to complete – this may take a few minutes depending on your server speed.
Step 6: Configure LogicalDOC as a Systemd Service
To manage LogicalDOC with systemd and have it start automatically on boot, create a service unit file. Open the file:
vi /etc/systemd/system/logicaldoc.service
Add the following service configuration:
[Unit]
Description=LogicalDOC Document Management System
After=network.target mariadb.service
Requires=mariadb.service
[Service]
Type=forking
User=root
Group=root
Environment="JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64"
ExecStart=/opt/LogicalDOC/bin/logicaldoc-all start
ExecStop=/opt/LogicalDOC/bin/logicaldoc-all stop
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Reload systemd to pick up the new service file, then enable and start LogicalDOC:
systemctl daemon-reload
systemctl enable --now logicaldoc
Check that the service started correctly:
systemctl status logicaldoc
The output should show the service as active:
● logicaldoc.service - LogicalDOC Document Management System
Loaded: loaded (/etc/systemd/system/logicaldoc.service; enabled; preset: enabled)
Active: active (running)
LogicalDOC takes 30-60 seconds to fully start while it initializes the application and connects to the database. You can monitor the startup progress in the logs:
tail -f /opt/LogicalDOC/logs/ld.log
Step 7: Access the LogicalDOC Web Interface
LogicalDOC runs on port 8080 by default. Open your browser and navigate to your server’s IP address or hostname:
http://your-server-ip:8080/logicaldoc/
Log in with the default credentials:
- Username: admin
- Password: admin
Change the default admin password immediately after your first login. Go to Personal > Change Password in the top-right menu.
Step 8: Configure Nginx as a Reverse Proxy for LogicalDOC
Running LogicalDOC behind Nginx gives you clean URLs on port 80/443, SSL termination, and better performance for static assets. For more on Nginx setup, see our guide on installing and configuring Nginx on Ubuntu 24.04.
Install Nginx:
apt install -y nginx
Create a new Nginx virtual host configuration for LogicalDOC:
vi /etc/nginx/sites-available/logicaldoc.conf
Add the following reverse proxy configuration. Replace dms.example.com with your actual domain name:
server {
listen 80;
server_name dms.example.com;
client_max_body_size 100M;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
}
}
Enable the site and remove the default Nginx configuration:
ln -s /etc/nginx/sites-available/logicaldoc.conf /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
Test the Nginx configuration for syntax errors:
nginx -t
If the test passes, you should see this confirmation:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Restart Nginx to apply the changes:
systemctl restart nginx
Step 9: Configure UFW Firewall Rules
Open the required ports in Ubuntu’s UFW firewall to allow web traffic. You need HTTP (80) and HTTPS (443) for the reverse proxy. For a deeper look at firewall management, check out our UFW firewall commands guide.
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow ssh
ufw enable
Verify the firewall rules are active:
ufw status
The output should show all three ports allowed:
Status: active
To Action From
-- ------ ----
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
22/tcp ALLOW Anywhere
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
Step 10: Configure SSL with Let’s Encrypt
Secure your LogicalDOC installation with a free SSL certificate from Let’s Encrypt. Install Certbot and the Nginx plugin:
apt install -y certbot python3-certbot-nginx
Run Certbot to obtain and install the SSL certificate. Replace dms.example.com with your domain and provide a valid email for renewal notices:
certbot --nginx -d dms.example.com --non-interactive --agree-tos -m [email protected]
Certbot automatically modifies your Nginx configuration to handle SSL and sets up HTTP-to-HTTPS redirection. Verify the certificate was issued successfully:
certbot certificates
You should see your domain listed with a valid certificate and expiry date:
Certificate Name: dms.example.com
Domains: dms.example.com
Expiry Date: 2026-06-20 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/dms.example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/dms.example.com/privkey.pem
Certbot installs a systemd timer that automatically renews certificates before they expire. Confirm the renewal timer is active:
systemctl status certbot.timer
The timer should show as active and scheduled for the next renewal check:
● certbot.timer - Run certbot twice daily
Loaded: loaded (/usr/lib/systemd/system/certbot.timer; enabled; preset: enabled)
Active: active (waiting)
You can now access LogicalDOC securely at https://dms.example.com/logicaldoc/.
Conclusion
LogicalDOC Community Edition 9.2 is now running on Ubuntu 24.04 with MariaDB as the database backend, Nginx handling reverse proxy duties, and Let’s Encrypt providing SSL encryption. The setup is ready for document uploads, user management, and full-text search.
For production use, set up regular database backups with MariaDB dump schedules, monitor disk usage on the document repository directory, and consider placing the /opt/LogicalDOC/repository folder on a dedicated partition or volume to prevent document storage from filling up the root filesystem.