Installation from Code
The most common way to use the application without Docker is directly from the Git repository.
Updates are then as simple as git pull.
Overview
graph LR
A[Download Repo] --> B[Create Python Environment] --> C[Install Requirements] --> D[Configure Defaults] --> E[Setup Apache]
Automated Installation with Ansible
If you prefer a fully automated setup, there is a community-maintained Ansible playbook for Debian 12 available: ansible-things/cmdb-syncer
It covers system packages, MongoDB, Apache, uWSGI, virtual environment, and corporate proxy support in one run. The manual steps below remain relevant for understanding the setup or for other distributions.
Download the Repository
Check out the code from GitHub into /opt — this path is used in all examples throughout this documentation.
cd /opt
git clone https://github.com/kuhn-ruess/cmdbsyncer
cd cmdbsyncer
Create the Python Virtual Environment
Note
Skip this section if you are using Docker.
The Syncer requires Python 3.14 or newer. The interpreter on your system may be named python3.14 or just python3 — check with python3 --version.
cd /opt/cmdbsyncer
python3.14 -m venv ENV
source ENV/bin/activate
Warning
The virtual environment must be activated every time you interact with the Syncer manually or via cron jobs:
source /opt/cmdbsyncer/ENV/bin/activate
Install Python Requirements
Install the base requirements:
pip install -r requirements.txt
If you plan to use Ansible:
pip install -r requirements-ansible.txt
For additional database backends (see requirements-extras.txt):
pip install -r requirements-extras.txt
Install MongoDB
Note
Skip this section if you are using Docker.
Install MongoDB with your package manager. See the MongoDB section in the Apache setup guide for distribution-specific instructions.
Once installed, start and enable the service:
systemctl enable --now mongod
Configure Defaults
Note
Make sure the virtual environment is activated, or run this inside the Docker container.
Once MongoDB is running, initialize the application defaults:
./cmdbsyncer sys self_configure
Run this command again after every update.
Start the Development Server
To quickly verify the installation, you can start the built-in development server:
flask run --host 0.0.0.0 --port 8080
Warning
The development server is not suitable for production use. Set up Apache with mod_wsgi for production deployments: Installation with Apache
Next Steps
- Set up Apache for production: Installation with Apache
- Get started with the application: First Steps