Skip to main content

Configuration

Configure Mantrae through environment variables and command-line arguments.

Environment Variables

VariableDefaultRequiredDescription
SECRET-YesEncryption key (16, 24, or 32 bytes)
ADMIN_PASSWORDauto-generatedNoInitial admin password
LOG_LEVELinfoNoLog level: debug, info, warn, error
LOG_FORMATtextNoLog format: text, json
warning

The SECRET environment variable must be 16, 24, or 32 bytes. Mantrae will not start without it.

Backup Configuration

VariableDefaultDescription
BACKUP_SCHEDULE0 2 * * *Cron schedule (daily at 2 AM)
BACKUP_RETENTION30Days to retain backups
BACKUP_AUTO_ENABLEDtrueEnable automatic backups

Storage Configuration

Local Storage (Default)

STORAGE_TYPE=local

Backups stored in /data/backups/

S3-Compatible Storage

STORAGE_TYPE=s3
STORAGE_S3_ENDPOINT=https://s3.amazonaws.com
STORAGE_S3_REGION=us-east-1
STORAGE_S3_BUCKET=mantrae-backups
STORAGE_S3_ACCESS_KEY=your-access-key
STORAGE_S3_SECRET_KEY=your-secret-key
STORAGE_S3_PATH=backups/

Works with AWS S3, MinIO, DigitalOcean Spaces, etc.

Command-Line Interface

Server Commands

# Start server
mantrae

# Check version
mantrae --version
mantrae -v

# Check for updates
mantrae update

# Install latest version (binary only)
mantrae update --install

Password Management

# Reset admin password
mantrae reset --password newpassword
mantrae reset -p newpassword

# Reset specific user
mantrae reset --user username --password newpassword
mantrae reset -u username -p newpassword

Flags

FlagShortDescription
--version-vDisplay version and exit
--password-pPassword for reset command
--user-uUsername for reset (default: admin)
--install-Install update (update command only)

Docker Example

services:
mantrae:
image: ghcr.io/mizuchilabs/mantrae:latest
environment:
- SECRET=${SECRET}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- LOG_LEVEL=info
- LOG_FORMAT=json
- BACKUP_SCHEDULE=0 3 * * *
- BACKUP_RETENTION=90
- STORAGE_TYPE=s3
- STORAGE_S3_BUCKET=my-backups
- STORAGE_S3_ACCESS_KEY=${S3_ACCESS_KEY}
- STORAGE_S3_SECRET_KEY=${S3_SECRET_KEY}
ports:
- "3000:3000"
volumes:
- ./mantrae:/data
restart: unless-stopped