Data Validation Platform (DVP) Ubuntu Installation Instructions
Step-by-step instructions for deploying DVP on Ubuntu using Docker Compose
Data Validation Platform (DVP)
Ubuntu Installation Guide
Step-by-step instructions for deploying DVP on Ubuntu using Docker Compose
Table of Contents
Overview
The Serpentua Data Validation Platform (DVP) is a web-based file integrity monitoring system. It continuously scans files and directories using SHA-256 checksums, alerts you when files are modified or deleted, and provides reporting and export capabilities.
DVP is delivered as a Docker Compose application consisting of two containers:
| Container | Image | Role |
|---|---|---|
app | Built from Dockerfile (Python 3.13-slim) | Flask web application — serves the UI on port 8443 |
db | mysql:8.0 | MySQL database — stores assets, checksums, and alerts |
/host (read-only), allowing DVP to scan any local path without installing agents on individual machines.Prerequisites
Before you begin, confirm the following:
- ☐Ubuntu 20.04, 22.04, or 24.04 LTS (64-bit) — server or desktop edition
- ☐A user account with
sudoprivileges - ☐Internet access (to pull Docker images and Python packages)
- ☐At least 2 GB of free disk space for images and the MySQL data volume
- ☐Ports 8443 and 3306 not already in use
- ☐The DVP project files (folder
serpentua-dvp-docker/)
System Preparation
Update your package index and upgrade existing packages before installing anything new.
Install a few utilities that are used during the Docker installation process:
Install Docker & Docker Compose
4.1 — Add Docker's GPG key and repository
4.2 — Install Docker Engine and Docker Compose plugin
4.3 — Verify the installation
4.4 — Allow your user to run Docker without sudo
Add your account to the docker group so you do not need to prefix every Docker command with sudo. Log out and back in after running this command for it to take effect.
4.5 — Enable Docker to start on boot
Get the Application Source
Copy the serpentua-dvp-docker project folder to your Ubuntu machine. Choose the method that suits your situation:
Option A — Clone from a Git repository
Option B — Copy an existing folder via SCP
Run the following from your local machine (e.g., Windows with WSL or a separate workstation) to push the folder to the Ubuntu server:
Option C — Upload as a ZIP and extract
After this step you should be inside a directory that contains, at a minimum: Dockerfile, docker-compose.yml, requirements.txt, runserver.py, .env, and the dvp/ folder.
Configure the Environment
All runtime settings are read from the .env file in the project root. Open it with any text editor:
The file contains the following variables:
| Variable | Default | Description |
|---|---|---|
DB_USER | dvp | MySQL application user name |
DB_PASSWORD | see file | Password for the MySQL application user — change this |
DB_NAME | dvp_app | Name of the MySQL database |
DB_HOST | db | Internal Docker service name — do not change |
MYSQL_ROOT_PASSWORD | see file | MySQL root password — change this |
SERVER_HOST | 0.0.0.0 | Flask bind address — leave as-is to listen on all interfaces |
SERVER_PORT | 8443 | Port the application listens on |
DB_PASSWORD and MYSQL_ROOT_PASSWORD. The .env file should never be committed to a public Git repository.Save the file after making your changes (Ctrl+O then Ctrl+X in nano).
Build & Launch the Application
From the project root directory, run:
Docker will:
Pull the MySQL 8.0 image
Downloaded from Docker Hub (~600 MB on first run).
Build the application image
Uses python:3.13-slim as the base, installs gcc + libffi-dev, then installs all Python packages from requirements.txt.
Start the db container
MySQL initialises the database and creates the user defined in .env. A health check polls every 10 seconds.
Start the app container
Waits for the database health check to pass, then launches the Flask server on port 8443.
Watching the logs in real time
Verify the Installation
Check container status
Both containers should show a status of running. The db container should show healthy.
Access the web interface
Open a browser and navigate to:
Or, from another machine on the same network:
File Path Mapping
The Docker Compose file mounts the Ubuntu host's root filesystem into the container at /host (read-only). When you add asset paths inside the DVP UI, you must use the container path, not the host OS path.
| Host Path (Ubuntu) | Container Path to Enter in DVP |
|---|---|
/home/user/data | /host/home/user/data |
/var/log | /host/var/log |
/srv/files | /host/srv/files |
/mnt/nas/backups | /host/mnt/nas/backups |
/opt/myapp/configs | /host/opt/myapp/configs |
/host to any absolute Ubuntu path when entering it inside the DVP application. For example, /var/log becomes /host/var/log.Firewall & Remote Access
If Ubuntu's Uncomplicated Firewall (ufw) is enabled, you need to allow traffic on port 8443 so other machines can reach the DVP web interface.
3306 (MySQL) is exposed on all interfaces by the default docker-compose.yml. In a production environment, consider removing the ports entry from the db service so MySQL is only accessible internally between containers.Auto-Start on Boot
Both containers already have restart: unless-stopped set in docker-compose.yml, which means they will restart automatically after a Docker daemon restart. Because Docker itself is set to start on boot (Section 4.5), the application will come back up after a reboot without any additional configuration.
To confirm the behaviour, simulate it:
Optional — systemd service unit
If you prefer an explicit systemd service that manages the Docker Compose stack, create the following unit file:
Day-to-Day Management
| Task | Command |
|---|---|
| Start all containers | docker compose up -d |
| Stop all containers | docker compose down |
| Restart all containers | docker compose restart |
| View live logs | docker compose logs -f |
| View app logs only | docker compose logs -f app |
| Check container status | docker compose ps |
| Open a shell in the app container | docker compose exec app bash |
| Open a MySQL shell | docker compose exec db mysql -u dvp -p dvp_app |
| Rebuild after code changes | docker compose up -d --build |
| Remove containers (keeps data) | docker compose down |
| Remove containers + volumes (deletes DB) | docker compose down -v |
Updating the application
Database backups
Troubleshooting
Container fails to start — "port already in use"
Another process is already listening on port 8443 or 3306.
Stop the conflicting process, or change the port mapping in docker-compose.yml (e.g., "8080:8443" maps host port 8080 to container port 8443).
App container restarts repeatedly
Common causes:
- Database not yet ready — the app may have started before MySQL finished initialising. Wait 30 seconds and run
docker compose restart app. - Wrong credentials in
.env— ensureDB_USER,DB_PASSWORD, andDB_NAMEmatch what MySQL was initialised with. - Missing
.envfile — make sure the file exists in the same directory asdocker-compose.yml.
Database container health check failing
If you see InnoDB or permission errors, the MySQL data volume may be corrupted or initialised with different credentials. Remove the volume and start fresh:
Cannot access the web UI from another machine
- Confirm the UFW rule:
sudo ufw status— port 8443 should be listed as ALLOW. - Confirm Docker is listening:
sudo ss -tlnp | grep 8443. - Check that your cloud provider / router security group / ACL also allows port 8443.
Permission denied when running docker commands
You may not have logged out and back in after adding yourself to the docker group (Section 4.4). Run newgrp docker in the current terminal, or fully log out and log back in.