JournivJourniv
Configurations

Configuration

Configure your Journiv instance for optimal performance and security.

Journiv can be configured using environment variables. All configurations are optional except SECRET_KEY and DOMAIN_NAME, which are required for Journiv to run.

Quick Configuration

Minimal required configuration:

SECRET_KEY=your-secret-key-here
DOMAIN_NAME=your-server-ip-or-domain

Generate a secure SECRET_KEY:

openssl rand -base64 32

Common Configurations

Development

SECRET_KEY=dev-secret-key-change-in-production
DOMAIN_NAME=localhost
LOG_LEVEL=DEBUG
DEBUG=true
ENVIRONMENT=development

Production

SECRET_KEY=strong-production-secret-key-min-32-chars
DOMAIN_NAME=journiv.example.com
LOG_LEVEL=INFO
DEBUG=false
ENVIRONMENT=production
DISABLE_SIGNUP=false
MAX_FILE_SIZE_MB=50

Production with PostgreSQL

SECRET_KEY=strong-production-secret-key
DOMAIN_NAME=journiv.example.com
DATABASE_URL=postgresql://user:password@localhost:5432/journiv
LOG_LEVEL=INFO
ENVIRONMENT=production
DEBUG=false

Configuration Methods

Docker

Set environment variables in docker run:

docker run -d \
  -e SECRET_KEY=your-secret-key \
  -e DOMAIN_NAME=192.168.1.1 \
  ...

Docker Compose

Use environment section or .env file:

services:
  journiv:
    environment:
      - SECRET_KEY=${SECRET_KEY}
      - DOMAIN_NAME=${DOMAIN_NAME}
    env_file:
      - .env

Manual Installation

Create a .env file in the journiv-backend directory:

SECRET_KEY=your-secret-key
DOMAIN_NAME=localhost

Configuration Categories

Required Settings

  • SECRET_KEY - Secret key for JWT token signing
  • DOMAIN_NAME - Server IP or domain name

Database Configuration

  • DATABASE_URL - Database connection string
  • PostgreSQL-specific variables (if not using DATABASE_URL)

Application Settings

  • ENVIRONMENT - Environment mode (development/production)
  • DEBUG - Enable debug mode
  • LOG_LEVEL - Logging verbosity

Security Settings

  • DISABLE_SIGNUP - Disable user registration
  • ACCESS_TOKEN_EXPIRE_MINUTES - Access token expiry
  • REFRESH_TOKEN_EXPIRE_DAYS - Refresh token expiry

Storage Configuration

  • MEDIA_ROOT - Media storage directory
  • LOG_DIR - Log directory
  • MAX_FILE_SIZE_MB - Maximum file upload size

OIDC/SSO Configuration

  • OIDC_ENABLED - Enable OIDC authentication
  • OIDC_ISSUER - OIDC provider issuer URL
  • OIDC_CLIENT_ID - OIDC client ID
  • OIDC_CLIENT_SECRET - OIDC client secret
  • OIDC_REDIRECT_URI - OIDC redirect URI

See Environment Variables for complete reference.

Next Steps

After configuration:

  1. Set Up HTTPS - Configure reverse proxy for secure access
  2. Configure Database - Set up PostgreSQL for production
  3. Security Hardening - Review security best practices
  4. Backup Strategy - Set up regular backups
  5. Monitoring - Configure logging and monitoring

Getting Help

Need help with configuration?