This comprehensive guide covers all configuration options available in Tarzan, following the 12-factor app methodology for maximum flexibility and deployment convenience.
Tarzan uses environment variables for configuration, making it cloud-native and container-friendly. All configuration options can be set via environment variables with the TARZAN_ prefix.
The primary and recommended method:
export TARZAN_PORT=8000
export TARZAN_BASE__URL=https://yourdomain.comFor development and Docker Compose deployments:
# Copy the example file
cp .env.example .env
# Edit with your values
nano .envdocker run -e TARZAN_PORT=8000 -e TARZAN_BASE__URL=https://yourdomain.com ghcr.io/meysam81/tarzan:latest- Description: Port number for the HTTP server
- Type: Integer
- Default:
8000 - Example:
TARZAN_PORT=3000
- Description: Base URL where Tarzan is accessible (used for generating links, RSS feeds, and sitemaps)
- Type: String
- Default:
"https://tarzan.meysam.io" - Example:
TARZAN_BASE__URL=https://blog.yourdomain.com - Note: Include protocol (http/https) and exclude trailing slash
- Description: Username for webhook authentication
- Type: String
- Default:
"postmarkapp" - Example:
TARZAN_AUTH_USERNAME=webhook_user - Security: Use a unique username for better security
- Description: Password for webhook authentication
- Type: String
- Default:
"Secr3t!" - Example:
TARZAN_AUTH_PASSWORD=MyVerySecurePassword123! - Security: Use a strong, unique password with special characters
Control where Tarzan stores its data and finds required files.
- Description: Path to SQLite database file
- Type: String
- Default:
"tarzan.db" - Example:
TARZAN_DIR_DB=/data/tarzan.db - Note: Ensure directory exists and is writable
- Description: Directory path for storing uploaded files and attachments
- Type: String
- Default:
"storage" - Example:
TARZAN_DIR_STORAGE=/var/www/uploads - Note: Must be writable by the application
# .env file for local development
TARZAN_PORT=8000
TARZAN_BASE__URL=http://localhost:8000
TARZAN_AUTH_USERNAME=dev_user
TARZAN_AUTH_PASSWORD=dev_password
TARZAN_DIR_DB=./dev.db
TARZAN_DIR_STORAGE=./dev_storage# .env file for production
TARZAN_PORT=8000
TARZAN_BASE__URL=https://blog.company.com
TARZAN_AUTH_USERNAME=webhook_prod
TARZAN_AUTH_PASSWORD=ProductionSecurePassword123!
TARZAN_DIR_DB=/data/tarzan.db
TARZAN_DIR_STORAGE=/data/storageservices:
tarzan:
image: ghcr.io/meysam81/tarzan:latest
ports:
- "8000:8000"
environment:
- TARZAN_BASE__URL=https://yourdomain.com
- TARZAN_AUTH_USERNAME=postmarkapp
- TARZAN_AUTH_PASSWORD=SecurePassword123!
volumes:
- tarzan_data:/data
- ./authorized-emails.json:/data/authorized-emails.json:ro
volumes:
tarzan_data:- Use strong, unique passwords with special characters
- Change default usernames from
postmarkapp - Rotate credentials regularly
- Use environment variables, never hardcode secrets
- Store database files in secure, backed-up locations
- Ensure proper file permissions (600 for database files)
- Regular database backups
# Use SSD storage for database
TARZAN_DIR_DB=/fast-ssd/tarzan.db
# Separate storage location
TARZAN_DIR_STORAGE=/large-storage/uploads# Check if port is in use
netstat -tlnp | grep :8000
# Use different port
TARZAN_PORT=8080# Fix database permissions
chmod 644 /path/to/tarzan.db
chown app:app /path/to/tarzan.db
# Fix storage permissions
chmod -R 755 /path/to/storage
chown -R app:app /path/to/storageTarzan validates configuration on startup. Check logs for:
Invalid configuration: missing required field
Database connection failed
Authorized emails file not found
- Enable debug logging
- Use HTTP instead of HTTPS for base URL
- Mirror production configuration
- Test webhook endpoints thoroughly
- Enable all security features
- Configure proper monitoring
- Regular backup procedures
- Never commit
.envfiles with real credentials - Use
.env.exampleas template - Document required variables in README
- Changes require application restart
- Test configuration changes in staging first
- Monitor application logs after configuration updates
Track configuration health with these patterns:
# Basic health check
curl http://localhost:$TARZAN_PORT/health
# Database connectivity
curl http://localhost:$TARZAN_PORT/api/status- Monitor configuration errors in application logs
- Set up alerts for authentication failures
- Track database connection issues
For additional support with configuration, visit our community chat or email setup guide.