Skip to content

Configuration

Apple Juicer is configured entirely through environment variables. They are Pydantic settings defined in core/config/settings.py, all sharing the APPLE_JUICER_ prefix, with __ separating nested keys. Defaults are chosen so the tool runs out of the box; in practice you set the token and the backup path and leave the rest alone.

VariableWhat it doesDefault
APPLE_JUICER_ENVIRONMENTdevelopment or production; production hides /docsdevelopment
APPLE_JUICER_SECURITY__API_TOKENThe token the frontend sends as X-API-Tokendev-token
APPLE_JUICER_SECURITY__TRUSTED_HOSTSCORS origins, comma-separatedhttp://localhost:5173,http://127.0.0.1:5173,localhost
APPLE_JUICER_POSTGRES__DSNAsync SQLAlchemy DSNsqlite+aiosqlite:///./temp_data/apple_juicer.db
APPLE_JUICER_REDIS__URLRedis connection stringredis://localhost:6379/0
APPLE_JUICER_BACKUP_PATHS__BASE_PATHRoot directory containing backups/data/ios_backups
APPLE_JUICER_BACKUP_PATHS__TEMP_PATHWritable temp dir for extracted files/tmp/apple_juicer
APPLE_JUICER_BACKUP_PATHS__DECRYPTED_PATHWhere decrypted data is stored/data/decrypted_backups
APPLE_JUICER_BACKUP_PATHS__HOST_DISPLAY_PATHPath shown in the UI, if different from the mountnone

For list-like settings, use indexed suffixes:

Terminal window
APPLE_JUICER_SECURITY__TRUSTED_HOSTS__0=https://ui.example.com
APPLE_JUICER_SECURITY__TRUSTED_HOSTS__1=https://admin.example.com

A single comma-separated string works too — the trusted_hosts validator coerces both into a real list.

Settings are read in this order of convenience:

  • A .env file next to where you run the app. AppSettings loads .env automatically, which is the easiest path for local development.
  • The shell environment, which is what Docker Compose uses — it maps friendly host variables like APPLE_JUICER_API_TOKEN onto the nested keys for you.

Keep the API token and database credentials out of source. A .env file or your orchestrator’s secret store is the right home for them. Unlock passphrases are never written anywhere; the backend holds them in memory only for the life of a session.

APPLE_JUICER_SECURITY__API_TOKEN=dev-token
APPLE_JUICER_POSTGRES__DSN=postgresql+asyncpg://postgres:postgres@localhost:5432/apple_juicer
APPLE_JUICER_REDIS__URL=redis://localhost:6379/0
APPLE_JUICER_BACKUP_PATHS__BASE_PATH=/Users/me/Library/Application Support/MobileSync/Backup

Raise LOG_LEVEL=debug on the backend to trace discovery, unlock, and indexing. For the worker, rq worker default --log-level DEBUG does the same. If you need structured logs, run Uvicorn with --log-config pointing at a JSON logging config.