Infrastructure Setup Roadmap
A detailed walkthrough for deploying OpenVolMgr manually on Debian/Ubuntu systems.
OS & User Environment
Update the system and create a dedicated service user. Do not run the application as root.
sudo apt install -y \
python3-venv \
python3-dev \
git \
redis-server \
libmysqlclient-dev \
build-essential \
libcairo2-dev \
pkg-config
# Setup Dedicated Service User
sudo adduser --system --group openvolmgr
git clone -b Master [YOUR_GIT_REPO_URL] /opt/openvolmgr
sudo mkdir -p /opt/openvolmgr/media/profile_pics /var/log/celery/
sudo chown -R openvolmgr:openvolmgr /opt/openvolmgr /var/log/celery/
Application & Virtual Env
Clone the repository and install all required Python modules into a virtual environment.
sudo -u openvolmgr python3 -m venv venv
source venv/bin/activate
# Install all required packages
pip install \
django-mysql \
django-celery-beat \
celery \
redis \
mysqlclient \
django-select2 \
django-mathfilters \
chardet \
beautifulsoup4 \
lxml \
openpyxl \
python-dotenv \
dj-database-url \
whitenoise \
mozilla-django-oidc \
cryptography \
django-widget-tweaks \
pytz \
xhtml2pdf
#deactivate the virtual environment
deactivate
Environment Configuration (.env)
Create the configuration file at /opt/openvolmgr/openvolmgr/.env.
The SECRET_KEY and FERNET_KEY must be generated before you start.
the SITE_URL needs to be domain only do not include the scheme (http/https).
Action Required: Generate Security Keys
./venv/bin/python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
./venv/bin/python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
Systemd Service Units
To ensure the application persists after reboots and handles background tasks, create the following files in /etc/systemd/system/.
Replace $USER and $GROUP with openvolmgr.
Migrations & Startup
sudo -u openvolmgr ./venv/bin/python manage.py makemigrations core
sudo -u openvolmgr ./venv/bin/python manage.py makemigrations
sudo -u openvolmgr ./venv/bin/python manage.py migrate core
sudo -u openvolmgr ./venv/bin/python manage.py migrate
sudo -u openvolmgr ./venv/bin/python manage.py collectstatic --no-input
sudo -u openvolmgr ./venv/bin/python manage.py createsuperuser
# Style Consistency Fix
cp -r /opt/openvolmgr/staticfiles/admin/ /opt/openvolmgr/core/static
# Enable and Start Everything
sudo systemctl daemon-reload
sudo systemctl enable --now openvolmgr celery-worker celery-beat redis-server