config.json. The application loads a .env file automatically via python-dotenv if one is present in the working directory.
Core variables
Override the default application data directory. This directory is used for
config.json, the SQLite database, downloaded sources, and output files.Default: platform-specific app dir (~/.config/LNCrawl/ on Linux, ~/Library/Application Support/LNCrawl/ on macOS, %APPDATA%\LNCrawl\ on Windows).Example: LNCRAWL_DATA_PATH=/srv/lncrawlPath to an alternative config file. Overrides the default
<APP_DIR>/config.json location.Default: <LNCRAWL_DATA_PATH>/config.jsonExample: LNCRAWL_CONFIG=/etc/lncrawl/config.jsonNumeric log verbosity level. Mapped to standard Python logging levels.
Default:
| Value | Level |
|---|---|
0 | NOTSET (silent) |
1 | WARN |
2 | INFO |
3 | DEBUG |
0Example: LNCRAWL_LOG_LEVEL=2Database
SQLAlchemy database connection URL. Overrides the Default:
database.url config key.Supported databases:sqlite:///<APP_DIR>/sqlite.dbExample: DATABASE_URL=postgresql+psycopg://pguser:pgpass@postgres:5432/lncrawlCrawler and browser
URL of a remote Selenium Grid hub. Overrides the
crawler.selenium_grid config key. When set, the crawler sends browser automation requests to the remote grid instead of launching a local Chrome instance.Default: "" (use local browser)Example: SELENIUM_GRID=http://selenium-hub:4444Width in pixels for the local Chrome browser window when running in non-headless mode.Default: 3/4 of the screen width, minimum
640Example: CHROME_WIDTH=1280Height in pixels for the local Chrome browser window when running in non-headless mode.Default: 3/4 of the screen height, minimum
480Example: CHROME_HEIGHT=720Enable debug mode for the local and remote web drivers. Any non-empty value activates it.Default: unsetExample:
debug_mode=1File uploads
Cloud storage backend used for uploading output files.
Default:
| Value | Backend |
|---|---|
ANONFILES | AnonFiles (default) |
GOFILE | GoFile |
GOOGLE_DRIVE | Google Drive |
ANONFILESExample: CLOUD_DRIVE=GOOGLE_DRIVEPath to the Google service account credentials JSON file. Required when
CLOUD_DRIVE=GOOGLE_DRIVE.Default: unsetExample: GOOGLE_DRIVE_CREDENTIAL_FILE=/secrets/google-credentials.jsonGoogle Drive folder ID to upload files into. Required when
CLOUD_DRIVE=GOOGLE_DRIVE.Default: unsetExample: GOOGLE_DRIVE_FOLDER_ID=1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbsCI and terminal
When set, disables terminal colors and rich formatting (
TERM=dumb, NO_COLOR=1). Standard behavior in most CI environments.Default: unsetExample: CI=trueSetting environment variables
- Linux / macOS
- Windows
Session (current terminal only):Persistent (add to your shell profile):Single command:
Using a .env file
Lightnovel Crawler automatically loads a.env file from the working directory using python-dotenv. Create a .env file next to where you run lncrawl: