Sign inSign up

radegastedr/console

By radegastedr

Updated 2 days ago

Open-source & Privacy-Respecting Endpoint Detection & Response Platform

Image
Security
Monitoring & observability
0

6.9K

radegastedr/console repository overview

Radegast EDR — Backend

Radegast EDR is a lightweight, privacy-focused Endpoint Detection and Response platform perfect for smaller teams, home labbers, and families. With complete end-to-end encryption (E2EE) using age encryption, your log data remains private and secure — even from the server itself. No custom infrastructure is required: the built-in SQLite database and self-contained deployment make it easy to get started without complex setup. You don't need to host any custom infrastructure if you don't want to.

Quickstarts

Built with FastAPI and SQLAlchemy, the backend handles device authorization, user configuration packs, encrypted log storage, alert status tracking, and key/session management.

Features

  • Device Management: Create and enroll EDR agent devices, assign them to groups, and generate secure authorization tokens
  • Configuration Packs: Store and distribute YAML/binary endpoint detection policies and versions
  • End-to-End Encrypted Log Storage: All logs are encrypted on the device using age before transmission; the server stores only encrypted data it cannot read
  • Team Collaboration: Create teams, manage device group permissions, and receive email notifications for critical events
  • Zero-Trust Architecture: All data is encrypted client-side; the server never has access to your private keys or decrypted log contents
  • Self-Contained Deployment: Built-in SQLite database means no external database server required
  • Agent Distribution: Serve the Rustinel eBPF sensor and provide single-command installation for Linux and Windows

Deployment (Podman / Docker)

The recommended way to run Radegast EDR in production is via the published container image.

Quick start
# Pull and start with podman-compose (reads podman-compose.yaml)
podman-compose up -d

# Or with plain podman / docker
podman run -d \
  --name radegast-edr \
  -p 8000:8000 \
  -e RADEGAST_SECRET_KEY=<your-secret> \
  -e RADEGAST_BASE_URL=https://your.domain \
  -e RADEGAST_CORS_ORIGINS=https://your.domain \
  -v radegast_db:/app/data/db \
  -v radegast_uploads:/app/data/uploads \
  -v radegast_releases:/app/data/releases \
  docker.io/radegastedr/console:latest
Using podman-compose

Clone the repository and start all services with persistent named volumes:

git clone https://github.com/radegast-edr/radegast-backend.git
cd radegast-backend

# Edit the environment section in podman-compose.yaml first, then:
podman-compose up -d

Three named volumes are created automatically:

VolumeMountPurpose
radegast_database/app/data/dbSQLite database
radegast_uploads/app/data/uploadsUploaded configuration packs
radegast_releases/app/data/releasesRustinel agent release binaries

The API is available at http://localhost:8000 and the interactive docs at http://localhost:8000/docs.

Using MySQL as Database

By default, the application runs on SQLite. If you want to use MySQL or MariaDB:

  1. Ensure your MySQL database is created.
  2. Run the Docker container with RADEGAST_DATABASE_URL pointed to your database using the mysql+aiomysql:// driver (the Docker image comes pre-installed with mysql extra/support):
    docker run -d \
      --name radegast-edr \
      -p 8000:8000 \
      -e RADEGAST_SECRET_KEY=<your-secret> \
      -e RADEGAST_DATABASE_URL="mysql+aiomysql://user:password@mysql-host:3306/db_name" \
      -e RADEGAST_BASE_URL=https://your.domain \
      -e RADEGAST_CORS_ORIGINS=https://your.domain \
      -v radegast_uploads:/app/data/uploads \
      -v radegast_releases:/app/data/releases \
      docker.io/radegastedr/console:latest
    

Local Development

Prerequisites
  • Python 3.11+
  • uv (recommended) or standard pip
Installation
  1. Install project dependencies:

    uv sync
    # Or to install with MySQL support:
    # uv sync --group mysql
    
    # Or using standard pip with a virtual environment:
    # python -m venv .venv && source .venv/bin/activate && pip install .
    # Or with MySQL support:
    # pip install .[mysql]
    
  2. Install dev tools (test runner etc.):

    uv sync --dev
    # Or:
    # pip install .[dev]
    
Running the Backend

Start the development server with hot-reload:

uv run uvicorn app.main:app --reload --port 8000

The server runs on http://localhost:8000. Interactive Swagger docs are available at http://localhost:8000/docs.

Running with the CLI

You can run the application directly via the CLI interface. In development, use:

uv run radegast-console run --host=127.0.0.1 --port=8000 --workers=4

Alternatively, you can install the tool globally using uv:

uv tool install radegast-edr-console

Once installed, start the console using:

radegast-console run --host=127.0.0.1 --port=8000 --workers=4

You can pass any configuration variable (e.g., --database-url, --enable-email-worker) to override defaults. Run radegast-console run --help to see a full list of options.

Running Tests
uv run pytest

Configuration

All settings are controlled via environment variables prefixed with RADEGAST_ (defined in app/config.py):

Environment VariableRequiredDefaultDescription
RADEGAST_ENVIRONMENTNprodThe deployment environment. Valid values: dev, prod. If dev, skips default secret key warning.
RADEGAST_SECRET_KEYYchange-me-in-productionSecret key used for session signing — must be changed in production
RADEGAST_DATABASE_URLNsqlite+aiosqlite:///./radegast.dbAsync SQLAlchemy database URL
RADEGAST_CORS_ORIGINSNhttp://localhost:5173,...Comma-separated list of allowed CORS origins
RADEGAST_BASE_URLNhttp://localhost:8000Public base URL of the API server (used in emails and install scripts)
RADEGAST_UPLOAD_DIRNuploads/packsDirectory where uploaded configuration packs are stored
RADEGAST_RELEASES_DIRNagent/releasesDirectory containing Rustinel agent release binaries
RADEGAST_SMTP_HOSTN(none)Outgoing SMTP mail server. If not set, emails are logged to stdout instead of being sent (useful for development).
RADEGAST_SMTP_PORTN587Outgoing SMTP server port
RADEGAST_SMTP_USERN(empty)SMTP authentication username
RADEGAST_SMTP_PASSWORDN(empty)SMTP authentication password
RADEGAST_SMTP_FROMN[email protected]Sender address for outgoing emails
RADEGAST_SMTP_STARTTLSNtrueEnable or disable SMTP STARTTLS extension
RADEGAST_SESSION_COOKIE_NAMENradegast_sessionName of the session cookie
RADEGAST_SESSION_MAX_AGEN604800Session lifetime in seconds (default: 7 days)
RADEGAST_WEB_UI_URLN(empty)Optional URL of the web UI in case it is hosted elsewhere (used for WebAuthn origins and email links).
RADEGAST_TURNSTILE_SITE_KEYN(empty)Cloudflare Turnstile Site Key for optional registration-protection
RADEGAST_TURNSTILE_SECRET_KEYN(empty)Cloudflare Turnstile Secret Key for verifying Turnstile responses
RADEGAST_EMAIL_DEBOUNCE_SECONDSN180Email debounce limit in seconds before sending queued emails
RADEGAST_EMAIL_BULK_INTERVALSN3,3,6,16,37,62,122,193Comma-separated list of bulk debounce intervals in minutes
RADEGAST_EMAIL_BULK_RESET_HOURSN24Time window in hours after which the email bulk sequence resets if no events occur
RADEGAST_ENABLE_EMAIL_WORKERNtrueBoolean flag to enable background email sending worker loop
RADEGAST_WORKER_LOCK_PATHN/tmp/radegast-console.lockPath to the shared file lock used by single-thread workers
RADEGAST_MFA_REQUIRED_LEVEL_ADMINNhardware_tokenRequired MFA level for Admin accounts (none, otp, hardware_token)
RADEGAST_MFA_REQUIRED_LEVEL_MAINTAINERNnoneRequired MFA level for Maintainer accounts (none, otp, hardware_token)
RADEGAST_MFA_REQUIRED_LEVEL_USERNnoneRequired MFA level for User accounts (none, otp, hardware_token)
RADEGAST_WEBAUTHN_RP_IDN(empty)Optional WebAuthn RP ID override. Set this to a shared parent domain (for example radegast.app) when API and Web UI run on different subdomains.
RADEGAST_WEBAUTHN_ORIGINSN(empty)Optional comma-separated extra WebAuthn origins allowed during verification (for example https://console.radegast.app).
RADEGAST_PACK_MAX_SIZE_MBN(none)General maximum pack zip size in MB. Applies to all roles unless a role-specific override is set. If unset, no size limit is enforced.
RADEGAST_PACK_MAX_SIZE_MB_USERN(none)Maximum pack zip size in MB for regular users. Falls back to RADEGAST_PACK_MAX_SIZE_MB if unset.
RADEGAST_PACK_MAX_SIZE_MB_MAINTAINERN(none)Maximum pack zip size in MB for maintainer accounts. Falls back to RADEGAST_PACK_MAX_SIZE_MB if unset.
RADEGAST_PACK_MAX_SIZE_MB_ADMINN(none)Maximum pack zip size in MB for admin accounts. Falls back to RADEGAST_PACK_MAX_SIZE_MB if unset.
RADEGAST_AGENT_PACKAGENradegast-edr-agentTarget package/source from which the agent should be installed via uv (e.g., package name or directory/git path)
RADEGAST_ACCOUNT_DELETION_GRACE_DAYSN14Number of days after confirmation before an account is permanently deleted. Logging in during this period cancels the deletion.

Tag summary

Content type

Image

Digest

sha256:3d63b1afc

Size

96.8 MB

Last updated

2 days ago

docker pull radegastedr/console