OMNI-GRC

Installation Guide

This guide provides detailed instructions for installing and setting up OMNI-GRC on your system.

Table of Contents

Prerequisites

System Requirements

Required Software

Software Minimum Version Purpose
Node.js 18.x or higher Runtime environment
PostgreSQL 14.x or higher Database
Redis 6.x or higher (optional) Background jobs queue
Git 2.x or higher Source code management

Optional Software

Software Purpose
Docker Containerized deployment
Nginx Reverse proxy (production)
PM2 Process management (production)

Installation Methods

Local Installation

Step 1: Install Node.js

On Ubuntu/Debian:

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

On macOS:

brew install node@20

On Windows: Download and install from nodejs.org

Step 2: Install PostgreSQL

On Ubuntu/Debian:

sudo apt-get update
sudo apt-get install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql

On macOS:

brew install postgresql@14
brew services start postgresql@14

On Windows: Download and install from postgresql.org

Step 3: Install Redis (Optional)

On Ubuntu/Debian:

sudo apt-get install -y redis-server
sudo systemctl start redis
sudo systemctl enable redis

On macOS:

brew install redis
brew services start redis

On Windows: Download from redis.io/download

Step 4: Clone the Repository

git clone https://github.com/matx104/OMNI-GRC.git
cd OMNI-GRC

Step 5: Install Dependencies

npm install

This will install all required Node.js packages including:

Step 6: Configure Environment Variables

Create .env.local file in the project root:

cp .env.example .env.local  # If .env.example exists
# or create manually
nano .env.local

Add the following configuration:

# Database (PostgreSQL)
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/omni_grc"

# Authentication (NextAuth.js)
# Generate secret with: openssl rand -base64 32
NEXTAUTH_SECRET="your-generated-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"

# OAuth Providers (optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret

# AI Providers (optional - configure at least one)
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
OLLAMA_BASE_URL=http://localhost:11434

# Background Jobs (optional)
REDIS_URL="redis://localhost:6379"

# Application Settings
NODE_ENV=development
PORT=3000

Step 7: Set Up Database

Create Database:

sudo -u postgres psql
CREATE DATABASE omni_grc;
CREATE USER omni_grc_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE omni_grc TO omni_grc_user;
\q

Generate Prisma Client:

npx prisma generate

Run Migrations:

npx prisma migrate deploy

or for development:

npx prisma migrate dev

Seed the Database:

npx prisma db seed

This will create:

Step 8: Start the Application

Development Mode:

npm run dev

The application will be available at http://localhost:3000

Production Mode:

npm run build
npm run start

Docker Installation

Using Docker Compose

Step 1: Create docker-compose.yml

version: '3.8'

services:
  postgres:
    image: postgres:14
    environment:
      POSTGRES_DB: omni_grc
      POSTGRES_USER: omni_grc_user
      POSTGRES_PASSWORD: changeme
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

  redis:
    image: redis:7
    ports:
      - "6379:6379"

  omni-grc:
    build: .
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://omni_grc_user:changeme@postgres:5432/omni_grc
      REDIS_URL: redis://redis:6379
      NEXTAUTH_SECRET: change-this-to-a-random-string
      NEXTAUTH_URL: http://localhost:3000
    depends_on:
      - postgres
      - redis
    volumes:
      - ./uploads:/app/uploads

volumes:
  postgres_data:

Step 2: Build and Start

docker-compose up -d

Step 3: Run Migrations and Seed

docker-compose exec omni-grc npx prisma migrate deploy
docker-compose exec omni-grc npx prisma db seed

Cloud Deployment

Deployment on Vercel

  1. Push your code to GitHub
  2. Import project in Vercel
  3. Add environment variables in Vercel dashboard
  4. Deploy

Deployment on AWS EC2

# Install dependencies
sudo apt-get update
sudo apt-get install -y nodejs postgresql nginx

# Clone and setup
git clone https://github.com/matx104/OMNI-GRC.git
cd OMNI-GRC
npm install
npm run build

# Configure Nginx reverse proxy
sudo nano /etc/nginx/sites-available/omni-grc

# Start with PM2
npm install -g pm2
pm2 start npm --name omni-grc -- start
pm2 save
pm2 startup

Post-Installation Setup

1. First Login

Navigate to http://localhost:3000

Default Credentials:

⚠️ You will be required to change the password on first login.

2. Organization Configuration

Go to Settings → General:

3. Invite Users

Go to Settings → Users:

4. Configure Integrations

Go to Settings → Integrations:

5. Set Up Scanners

Install security scanning tools you want to use:

# Container scanning
docker pull aquasec/trivy

# Cloud security
pip install prowler
pip install ScoutSuite

# Secret scanning
brew install gitleaks  # macOS
# or
go install github.com/gitleaks/gitleaks/v8@latest

# SAST
pip install semgrep
pip install bandit

Verification

Verify Installation

# Check if application is running
curl http://localhost:3000/api/health

# Expected response:
# {"status":"healthy","database":"connected","timestamp":"..."}

Test CLI

npm run cli -- --version
npm run cli -- dashboard
npm run cli -- scan scanners

Test TUI

npm run tui

Use arrow keys to navigate, q to quit.

Verify Database

npx prisma studio

This opens a web interface to browse the database at http://localhost:5555

Troubleshooting

Common Issues

Issue: “Cannot connect to database”

Solution:

# Check PostgreSQL is running
sudo systemctl status postgresql

# Verify connection
psql -U postgres -h localhost

Issue: “Port 3000 already in use”

Solution:

# Find process using port 3000
lsof -i :3000
# or
netstat -ano | findstr :3000  # Windows

# Kill the process or change port
PORT=3001 npm run dev

Issue: “Prisma Client not generated”

Solution:

rm -rf src/generated/prisma
npx prisma generate

Issue: “NextAuth configuration error”

Solution: Ensure NEXTAUTH_SECRET and NEXTAUTH_URL are set in .env.local:

# Generate a new secret
openssl rand -base64 32

Issue: “Redis connection failed”

Solution: Redis is optional. If not using background jobs, comment out REDIS_URL in .env.local.

Issue: “Build fails with memory error”

Solution:

# Increase Node.js memory limit
NODE_OPTIONS=--max-old-space-size=4096 npm run build

Getting Help

Logs

Application Logs:

# Development
Check terminal output from npm run dev

# Production with PM2
pm2 logs omni-grc

Database Logs:

# PostgreSQL logs (Ubuntu)
sudo tail -f /var/log/postgresql/postgresql-14-main.log

Next.js Logs:

# Check .next folder
ls -la .next/
cat .next/build-manifest.json

Next Steps

After successful installation:

  1. Configuration Guide - Detailed configuration options
  2. CLI Guide - Command-line interface usage
  3. Web UI Guide - Web interface walkthrough
  4. Scanner Integration - Integrate security tools
  5. Compliance Frameworks - Understanding frameworks

Congratulations! 🎉 OMNI-GRC is now installed and ready to use.