Configuration Guide
DocuNova is designed to be highly configurable through environment variables. This guide explains all available configuration options and how to use them effectively.
Environment Variables
Configuration is primarily done through environment variables specified in a .env file.
Core Settings
| Variable |
Description |
Example |
DATABASE_URL |
Path/URL to the SQLite database (or other SQL backend). |
sqlite:///./app/database.db |
REDIS_URL |
URL for Redis, used by Celery for broker & result store. |
redis://redis:6379/0 |
WORKDIR |
Working directory for the application. |
/workdir |
GOTENBERG_URL |
Gotenberg PDF processing URL. |
http://gotenberg:3000 |
EXTERNAL_HOSTNAME |
The external hostname for the application. |
docunova.example.com |
IMAP Configuration
DocuNova can monitor multiple IMAP mailboxes for document attachments. Each mailbox uses a numbered prefix (e.g., IMAP1_, IMAP2_).
| Variable |
Description |
Example |
IMAP1_HOST |
Hostname for first IMAP server. |
mail.example.com |
IMAP1_PORT |
Port number (usually 993). |
993 |
IMAP1_USERNAME |
IMAP login (first mailbox). |
user@example.com |
IMAP1_PASSWORD |
IMAP password (first mailbox). |
******* |
IMAP1_SSL |
Use SSL (true/false). |
true |
IMAP1_POLL_INTERVAL_MINUTES |
Frequency in minutes to poll for new mail. |
5 |
Authentication
| Variable |
Description |
AUTH_ENABLED |
Enable or disable authentication (true/false). |
AUTHENTIK_CLIENT_ID |
Client ID for Authentik OAuth2. |
AUTHENTIK_CLIENT_SECRET |
Client secret for Authentik OAuth2. |
AUTHENTIK_CONFIG_URL |
Configuration URL for Authentik OpenID Connect. |
OpenAI & Azure Document Intelligence
| Variable |
Description |
How to Obtain |
OPENAI_API_KEY |
OpenAI API key for GPT metadata extraction. |
OpenAI API keys |
AZURE_DOCUMENT_INTELLIGENCE_KEY |
Azure Document Intelligence API key for OCR. |
Azure Portal |
AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT |
Endpoint URL for Azure Doc Intelligence API. |
Azure Portal |
Paperless NGX
| Variable |
Description |
PAPERLESS_NGX_API_TOKEN |
API token for Paperless NGX. |
PAPERLESS_HOST |
Root URL for Paperless NGX (e.g. https://paperless.example.com). |
Dropbox
| Variable |
Description |
How to Obtain |
DROPBOX_APP_KEY |
Dropbox API app key. |
Dropbox Developer Console |
DROPBOX_APP_SECRET |
Dropbox API app secret. |
Dropbox Developer Console |
DROPBOX_REFRESH_TOKEN |
OAuth2 refresh token for Dropbox. |
Follow Dropbox OAuth flow to retrieve |
DROPBOX_FOLDER |
Default folder path for Dropbox uploads. |
e.g. "/Documents/Uploads" |
Nextcloud
| Variable |
Description |
NEXTCLOUD_UPLOAD_URL |
Nextcloud WebDAV URL (e.g. https://nc.example.com/remote.php/dav/files/<USERNAME>). |
NEXTCLOUD_USERNAME |
Nextcloud login username. |
NEXTCLOUD_PASSWORD |
Nextcloud login password. |
NEXTCLOUD_FOLDER |
Destination folder in Nextcloud (e.g. "/Documents/Uploads"). |
Configuration Examples
Minimal Configuration
This is the minimal configuration needed to run DocuNova with local storage only:
Full Configuration with All Services
Selective Service Configuration
You can choose which document storage services to use by only including the relevant environment variables. For example, if you only want to use Dropbox, include only the Dropbox variables and omit the Paperless NGX and Nextcloud variables.
Configuration File Location
The .env file should be placed at the root of the project directory. When using Docker Compose, you can reference it with the env_file directive in your docker-compose.yml.