Skip to content

Installation Bare Metal

chodeus edited this page Jun 17, 2026 · 3 revisions

🏠 HomeInstallation › Bare metal

Installation — Bare metal

Run CHUB directly from source. Pick this only to modify CHUB's code or when Docker isn't available — most users should use Docker.

Prerequisites

  • Python 3.9+
  • Node.js 24.16+ (enforced by frontend/package.json engines)
  • Git
  • A writable directory for config, database, and logs

Install

git clone https://github.com/chodeus/chub.git
cd chub

# Backend
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Frontend (compiled into static files the backend serves)
cd frontend
npm install
npm run build
cd ..

# Point CHUB at a config directory and run it
export CONFIG_DIR="$(pwd)/config"
python3 main.py

Open http://localhost:8000 and follow First Run.

Hot-reload development

Run the Vite dev server in a second terminal:

cd frontend && npm run dev
# open http://localhost:5174 — /api calls proxy to :8000

The backend serves at :8000; Vite proxies /api/* to it, so both run side by side.

Run as a systemd service

Create /etc/systemd/system/chub.service:

[Unit]
Description=CHUB — Chodeus' Media Script Hub
After=network.target

[Service]
Type=simple
User=chub
Group=chub
WorkingDirectory=/opt/chub
Environment=CONFIG_DIR=/opt/chub/config
ExecStart=/opt/chub/.venv/bin/python3 /opt/chub/main.py
Restart=on-failure

[Install]
WantedBy=multi-user.target

Then:

sudo systemctl daemon-reload
sudo systemctl enable --now chub
sudo systemctl status chub

Next: First Run · Related: Installation

Clone this wiki locally