InstradaOGM for sqlite db
2.9K
Quick Start Guide for deploying InstradaOGM with SQLite database using Docker
š GitHubā | š View PostgreSQL Guideā
rdeangel/instrada-ogm-sqlitelatest, X.X.X (specific versions)Choose the deployment method that fits your environment:
Simple setup without SSL certificates - ideal for local networks or testing.
Production-ready setup with automatic SSL certificates via Let's Encrypt.
mkdir instrada-ogm && cd instrada-ogm
curl -o docker-compose.yml https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/docker-compose.yml
Create a .env file with the following configuration:
# =============================================================================
# InstradaOGM - SQLite HTTP Deployment Configuration
# =============================================================================
# --- Application Version ---
NEXT_PUBLIC_APP_VERSION=latest
# --- OPNsense Configuration (REQUIRED) ---
OPNSENSE_URL=https://your-opnsense-firewall.local
OPNSENSE_API_KEY=your_api_key_here
OPNSENSE_API_SECRET=your_api_secret_here
# For self-signed certificates (development only)
SKIP_SSL_VERIFICATION=true
# --- HTTP Configuration ---
ALLOW_HTTP=true
NEXTAUTH_URL=http://localhost:3000
PORT=3000
# --- Database Configuration (SQLite) ---
SQLITE_DB_NAME=instrada-ogm.db
DATABASE_URL=file:/app/data/db/instrada-ogm.db
# --- Security Configuration (REQUIRED) ---
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET=CHANGE_THIS_TO_A_SECURE_RANDOM_STRING
# Generate with: openssl rand -hex 32
BACKUP_ENCRYPTION_SECRET_KEY=CHANGE_THIS_TO_A_64_CHARACTER_HEX_STRING
# --- Authentication ---
AUTH_ALLOW_LOCAL_LOGIN=true
AUTH_ALLOW_LOCAL_2FA=true
AUTH_PASSWORD_MIN_LENGTH=8
# --- Logging ---
APP_DEBUG_LEVEL=ERROR
NODE_ENV=production
mkdir -p data/db data/backups
Option A: Using the automated setup script (recommended)
# Download the permission setup script
curl -o setup-data-permissions.sh https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/setup-data-permissions.sh
chmod +x setup-data-permissions.sh
# Run the script to set correct permissions
sudo ./setup-data-permissions.sh ./data
Option B: Manual permission setup
# Set correct ownership for the application user (UID 65532)
sudo chown -R 65532:65532 data/
docker compose --profile sqlite up -d
Open your browser and navigate to:
http://192.168.1.100:3000 (replace with your server's IP address)Default Login Credentials:
adminadminā ļø Important: You will be required to change the admin password on first login for security.
http://192.168.1.100:3000 (replace with your server's IP)mkdir instrada-ogm && cd instrada-ogm
# Download Traefik compose file
curl -o docker-compose-traefik.yml https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/docker-compose-traefik.yml
# Download Traefik configuration scripts
mkdir -p traefik
cd traefik
curl -o generate-config.sh https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/traefik/generate-config.sh
curl -o validate.sh https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/traefik/validate.sh
chmod +x generate-config.sh validate.sh
cd ..
Create a .env file in the root directory:
# =============================================================================
# InstradaOGM - SQLite HTTPS Deployment Configuration
# =============================================================================
# --- Domain Configuration (REQUIRED for Traefik) ---
DOMAIN=your-instrada-ogm.com
# --- Application Version ---
NEXT_PUBLIC_APP_VERSION=latest
# --- OPNsense Configuration (REQUIRED) ---
OPNSENSE_URL=https://your-opnsense-firewall.local
OPNSENSE_API_KEY=your_api_key_here
OPNSENSE_API_SECRET=your_api_secret_here
# For self-signed certificates
SKIP_SSL_VERIFICATION=true
# --- HTTPS Configuration ---
ALLOW_HTTP=false
NEXTAUTH_URL=https://your-instrada-ogm.com
PORT=3000
# --- Database Configuration (SQLite) ---
SQLITE_DB_NAME=instrada-ogm.db
DATABASE_URL=file:/app/data/db/instrada-ogm.db
# --- Security Configuration (REQUIRED) ---
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET=CHANGE_THIS_TO_A_SECURE_RANDOM_STRING
# Generate with: openssl rand -hex 32
BACKUP_ENCRYPTION_SECRET_KEY=CHANGE_THIS_TO_A_64_CHARACTER_HEX_STRING
# --- Authentication ---
AUTH_ALLOW_LOCAL_LOGIN=true
AUTH_ALLOW_LOCAL_2FA=true
AUTH_PASSWORD_MIN_LENGTH=8
# --- Logging ---
APP_DEBUG_LEVEL=ERROR
NODE_ENV=production
cd traefik
./generate-config.sh
Edit traefik/runtime/.env.traefik:
# Must match DOMAIN in main .env file
DOMAIN=your-instrada-ogm.com
# DNS Provider (cloudflare, route53, digitalocean, etc.)
DNS_PROVIDER=cloudflare
# DNS Provider Credentials (example for Cloudflare)
CLOUDFLARE_DNS_API_TOKEN=your_cloudflare_api_token_here
# Let's Encrypt Configuration
[email protected]
# Use staging for testing, production for live certificates
ACME_SERVER=staging
Run the configuration generator again to apply settings:
./generate-config.sh
./validate.sh
cd ..
mkdir -p data/db data/backups
Option A: Using the automated setup script (recommended)
# Download the permission setup script
curl -o setup-data-permissions.sh https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/setup-data-permissions.sh
chmod +x setup-data-permissions.sh
# Run the script to set correct permissions
sudo ./setup-data-permissions.sh ./data
Option B: Manual permission setup
# Set correct ownership for the application user (UID 65532)
sudo chown -R 65532:65532 data/
docker compose -f docker-compose-traefik.yml --profile sqlite up -d
# Watch the logs until database is ready
docker compose -f docker-compose-traefik.yml --profile sqlite logs -f db
https://your-instrada-ogm.comDefault Login Credentials:
adminadminā ļø Important: You will be required to change the admin password on first login for security.
https://your-instrada-ogm.comOnce you verify everything works with staging certificates:
Edit traefik/runtime/.env.traefik and change:
ACME_SERVER=production
Regenerate configuration and restart:
cd traefik && ./generate-config.sh && cd ..
docker compose -f docker-compose-traefik.yml --profile sqlite down
rm traefik/runtime/acme.json
docker compose -f docker-compose-traefik.yml --profile sqlite up -d
# HTTP deployment
docker compose --profile sqlite logs -f
# HTTPS deployment
docker compose -f docker-compose-traefik.yml --profile sqlite logs -f
# HTTP deployment
docker compose --profile sqlite down
# HTTPS deployment
docker compose -f docker-compose-traefik.yml --profile sqlite down
# HTTP deployment
docker compose --profile sqlite pull
docker compose --profile sqlite up -d
# HTTPS deployment
docker compose -f docker-compose-traefik.yml --profile sqlite pull
docker compose -f docker-compose-traefik.yml --profile sqlite up -d
# Copy SQLite database file
cp data/db/instrada-ogm.db data/backups/instrada-ogm-$(date +%Y%m%d).db
instrada-ogm/
āāā docker-compose.yml # HTTP deployment
āāā docker-compose-traefik.yml # HTTPS deployment
āāā .env # Main configuration
āāā data/
ā āāā db/
ā ā āāā instrada-ogm.db # SQLite database
ā āāā backups/ # Application backups
āāā traefik/ # Traefik configuration (HTTPS only)
āāā generate-config.sh
āāā validate.sh
āāā runtime/
āāā .env.traefik
āāā traefik.yml
āāā config.yml
āāā acme.json # SSL certificates
| Variable | Description | Example |
|---|---|---|
OPNSENSE_URL | OPNsense firewall URL | https://firewall.local |
OPNSENSE_API_KEY | OPNsense API key | Generated in OPNsense UI |
OPNSENSE_API_SECRET | OPNsense API secret | Generated in OPNsense UI |
NEXTAUTH_SECRET | JWT signing secret | openssl rand -base64 32 |
BACKUP_ENCRYPTION_SECRET_KEY | Backup encryption key | openssl rand -hex 32 |
| Variable | Default | Description |
|---|---|---|
ALLOW_HTTP | false | Allow HTTP connections |
SQLITE_DB_NAME | instrada-ogm.db | SQLite database filename |
APP_DEBUG_LEVEL | SILENT | Logging level (SILENT/ERROR/WARN/INFO/DEBUG) |
SKIP_SSL_VERIFICATION | false | Skip OPNsense SSL verification (dev only) |
# Check logs
docker compose --profile sqlite logs instrada-ogm
# Verify .env file is present
ls -la .env
# Check environment variables are loaded
docker compose --profile sqlite config
# Verify container is running
docker compose --profile sqlite ps
# Check port binding
netstat -tuln | grep 3000
# Test local connection (or use your server IP)
curl http://localhost:3000
# Option A: Use the automated setup script (recommended)
curl -o setup-data-permissions.sh https://raw.githubusercontent.com/rdeangel/InstradaOGM/main/setup-data-permissions.sh
chmod +x setup-data-permissions.sh
sudo ./setup-data-permissions.sh ./data
# Option B: Manual fix
sudo chown -R 65532:65532 data/
# Check Traefik logs
docker compose -f docker-compose-traefik.yml --profile sqlite logs traefik
# Verify DNS is resolving
nslookup your-instrada-ogm.com
# Check acme.json permissions
ls -la traefik/runtime/acme.json
# Should be: -rw------- (600)
Category: Deployment | Database: SQLite | Status: Production Ready
admin, Password admin (must be changed on first login)data/db/instrada-ogm.dbContent type
Image
Digest
sha256:e87788855ā¦
Size
189.6 MB
Last updated
2 months ago
docker pull rdeangel/instrada-ogm-sqlite