Configuration
Overview
This guide covers the basic configuration of the MariaDB AI RAG system. For production deployments and advanced configuration scenarios, please refer to the Deployment Documentation.
See Also:
Ubuntu Deployment Guide - Production configuration for Ubuntu/Debian
Docker Deployment Guide - Container-based deployment configuration
Deployment Checklist - Configuration validation checklist
Technical Architecture - System architecture and configuration details
Configuration File
MariaDB AI RAG uses a .env configuration file located in the installation directory. A template is provided at config.env.template. Copy this file to .env and modify the parameters according to your environment.
# Database Configuration (Required)
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_mysql_username
DB_PASSWORD=your_mysql_password
DB_NAME=rag_db
# Authentication (Required)
SECRET_KEY=your_secret_key_here_generate_a_secure_random_string
# Embedding Configuration (Required)
EMBEDDING_PROVIDER=openai
EMBEDDING_MODEL=text-embedding-3-small
# API Keys (Set based on your embedding/LLM provider)
OPENAI_API_KEY=your_openai_api_key
GEMINI_API_KEY=your_gemini_api_key
VOYAGE_API_KEY=your_voyage_api_key
COHERE_API_KEY=your_cohere_api_keyDatabase Initialization
MariaDB AI RAG requires a properly configured database. The system can automatically initialize the database schema during first startup, or you can manually initialize it using the provided SQL script:
mysql -u username -p database_name < init-db.sqlSecurity Configuration
Authentication
MariaDB AI RAG implements JWT-based authentication. Configure the following parameters in your .env file:
SECRET_KEY=your_secure_random_string
ACCESS_TOKEN_EXPIRE_MINUTES=60For production environments, it is strongly recommended to use a properly generated secure random string for the SECRET_KEY.
API Key Management
External service API keys should be securely stored in the .env file. In production environments, consider using a secure vault solution or environment variable management system.
This page is: Copyright © 2025 MariaDB. All rights reserved.
Last updated
Was this helpful?

