You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide covers all available environment variables for configuring Aviary.
File-based Environment Variables
For security purposes, any environment variable can be read from a file instead of being set directly. To use this feature, append _FILE to any environment variable name and provide the path to a file containing the value.
Examples:
# Instead of setting the password directly:
SMTP_PASSWORD=mypassword
# You can store it in a file and reference it:
SMTP_PASSWORD_FILE=/run/secrets/smtp_password
# This works for any environment variable:
API_KEY_FILE=/run/secrets/api_key
JWT_SECRET_FILE=/run/secrets/jwt_secret
DB_PASSWORD_FILE=/run/secrets/db_password
AUTH_PASSWORD_FILE=/run/secrets/auth_password
This is particularly useful when using Docker secrets, Kubernetes secrets, or other secure credential management systems. The file contents will be read and whitespace will be trimmed automatically.
Core Configuration
Variable
Required?
Default
Description
PORT
No
8000
Port for the web server to listen on
GIN_MODE
No
release
Gin web framework mode (release, debug, or test)
DISABLE_UI
No
false
Set true to disable the UI routes and run in API-only mode
PDF_DIR
No
/app/pdfs
Directory to archive PDFs into (filesystem storage only)
RMAPI_HOST
No
Self-hosted endpoint to use for rmapi (single-user mode only)
RMAPI_COVERPAGE
No
Set to first to add --coverpage=1 flag to rmapi put commands, used as the default in multi-user mode
RMAPI_CONFLICT_RESOLUTION
No
abort
Default conflict resolution mode: abort, overwrite, or content_only
RMAPI_FOLDER_DEPTH_LIMIT
No
0
Limit folder traversal depth (0 = no limit, used as the default in multi-user mode)
RMAPI_FOLDER_EXCLUSION_LIST
No
Comma-separated list of folder names to exclude (e.g., trash,templates,archive)
RM_TARGET_DIR
No
/
Target folder on reMarkable device (single-user mode only)
GS_COMPAT
No
1.7
Ghostscript compatibility level
GS_SETTINGS
No
/ebook
Ghostscript PDFSETTINGS preset
SNIFF_TIMEOUT
No
5s
Timeout for sniffing the MIME type
DOWNLOAD_TIMEOUT
No
1m
Timeout for Download requests
FOLDER_CACHE_INTERVAL
No
1h
How often to refresh the folder listing cache. 0 disables caching
FOLDER_REFRESH_RATE
No
0.2
Rate of folder refreshes per second (e.g., "0.2" for one refresh every 5 seconds)
PAGE_RESOLUTION
No
1404x1872
Page resolution for PDF conversion (WIDTHxHEIGHT format), used as the default in multi-user mode
PAGE_DPI
No
226
Page DPI for PDF conversion, used as the default in multi-user mode
CONVERSION_OUTPUT_FORMAT
No
epub
Default output format for web articles, HTML, and Markdown conversion (pdf or epub)
PDF_BACKGROUND_REMOVAL
No
false
Remove background images from scanned PDFs (experimental)
DRY_RUN
No
false
Set to true to log rmapi commands without running them
MAX_UPLOAD_SIZE
No
524288000
Maximum file upload size in bytes (default: 500MB)
BLOCKED_DOMAINS: Blocks specific domains and their subdomains. For example, setting BLOCKED_DOMAINS=example.com will block both example.com and *.example.com
Multi-User Mode Configuration
Variable
Required?
Default
Description
MULTI_USER
No
false
Set to true to enable multi-user mode with database
ADMIN_EMAIL
No
username@localhost
Admin user email (used when creating initial admin from AUTH_USERNAME, if provided)
DATA_DIR
No
/data
Directory for database and user data storage (filesystem backend only)
Storage Backend Configuration
Variable
Required?
Default
Description
STORAGE_BACKEND
No
filesystem
Storage backend type: filesystem or s3
S3_ENDPOINT
No
S3-compatible endpoint URL (optional for AWS S3, required for other S3-compatible services)
S3_REGION
No
us-east-1
S3 region
S3_BUCKET
No
S3 bucket name (required for S3 backend)
S3_ACCESS_KEY_ID
No
S3 access key ID (required for S3 backend)
S3_SECRET_ACCESS_KEY
No
S3 secret access key (required for S3 backend)
S3_FORCE_PATH_STYLE
No
false
Force path-style S3 URLs (required for some S3-compatible services)
Storage Backend Notes
Filesystem backend: Default option.
DATA_DIR: Multi-user mode, primary storage for user data, database, and archived documents.
PDF_DIR: Single-user mode, directory for archived PDFs
S3 backend: Stores archived documents and backups in S3-compatible object storage
Single-user mode limitation: In single-user mode, only archived documents use the storage backend. The rmapi.conf file is always stored in the filesystem at /root/.config/rmapi/rmapi.conf and must be mounted as a volume for persistence. PDF_DIR is ignored when using S3 storage backend
Migration constraint: Single-user to multi-user migration requires using the same storage backend. For cross-backend migrations, see Data Management
Database storage: SQLite databases are always stored in the DATA_DIR and require volume mounts. For stateless deployment, use PostgreSQL with S3 storage backend