# ============================================================================= # ankerctl Environment Configuration # ============================================================================= # Copy this file to .env and adjust the values. # Docker Compose loads .env automatically. # Lines starting with # are comments. Uncomment to override defaults. # ============================================================================= # Server # ============================================================================= # IP address the web server binds to. # Use 0.0.0.0 for Docker or to expose on all interfaces. # ANKERCTL_HOST=127.0.0.1 # FLASK_HOST=127.0.0.1 # legacy alias for ANKERCTL_HOST (deprecated) # Port the web server listens on. # ANKERCTL_PORT=4470 # FLASK_PORT=4470 # legacy alias for ANKERCTL_PORT (deprecated) # Session cookie secret. Set for persistence across restarts. # If unset, a random key is generated at startup (sessions expire on restart). # FLASK_SECRET_KEY=change-me-to-a-random-string # Select printer by index when multiple printers are configured (0-based). # PRINTER_INDEX=0 # Trust X-Forwarded-For header from a reverse proxy. # Values: "1", "true", "yes" — only set if running behind a trusted proxy. # ANKERCTL_TRUST_PROXY=false # ============================================================================= # Upload # ============================================================================= # Maximum upload file size in MB. # UPLOAD_MAX_MB=2048 # Upload speed to printer in Mbit/s. Choices: 5, 10, 25, 50, 100. # UPLOAD_RATE_MBPS=10 # ============================================================================= # Security # ============================================================================= # API key for write-operation authentication. # When set, all POST/DELETE requests and protected GET paths require this key. # Minimum 16 characters, allowed: [a-zA-Z0-9_-] # ANKERCTL_API_KEY= # ============================================================================= # Feature Flags # ============================================================================= # Enable Debug tab and /api/debug/* endpoints. Do NOT enable in production. # ANKERCTL_DEV_MODE=false # Directory for log files. Enables file logging when set. # ANKERCTL_LOG_DIR= # Show experimental Pause/Resume/Stop print control buttons in the UI. # Note: not yet implemented in the Go rewrite. # ANKERCTL_PRINT_CONTROLS= # ============================================================================= # Apprise Notifications # ============================================================================= # Requires an external Apprise API server. # See: https://github.com/caronc/apprise-api # Enable Apprise push notifications. # APPRISE_ENABLED=false # Apprise API server URL (e.g., http://apprise:8000). # APPRISE_SERVER_URL= # Apprise notification key/ID. # APPRISE_KEY= # Apprise tag filter (optional). # APPRISE_TAG= # Event toggles -- set to true/false. # APPRISE_EVENT_PRINT_STARTED=true # APPRISE_EVENT_PRINT_FINISHED=true # APPRISE_EVENT_PRINT_FAILED=true # APPRISE_EVENT_GCODE_UPLOADED=true # APPRISE_EVENT_PRINT_PROGRESS=true # Progress notification interval in percent (e.g., every 25%). # APPRISE_PROGRESS_INTERVAL=25 # Attach camera snapshot to progress notifications. # APPRISE_PROGRESS_INCLUDE_IMAGE=false # Override progress scale (0 = auto). # APPRISE_PROGRESS_MAX=0 # Snapshot quality: sd (848x480), hd (1280x720), fhd (1920x1080). # APPRISE_SNAPSHOT_QUALITY=hd # Use G-code preview image if live camera snapshot fails. # APPRISE_SNAPSHOT_FALLBACK=true # Turn on printer light briefly for snapshot capture. # APPRISE_SNAPSHOT_LIGHT=false # ============================================================================= # Print History # ============================================================================= # Number of days to keep history entries before automatic pruning. # PRINT_HISTORY_RETENTION_DAYS=90 # Maximum number of history entries to keep. # PRINT_HISTORY_MAX_ENTRIES=500 # ============================================================================= # Timelapse # ============================================================================= # Requires ffmpeg installed (included in Docker image). # Enable automatic timelapse capture during prints. # TIMELAPSE_ENABLED=false # Seconds between snapshot captures. # TIMELAPSE_INTERVAL_SEC=30 # Maximum number of timelapse videos to keep (oldest pruned first). # TIMELAPSE_MAX_VIDEOS=10 # Save assembled videos persistently. # TIMELAPSE_SAVE_PERSISTENT=true # Directory for timelapse video storage (maps to the /captures volume in Docker). # TIMELAPSE_CAPTURES_DIR=/captures # Light control during timelapse capture. # Options: snapshot (per-frame on/off), session (on for entire capture), unset (no control). # TIMELAPSE_LIGHT= # Camera source for timelapse snapshots. # Options: follow (use UI camera selection), printer (internal camera), external (external camera). # Note: not yet implemented in the Go rewrite. # TIMELAPSE_CAMERA_SOURCE=follow # ============================================================================= # Home Assistant MQTT Discovery # ============================================================================= # Requires a running MQTT broker (e.g., Mosquitto) accessible to both # ankerctl and Home Assistant. # # IMPORTANT: HA_MQTT_PASSWORD must be set if the broker requires authentication. # An empty password causes rc=5 (Unauthorized) from most brokers. # Enable Home Assistant MQTT Discovery integration. # HA_MQTT_ENABLED=false # MQTT broker hostname or IP address. # HA_MQTT_HOST=localhost # MQTT broker port. # HA_MQTT_PORT=1883 # MQTT broker username (optional). # HA_MQTT_USER= # MQTT broker password (optional). # HA_MQTT_PASSWORD= # Home Assistant discovery topic prefix. # HA_MQTT_DISCOVERY_PREFIX=homeassistant # State and command topic prefix. # HA_MQTT_TOPIC_PREFIX=ankerctl # ============================================================================= # Filament Service # ============================================================================= # Allow the legacy automatic unload/load swap flow. # When false (default), manual swap flow is used: the printer preheats the # nozzle and waits for user confirmation before proceeding. # FILAMENT_ALLOW_LEGACY_SWAP=false # Nozzle preheat temperature (°C) used in manual swap mode. Clamped to [130, 150]. # FILAMENT_MANUAL_SWAP_PREHEAT_TEMP_C=140