Skip to content
Usama Khalil edited this page Aug 27, 2025 · 7 revisions

Autocaliweb supports the following environment variables:

# Setting the timezone
TZ=

# Process user and group ids
PUID=
PGID=

# Declaration of optional docker mods
DOCKER_MODS=

# For verification of your Autocaliweb instance against the Google Search Console
GOOGLE_SITE_VERIFICATION=

# For configuration of Autocaliweb behind a reverse proxy under a path
PROXY_SCRIPT_NAME=
PROXY_SCHEME=
PROXY_FORWARDED_HOST=
PROXY_PORT=

# Set the mode of the deployment (default production)
APP_MODE=

# Activate the debug mode of Flask (default: disabled)
FLASK_DEBUG=

# Set the Cookie Prefix
COOKIE_PREFIX=

# Use a specific cache directory (Default: cps/cache)
CACHE_DIR=

# Use a specific library directory (Default: /calibre-library)
LIBRARY_DIR=

# Set if the /calibre-library path should be indexed (Default: false)
ACW_CHOWN_LIBRARY=

New Environment Variables for Manual Installation and Path Configuration (coming soon)

ACW_INSTALL_DIR=
ACW_CONFIG_DIR=
ACW_USER=
ACW_GROUP=
INGEST_DIR=

These variables are primarily used by the manual installation script to customize installation paths and ownership. They can also override internal application defaults. If set, they take precedence over the script's default values but can be further overridden by command-line arguments provided to the installer, see priorities for more details.

  • ACW_INSTALL_DIR: Overrides the default installation directory for Autocaliweb's core application files.

    • Default (script): /opt/autocaliweb
    • Example: export ACW_INSTALL_DIR="/usr/local/autocaliweb"
  • ACW_CONFIG_DIR: Overrides the default directory for Autocaliweb's configuration files, databases, and logs.

    • Default (script): (Typically derived from ACW_INSTALL_DIR, e.g., /opt/autocaliweb/config)
    • Example: export ACW_CONFIG_DIR="/etc/autocaliweb"
  • ACW_USER: Overrides the default user account under which Autocaliweb services will run and own files.

    • Default (script): The user who invoked the install script (e.g., SUDO_USER or $USER)
    • Example: export ACW_USER="autocali"
  • ACW_GROUP: Overrides the default primary group for Autocaliweb services and file ownership.

    • Default (script): The primary group of the user who invoked the install script
    • Example: export ACW_GROUP="acwusers"
  • LIBRARY_DIR: Specifies the root directory for your Calibre library. This is where your books and Calibre's metadata.db will be stored.

    • Default (Docker/Script): /calibre-library (Docker) or derived from the user's home (e.g., ~/calibre-library) for manual installs if not set.
    • Usage: Can be set as an environment variable (e.g., export LIBRARY_DIR="/mnt/books/MyCalibreLibrary") before running the manual install script or via command-line option --library-dir.
  • INGEST_DIR: Specifies the directory for new books to be processed. The manual installation script uses this as the default location for new books.

    • Default (script): Derived from the user's home (e.g., ~/acw-book-ingest).
    • Usage: Can be set as an environment variable (e.g., export INGEST_DIR="/mnt/storage/NewBooks") before running the manual install script or via command-line option --ingest-dir.

1- Command-line arguments (Highest Priority): Values provided on the command line always override any corresponding environment variables or internal default values (ex. manual_install_acw.sh --install-dir "/home/youruser/apps/autocaliweb").

2- Environment variables (Medium Priority): If a command-line argument is not provided for a specific setting, the script will then check for a corresponding environment variable. If found, its value will be used. This value will override the internal default (ex. export ACW_INSTALL_DIR="/usr/local/autocaliweb; manual_install_acw.sh).

3- Default values (Lowest Priority): If neither a command-line argument nor a relevant environment variable is found, the script will use its predefined default value for that setting (ex. default install dir: /opt/autocaliweb).

Clone this wiki locally