Installation¶
There are four ways to install MonsterOps. Production hosts should use the installer; the PyPI install is the quickest way to try it.
Production (recommended)¶
Run the installer as root on a fresh Ubuntu or Debian host:
git clone https://github.com/NLRI65000/MonsterOps.git
cd MonsterOps
sudo bash deploy/install.sh
The installer will:
- Install system packages (
python3,python3-pip,python3-venv,acl,postgresql, FreeRADIUS/VPN tools) - Create a dedicated
monsteropssystem user - Create and initialise the PostgreSQL database
- Set up a virtual environment in
/opt/monsterops/.venv - Install the
monsteropspackage - Generate
/opt/monsterops/.envwith a randomSECRET_KEY - Run the database migrations
- Provision the sudoers allow-list and VPN tooling
- Write and enable a
monsterops.servicesystemd unit
After it finishes, the service is running on port 8000. Override defaults with environment variables:
MONSTEROPS_PORT=9000 INSTALL_DIR=/srv/monsterops sudo bash deploy/install.sh
From PyPI¶
The fastest path — the database migrations ship inside the package, so no source checkout is needed:
pip install monsterops
export MONSTEROPS_DATABASE_URL=postgresql+asyncpg://user:pass@localhost/radius
export MONSTEROPS_SECRET_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
monsterops migrate # create / upgrade the schema
monsterops serve --host 0.0.0.0 --port 8000
From source¶
git clone https://github.com/NLRI65000/MonsterOps.git
cd MonsterOps
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env
# edit .env — set MONSTEROPS_DATABASE_URL and MONSTEROPS_SECRET_KEY
monsterops migrate # or, from a checkout: alembic upgrade head
monsterops serve --host 0.0.0.0 --port 8000
Docker Compose¶
cp .env.example .env
# edit .env as needed
docker compose up -d
The compose file starts PostgreSQL and the MonsterOps app. It does not start FreeRADIUS — point FreeRADIUS at the same database from the host.
Problems you may hit¶
connection refused / database errors on first run
MONSTEROPS_DATABASE_URL must use the async driver: postgresql+asyncpg://…, not
postgresql://…. Confirm PostgreSQL is reachable and the database exists before
monsterops migrate.
The app warns about the secret key
If MONSTEROPS_SECRET_KEY is still the default, the app warns on every start. Set a strong,
random value before exposing it to a network — it signs sessions and encrypts stored
credentials. See Configuration.
monsterops: command not found— activate the virtual environment, or use the full path to the venv'sbin/monsterops.- Migrations "can't find alembic.ini" — on a pip install use
monsterops migrate(the ini is bundled);alembic upgrade headonly works from a source checkout.
Next: First-time Setup.
MonsterOps