Virtualpaper can be configured with either the configuration file or using environment variables. If using both, environment variables override the ones read from the configuration file.
See the config.sample.toml for reference.
Also docker-compose.yml provides reference for configuring each dependency that Virtualpaper uses.
Minimum required configuration is database and Meilisearch connections. Other helpful configurations are http API, logging, emails, and the processing pipeline.
Environment variable | config.toml key | Description | Default value |
---|---|---|---|
VIRTUALPAPER_API_HOST | api.host | IP address to bind the http server to | 127.0.0.1 |
VIRTUALPAPER_API_PORT | api.port | IP port to bind the http server to | 8000 |
VIRTUALPAPER_API_SECRET_KEY | api.secret_key | Secret key to sign the tokens with. Leave empty for generating one. Please do not modify after initial generation. | {automatic} |
VIRTUALPAPER_API_CORS_HOSTS | api.cors_hosts | Set the http server CORS hosts. | ["*"] |
VIRTUALPAPER_API_DISABLE_AUTH_RATELIMIT | api.disable_auth_ratelimit | Disable authentication endpoint ratelimiting. Ratelimit is a safety feature and disabling it might impose a security risk! | false |
VIRTUALPAPER_API_PUBLIC_URL | api.public_url | Public url for Virtualpaper server. Used to construct correct links. | http://localhost:8000 |
VIRTUALPAPER_API_STATIC_CONTENT_PATH | api.static_content_path | static | |
VIRTUALPAPER_API_TOKEN_EXPIRE_SEC | api.token_expire_sec | 579600 | |
VIRTUALPAPER_DATABASE_HOST | database.host | Database hostname | localhost |
VIRTUALPAPER_DATABASE_PORT | database.port | 5432 | |
VIRTUALPAPER_DATABASE_USERNAME | database.username | virtualpaper | |
VIRTUALPAPER_DATABASE_PASSWORD | database.password | very-secret-password | |
VIRTUALPAPER_DATABASE_DATABASE | database.database | virtualpaper | |
VIRTUALPAPER_DATABASE_NO_SSL | database.no_ssl | Disable SSL connection | false |
VIRTUALPAPER_MEILISEARCH_URL | meilisearch.url | URL for accessing Meilisearch instance | http://localhost:7700 |
VIRTUALPAPER_MEILISEARCH_APIKEY | meilisearch.apikey | ||
VIRTUALPAPER_MEILISEARCH_INDEX | meilisearch.index | Index prefix. e.g. with ‘vp’ the indices for each user will be named ‘vp-{userid}’ | virtualpaper |
VIRTUALPAPER_PROCESSING_DISABLED | processing.disabled | Disable processing pipeline | false |
VIRTUALPAPER_PROCESSING_INPUT_DIR | processing.input_dir | input | |
VIRTUALPAPER_PROCESSING_TMP_DIR | processing.tmp_dir | /tmp | |
VIRTUALPAPER_PROCESSING_OUTPUTDIR | processing.output_dir | Data directory | media |
VIRTUALPAPER_PROCESSING_MAX_WORKERS | processing.max_workers | Number of background workers. Please set to max of CPUs installed, but can be smaller than that. Default value is half of available CPUs. Eeach background worker can process one document at a time. | {num_cpus/2} |
VIRTUALPAPER_PROCESSING_OCR_LANGUAGES | processing.ocr_languages | [“eng”] | |
VIRTUALPAPER_PROCESSING_PDFTOTEXT_BIN | processing.pdftotext_bin | ||
VIRTUALPAPER_PROCESSING_PANDOC_BIN | processing.pandoc_bin | ||
VIRTUALPAPER_MAIL_HOST | mail.host | Mail server hostname | |
VIRTUALPAPER_MAIL_PORT | mail.port | ||
VIRTUALPAPER_MAIL_USERNAME | mail.username | ||
VIRTUALPAPER_MAIL_PASSWORD | mail.password | ||
VIRTUALPAPER_MAIL_FROM | mail.from | ||
VIRTUALPAPER_MAIL_ERROR_RECIPIENT | mail.error_recipient | ||
VIRTUALPAPER_LOGGING_LOG_LEVEL | logging.log_level | Log level, default is ‘debug’ | |
VIRTUALPAPER_LOGGING_DIRECTORY | logging.directory | log | |
VIRTUALPAPER_LOGGING_LOG_HTTP_STDOUT | logging.log_http_stdout | true | |
VIRTUALPAPER_LOGGING_HTTP_LOG_FILE | logging.http_log_file | http.log | |
VIRTUALPAPER_LOGGING_LOG_FILE | logging.log_file | virtualpaper.log | |
VIRTUALPAPER_LOGGING_LOG_STDOUT | logging.log_stdout | true | |
VIRTUALPAPER_CRONJOBS_DISABLED | cronjobs.disabled | Disable all background cronjobs | false |
VIRTUALPAPER_CRONJOBS_DOCUMENTS_TRASHBIN_CLEANUP_DURATION | cronjobs.documents_trashbin_cleanup_duration | Duration for keeping document in trashbin before permanent deletion | 336h (14 days) |