Skip to content

Installation

Detailed installation guide for different environments.

System Requirements

Minimum Hardware

Component Minimum Recommended
CPU 2 cores 4+ cores
RAM 6 GB 16 GB
Disk 10 GB SSD 50 GB NVMe
Network 1 Gbps 10 Gbps

Software Dependencies

# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y \
  docker.io docker-compose-plugin git

# RHEL/CentOS/Fedora
sudo dnf install -y docker docker-compose git
sudo systemctl enable --now docker

# macOS
brew install docker docker-compose

# Windows
# Install Docker Desktop with WSL2 backend

Docker Installation

# Install Docker Engine
curl -fsSL https://get.docker.com | sh

# Add user to docker group (logout/login required)
sudo usermod -aG docker $USER

# Verify
docker version
docker compose version

Verify Installation

# Should show Docker version 24+
docker --version

# Should show Compose v2+
docker compose version

Repository Setup

# Clone
git clone https://github.com/elhamrit-stack/AlertOps
cd LogSys

# Verify structure
ls -la
# Should see: backend/, admin/, services/, docker-compose.yml, .env.example, etc.

Environment Configuration

1. Copy Example Config

cp .env.example .env

2. Required Variables

Variable Default Required Description
POSTGRES_PASSWORD — Yes Strong password for PostgreSQL
JWT_SECRET_KEY — Yes 32+ char random string
NVIDIA_API_KEY — No For ML labeling (devtools)

3. Optional Overrides

# Ports (if defaults conflict)
API_PORT=8000
POSTGRES_PORT=5432
REDIS_PORT=6379
COLLECTORS_PORT=8080
ML_SERVICE_PORT=8001
VECTOR_HTTP_PORT=8686
VECTOR_WEBHOOK_PORT=8687

# Security (production)
COOKIE_SECURE=true
COOKIE_SAMESITE=strict
ENV=production

4. Generate Secrets

# JWT secret (32+ chars)
openssl rand -base64 32

# Postgres password
openssl rand -base64 24

Platform-Specific Notes

Linux (Production)

# Increase kernel limits for Kafka/PostgreSQL
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf
echo "fs.file-max=1000000" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Disable swap for better Kafka performance
sudo swapoff -a

Windows (WSL2)

# Run in PowerShell as Administrator
wsl --update
wsl --set-default-version 2

# In WSL2 Ubuntu
# Follow Linux instructions above

macOS (Docker Desktop)

  • Allocate 8 GB+ RAM in Docker Desktop settings
  • Enable VirtioFS for better file sharing performance
  • Use docker compose (not docker-compose v1)

Verify Prerequisites

# Run the verification script
./scripts/verify-install.sh

# Or manually:
docker run --rm hello-world
docker compose config  # Validates docker-compose.yml

Next Step

Proceed to Configuration to customize your deployment.