-
Notifications
You must be signed in to change notification settings - Fork 3
Installation and Setup
This guide covers the full setup of Hybrid R-Sentry on Kali Linux.
- Kali Linux (tested on latest)
- Python 3.13
- Docker & Docker Compose
- Git
git clone https://github.com/Mohhudib/hybrid-rsentry.git
cd hybrid-rsentrybash setup.shsetup.sh handles everything automatically:
- Installs system packages (
python3-venv,libpq-dev,iptables,nodejs,npm, etc.) - Creates the Python virtual environment at
./venv - Installs all Python dependencies from
requirements.txt - Installs all Node/React dependencies in
frontend/ - Copies
.env.exampleto.envif it doesn't already exist
nano .envYou must fill in:
-
POSTGRES_PASSWORD— choose a strong password -
DATABASE_URL— update the password to match -
NVIDIA_API_KEY— your AI provider API key -
NVIDIA_API_KEY_ALERTS— second AI API key (can be the same if you only have one) -
WATCH_PATH— a directory outside the project folder (e.g./home/your-username/Documents)
See the Configuration page for the full variable reference.
bash start.shstart.sh starts all five processes in the correct order and logs to /tmp/rsentry-*.log. Press Ctrl+C to stop all services cleanly.
http://localhost:3000
Once the venv and node_modules are installed, just run:
bash start.shUse this when you need to see each process's output in its own terminal.
Terminal 1 — Infrastructure
cd ~/hybrid-rsentry && docker compose up -dTerminal 2 — Backend
cd ~/hybrid-rsentry
set -a && source .env && set +a
source venv/bin/activate
uvicorn backend.main:app --reloadTerminal 3 — Celery Workers
cd ~/hybrid-rsentry
set -a && source .env && set +a
source venv/bin/activate
PYTHONPATH=. celery -A backend.workers.tasks:celery_app worker --loglevel=infoTerminal 4 — Agent
cd ~/hybrid-rsentry
set -a && source .env && set +a
sudo -E venv/bin/python -m agent.monitor
sudo -Eis mandatory — it preservesWATCH_PATHand the AI keys through the privilege boundary. Without-E, sudo strips env vars and the agent watches the wrong path.
Terminal 5 — Frontend
cd ~/hybrid-rsentry/frontend && npm start- Dashboard shows the LIVE connection indicator
- Agent log shows canary files being placed:
tail -f /tmp/rsentry-agent.log - Backend log shows heartbeat events arriving:
tail -f /tmp/rsentry-backend.log - Celery log shows tasks being received:
tail -f /tmp/rsentry-celery.log
Run the one-command pipeline test to verify the full detection flow:
bash test_event.shThis sends a CANARY_TOUCHED event and verifies a CRITICAL alert + AI analysis is produced end-to-end.
If started with start.sh: press Ctrl+C — all processes stop cleanly.
If started manually:
-
Ctrl+Cin each terminal (frontend, agent, Celery, backend) -
docker compose downto stop PostgreSQL and Redis
Never run
docker compose down -v— the-vflag deletes the Postgres data volume and all stored events and alerts.