Skip to main content

Overview

Filebright uses environment variables to configure the application, database connections, AI services, and other runtime settings. All configuration is managed through a .env file in the backend directory.

Application settings

APP_NAME
string
default:"Laravel"
The application name used in emails and other user-facing locations.
APP_ENV
string
default:"local"
The application environment. Set to production for production deployments.Options: local, staging, production
APP_KEY
string
required
Application encryption key. Generate using php artisan key:generate.
Never commit this value to version control. Keep it secret and secure.
APP_DEBUG
boolean
default:"true"
Enable debug mode to display detailed error messages. Set to false in production.
APP_URL
string
default:"http://localhost"
The base URL of your application. Used for generating links and API references.

Localization

APP_LOCALE
string
default:"en"
The default locale for the application.
APP_FALLBACK_LOCALE
string
default:"en"
The fallback locale when the current locale is unavailable.
APP_FAKER_LOCALE
string
default:"en_US"
Locale for generating fake data during testing.

Security

BCRYPT_ROUNDS
integer
default:"12"
The number of bcrypt rounds used for password hashing. Higher values increase security but require more processing time.

Logging

LOG_CHANNEL
string
default:"stack"
The default log channel for the application.Options: stack, single, daily, slack, syslog, errorlog
LOG_STACK
string
default:"single"
The log stack configuration when using the stack channel.
LOG_LEVEL
string
default:"debug"
Minimum log level to record.Options: debug, info, notice, warning, error, critical, alert, emergency
LOG_DEPRECATIONS_CHANNEL
string
default:"null"
Channel for logging deprecation warnings.

Database

DB_CONNECTION
string
default:"sqlite"
The default database connection to use.Options: sqlite, mysql, pgsql, sqlsrv
For production deployments with Docker, use pgsql (PostgreSQL).
DB_HOST
string
default:"127.0.0.1"
Database host address. Use db when running with Docker Compose.
DB_PORT
integer
default:"5432"
Database port. Default is 5432 for PostgreSQL, 3306 for MySQL.
DB_DATABASE
string
default:"filebright"
Database name.
DB_USERNAME
string
default:"user"
Database username.
DB_PASSWORD
string
default:"secret"
Database password.
Use a strong password in production environments.

MongoDB

MONGODB_URI
string
required
MongoDB connection string for vector storage.Example: mongodb://localhost:27017
MONGODB_DATABASE
string
default:"filebright"
MongoDB database name for storing document chunks and embeddings.

Session

SESSION_DRIVER
string
default:"database"
Session storage driver.Options: file, cookie, database, memcached, redis, array
SESSION_LIFETIME
integer
default:"120"
Session lifetime in minutes.
SESSION_ENCRYPT
boolean
default:"false"
Whether to encrypt session data.
SESSION_PATH
string
default:"/"
Session cookie path.
SESSION_DOMAIN
string
default:"null"
Session cookie domain.

Queue

QUEUE_CONNECTION
string
default:"database"
Queue driver for processing background jobs (document parsing, embedding generation).Options: sync, database, beanstalkd, sqs, redis
BROADCAST_CONNECTION
string
default:"log"
Broadcast driver for real-time events.

Cache

CACHE_STORE
string
default:"database"
Cache driver for storing temporary data.Options: file, database, redis, memcached, array
CACHE_PREFIX
string
Optional prefix for cache keys to avoid collisions.

File storage

FILESYSTEM_DISK
string
default:"local"
Default filesystem disk for storing uploaded documents.Options: local, public, s3

Redis (optional)

REDIS_CLIENT
string
default:"phpredis"
Redis client library.Options: phpredis, predis
REDIS_HOST
string
default:"127.0.0.1"
Redis server host.
REDIS_PASSWORD
string
default:"null"
Redis server password if authentication is enabled.
REDIS_PORT
integer
default:"6379"
Redis server port.

Mail

MAIL_MAILER
string
default:"log"
Mail driver for sending emails.Options: smtp, sendmail, mailgun, ses, postmark, log, array
MAIL_HOST
string
default:"127.0.0.1"
SMTP server host.
MAIL_PORT
integer
default:"2525"
SMTP server port.
MAIL_USERNAME
string
SMTP username for authentication.
MAIL_PASSWORD
string
SMTP password for authentication.
MAIL_FROM_ADDRESS
string
Default sender email address.
MAIL_FROM_NAME
string
default:"${APP_NAME}"
Default sender name.

AWS (optional)

AWS_ACCESS_KEY_ID
string
AWS access key ID for S3 storage.
AWS_SECRET_ACCESS_KEY
string
AWS secret access key for S3 storage.
AWS_DEFAULT_REGION
string
default:"us-east-1"
AWS region for S3 bucket.
AWS_BUCKET
string
S3 bucket name for file storage.
AWS_USE_PATH_STYLE_ENDPOINT
boolean
default:"false"
Whether to use path-style endpoints for S3.

OpenRouter API

OPENROUTER_API_KEY
string
required
Your OpenRouter API key for accessing embeddings and chat models.Get your API key from OpenRouter.
OPENROUTER_EMBEDDING_MODEL
string
default:"text-embedding-3-small"
The embedding model to use for generating document embeddings.See AI integration for available models.
OPENROUTER_CHAT_MODEL
string
default:"openai/gpt-3.5-turbo"
The chat model to use for RAG-based question answering.See AI integration for available models.

Example configuration

APP_NAME=Filebright
APP_ENV=local
APP_KEY=base64:YOUR_KEY_HERE
APP_DEBUG=true
APP_URL=http://localhost:8000

DB_CONNECTION=pgsql
DB_HOST=db
DB_PORT=5432
DB_DATABASE=filebright
DB_USERNAME=user
DB_PASSWORD=secret

MONGODB_URI=mongodb://mongodb:27017
MONGODB_DATABASE=filebright

OPENROUTER_API_KEY=your_api_key_here
OPENROUTER_EMBEDDING_MODEL=text-embedding-3-small
OPENROUTER_CHAT_MODEL=openai/gpt-3.5-turbo

QUEUE_CONNECTION=database
CACHE_STORE=database
SESSION_DRIVER=database

Next steps

Database setup

Configure PostgreSQL and MongoDB

AI integration

Set up OpenRouter API for embeddings and chat

Build docs developers (and LLMs) love