Quick Start Guide

Get BlueSentinel up and running in 30 minutes with this step-by-step guide.


Prerequisites

  • A Linux/macOS server with Python 3.9+ and PostgreSQL 14+
  • Target endpoints running Windows 10/11 or macOS 12+
  • Network connectivity between server and endpoints (port 5100)

Step 1: Set Up the Database

bash
# Install PostgreSQL (Ubuntu/Debian)
sudo apt install postgresql postgresql-contrib

# Create database and user
sudo -u postgres psql -c "CREATE USER bluesentinel WITH PASSWORD 'your_secure_password';"
sudo -u postgres psql -c "CREATE DATABASE bluesentinel OWNER bluesentinel;"

# Run the schema migration
psql -U bluesentinel -d bluesentinel -f central_server/migrations/init_schema.sql

Step 2: Configure the Central Server

bash
# Clone the repository
git clone https://github.com/your-org/BlueSentinel.git
cd BlueSentinel

# Install Python dependencies
pip install -r requirements.txt

# Set environment variables
export DATABASE_URL="postgresql://bluesentinel:your_secure_password@localhost/bluesentinel"
export SECRET_KEY="your-random-secret-key-here"
export JWT_SECRET="your-jwt-secret-here"
export PORT=5100

Step 3: Start the Central Server

bash
# Development mode
python central_server/app.py

# Production mode (with Gunicorn)
gunicorn -w 4 -b 0.0.0.0:5100 "central_server.app:create_app()"

On first startup, the server automatically creates:

  • A default tenant ("BlueSentinel Default")
  • A default security policy with all guards enabled
  • A super admin account: admin@bluesentinel.com / admin123

Important: Change the default admin password immediately after first login!

Step 4: Login to the Dashboard

Open http://your-server:5100 in your browser.

Login with the default credentials:

  • Email: admin@bluesentinel.com
  • Password: admin123

Step 5: Generate an Enrollment Token

  1. Navigate to Enrollment in the dashboard
  2. Click Generate Token
  3. Set an expiry date and optional max-use limit (0 = unlimited)
  4. Copy the generated token

Step 6: Install the Agent (macOS)

bash
# Copy the installer to the target Mac
scp installer/install_macos.sh user@target-mac:/tmp/

# SSH into the target and run
ssh user@target-mac
sudo bash /tmp/install_macos.sh

The installer will prompt for:

  • Server URL: https://your-server:5100
  • Enrollment Token: The token from Step 5

Step 7: Install the Agent (Windows)

powershell
# Run as Administrator
.\installer\install_windows.ps1

Step 8: Verify Enrollment

Back in the dashboard, navigate to Devices. Your newly enrolled device should appear with:

  • Status: Active
  • All 10 guards showing as enabled
  • Last heartbeat timestamp updating every 60 seconds

What Happens Next?

  • The agent sends a heartbeat every 60 seconds reporting its status
  • Policy changes are pushed automatically on the next heartbeat
  • Alerts are sent in real-time (or queued offline and synced later)
  • Remote commands can be sent from the dashboard at any time

Troubleshooting

If the device doesn't appear:

  1. Check that port 5100 is accessible from the endpoint
  2. Verify the enrollment token hasn't expired
  3. Check the agent logs at /Library/Application Support/BlueSentinel/logs/ (macOS) or C:\ProgramData\BlueSentinel\logs\ (Windows)