mirror of
https://github.com/suitenumerique/drive.git
synced 2026-08-17 20:15:40 +02:00
External services consuming the resource server API may need items they create to carry specific attributes, typically quota_excluded so their uploads do not consume the user quota. The new EXTERNAL_API_AUD_ITEM_ATTRIBUTES setting maps a token audience to the attributes applied at creation. The lookup is a hook on the item viewset overridden only in the resource server viewset, so both the root create and children creation paths are covered while the regular API remains unaffected.
12 KiB
12 KiB
Environment Variables
This document lists all configurable environment variables for the Drive application, extracted from the Django settings configuration.
| Environment Variable | Description | Default Value |
|---|---|---|
ALLOWED_HOSTS |
List of allowed hosts for the application (used in Production) | [] |
ALLOW_LOGOUT_GET_METHOD |
Allow logout via GET method | True |
ALLOW_SHARE_IMPORT_FILE |
Enable batch sharing of an item from an imported contacts file | False |
API_USERS_LIST_LIMIT |
Maximum number of users returned in API user list | 5 |
API_USERS_LIST_THROTTLE_RATE_BURST |
Burst throttle rate for user list API | 30/minute |
API_USERS_LIST_THROTTLE_RATE_SUSTAINED |
Sustained throttle rate for user list API | 180/hour |
AWS_S3_ACCESS_KEY_ID |
AWS S3 access key ID for file storage | None |
AWS_S3_ENDPOINT_URL |
AWS S3 endpoint URL for file storage | None |
AWS_S3_DOMAIN_REPLACE |
The S3 domain to used by the frontend application. Used by the docker compose stack. | None |
AWS_S3_REGION_NAME |
AWS S3 region name for file storage | None |
AWS_S3_SECRET_ACCESS_KEY |
AWS S3 secret access key for file storage | None |
AWS_S3_UPLOAD_ACL |
ACL applied to uploaded objects, set to default for storages that do not support ACLs (e.g. GCS based providers). With default, objects get the bucket's default object ACL: make sure it keeps objects private |
private |
AWS_S3_UPLOAD_POLICY_EXPIRATION |
AWS S3 upload policy expiration time in seconds | 86400 (24h) |
AWS_STORAGE_BUCKET_NAME |
AWS S3 bucket name for file storage | drive-media-storage |
CACHES_DEFAULT_TIMEOUT |
Default cache timeout in seconds | 30 |
CORS_ALLOW_ALL_ORIGINS |
Allow all origins for CORS | False |
CORS_ALLOWED_ORIGINS |
List of allowed origins for CORS | [] |
CORS_ALLOWED_ORIGIN_REGEXES |
List of allowed origin regexes for CORS | [] |
CRISP_WEBSITE_ID |
Crisp chat widget website ID | None |
CSRF_TRUSTED_ORIGINS |
List of trusted origins for CSRF | [] |
DATA_DIR |
Directory for storing application data | /data |
DATA_UPLOAD_MAX_MEMORY_SIZE |
max upload file size, in bytes | 2147483648 (2 GB) |
DATABASE_URL |
Database connection URL (overrides individual DB settings) | None |
DB_ENGINE |
Database engine | django.db.backends.postgresql |
DB_HOST |
Database host | localhost |
DB_NAME |
Database name | drive |
DB_PASSWORD |
Database password | pass |
DB_PORT |
Database port | 5432 |
DB_USER |
Database user | dinum |
DJANGO_CELERY_BROKER_URL |
Celery broker URL for task queue | redis://redis:6379/0 |
DJANGO_CELERY_TASK_ROUTES |
Celery task routing configuration. Use this to route specific tasks to dedicated queues, e.g. {"core.tasks.item.duplicate_file": {"queue": "duplicate_file"}} |
{} |
EMAIL_BACKEND |
Email backend for sending emails | django.core.mail.backends.smtp.EmailBackend |
EMAIL_BRAND_NAME |
Brand name for email templates | None |
EMAIL_FROM |
Default sender email address | from@example.com |
EMAIL_HOST |
SMTP host for email sending | None |
EMAIL_HOST_PASSWORD |
SMTP password for email sending | None |
EMAIL_HOST_USER |
SMTP username for email sending | None |
EMAIL_LOGO_IMG |
Logo image URL for email templates | None |
EMAIL_PORT |
SMTP port for email sending | None |
EMAIL_URL_APP |
URL used in emails to link back to the app | None |
EMAIL_USE_SSL |
Use SSL for SMTP connection | False |
EMAIL_USE_TLS |
Use TLS for SMTP connection | False |
EXTERNAL_API_AUD_ITEM_ATTRIBUTES |
Extra attributes applied to items created through the external API, keyed by the token audience of the request, e.g. {"some_audience": {"quota_excluded": true}} |
{} |
FEATURES_ALPHA |
Enable alpha features | False |
FEATURES_INDEXED_SEARCH |
Enable the search of indexed files through the API | True |
FILE_EXTENSIONS_ALLOWED |
List of file extension allowed to be uploaded | See in the settings.py file |
FILE_MIMETYPE_ALLOWED |
List of file mimetype allowed to be uploaded | See in the setings.py file |
FRONTEND_THEME |
Frontend theme configuration | None |
FRONTEND_EXTERNAL_HOME_URL |
Frontend external home url to redirect to | None |
FRONTEND_FEEDBACK_BUTTON_SHOW |
Show feedback button | False |
FRONTEND_FEEDBACK_BUTTON_IDLE |
Make feedback button idle (e.g. to bind to external library) | False |
FRONTEND_FEEDBACK_ITEMS |
Dictionary of feedback items with URLs | {} |
FRONTEND_FEEDBACK_MESSAGES_WIDGET_ENABLED |
Enable feedback messages widget | False |
FRONTEND_FEEDBACK_MESSAGES_WIDGET_API_URL |
API URL for feedback messages widget | None |
FRONTEND_FEEDBACK_MESSAGES_WIDGET_CHANNEL |
Channel for feedback messages widget | None |
FRONTEND_FEEDBACK_MESSAGES_WIDGET_PATH |
Path for feedback messages widget | None |
FRONTEND_RELEASE_NOTE_ENABLED |
Enable release notes modal on connexion | True |
FRONTEND_ENTITLEMENTS_DISCLAIMERS |
Enable entitlements disclaimers with custom params | {} |
ITEM_FILE_MAX_SIZE |
Maximum file size for uploads in bytes | 5368709120 (5GB) |
INVITATION_VALIDITY_DURATION |
Duration during which an invitation remains valid, in seconds | 604800 (7 days) |
LANGUAGE_CODE |
Default language code | en-us |
LOGIN_REDIRECT_URL |
URL to redirect after successful login | None |
LOGIN_REDIRECT_URL_FAILURE |
URL to redirect after failed login | None |
LOGOUT_REDIRECT_URL |
URL to redirect after logout | None |
LOGGING_LEVEL_LOGGERS_APP |
Logging level for application loggers | INFO |
LOGGING_LEVEL_LOGGERS_ROOT |
Logging level for root logger | INFO |
MAX_PAGE_SIZE |
Limit the maximum page size the client may request | 200 |
MEDIA_BASE_URL |
Base URL for media files | None |
OIDC_AUTH_REQUEST_EXTRA_PARAMS |
Extra parameters for OIDC auth requests | {} |
OIDC_ALLOW_DUPLICATE_EMAILS |
Allow multiple users with same email | False |
OIDC_CREATE_USER |
Automatically create users on OIDC login | True |
OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION |
Use email as fallback for user identification | True |
OIDC_OP_AUTHORIZATION_ENDPOINT |
OIDC provider authorization endpoint | None |
OIDC_OP_JWKS_ENDPOINT |
OIDC provider JWKS endpoint | None |
OIDC_OP_LOGOUT_ENDPOINT |
OIDC provider logout endpoint | None |
OIDC_OP_TOKEN_ENDPOINT |
OIDC provider token endpoint | None |
OIDC_OP_USER_ENDPOINT |
OIDC provider user endpoint | None |
OIDC_REDIRECT_ALLOWED_HOSTS |
List of allowed hosts for OIDC redirects | [] |
OIDC_REDIRECT_REQUIRE_HTTPS |
Require HTTPS for OIDC redirects | False |
OIDC_RP_CLIENT_ID |
OIDC client ID | drive |
OIDC_RP_CLIENT_SECRET |
OIDC client secret | None |
OIDC_RP_SCOPES |
OIDC scopes | openid email |
OIDC_RP_SIGN_ALGO |
OIDC signing algorithm | RS256 |
OIDC_PKCE_CODE_CHALLENGE_METHOD |
OIDC PKCE challenge method | S256 |
OIDC_PKCE_CODE_VERIFIER_SIZE |
Length of the OIDC PKCE verifier code | 64 |
OIDC_STORE_ACCESS_TOKEN |
Store OIDC access token | False |
OIDC_STORE_ID_TOKEN |
Store OIDC ID token | True |
OIDC_STORE_REFRESH_TOKEN |
Store OIDC refresh token | False |
OIDC_STORE_REFRESH_TOKEN_KEY |
Key for storing OIDC refresh token | None |
OIDC_USE_NONCE |
Use nonce for OIDC requests | True |
OIDC_USE_PKCE |
Use PKCE when interacting with OIDC server | False |
OIDC_USER_INFO |
List of OIDC user info claims | [] |
OIDC_USERINFO_FULLNAME_FIELDS |
Fields to use for full name | ["first_name", "last_name"] |
OIDC_USERINFO_SHORTNAME_FIELD |
Field to use for short name | first_name |
POSTHOG_HOST |
PostHog analytics host URL | https://eu.i.posthog.com |
POSTHOG_KEY |
PostHog analytics API key | None |
REDIS_URL |
Redis connection URL | redis://redis:6379/0 |
RESTRICT_UPLOAD_FILE_TYPE |
Boolean to enable or not upload restriction based on file type (extension + mimetype) | True |
S3_TRANSFER_CONFIG_MULTIPART_THRESHOLD |
multipart_threshold value for the TransferConfig configuration |
8388608 (8MB) |
S3_TRANSFER_CONFIG_MULTIPART_CHUNKSIZE |
multipart_chunksize value for the TransferConfig configuration |
8388608 (8MB) |
S3_TRANSFER_CONFIG_MAX_CONCURRENCY |
max_concurrency value for the TransferConfig configuration |
10 |
S3_TRANSFER_CONFIG_USE_THREADS |
use_threads value for the TransfertConfig configuration |
True |
SEARCH_INDEXER_ALLOWED_MIMETYPES |
Indexable files mimetypes | ["text/"] |
SEARCH_INDEXER_CLASS |
Class of the backend for item indexation & search | |
SEARCH_INDEXER_BATCH_SIZE |
Size of each batch for indexation of all items | 1000 |
SEARCH_INDEXER_COUNTDOWN |
Minimum debounce delay of indexation jobs (in seconds) | 1 |
SEARCH_INDEXER_MIMETYPES |
Find application endpoint for search | None |
SEARCH_INDEXER_QUERY_URL |
Find application endpoint for search | None |
SEARCH_INDEXER_SECRET |
Token for indexation queries | None |
SEARCH_INDEXER_CONTENT_MAX_SIZE |
Maximum size for an indexable file | 2097152 |
SEARCH_INDEXER_URL |
Find application endpoint for indexation | None |
SEARCH_INDEXER_QUERY_LIMIT |
Maximum number of results expected from search endpoint | 50 |
SENTRY_DSN |
Sentry DSN for error tracking | None |
SPECTACULAR_SETTINGS_ENABLE_DJANGO_DEPLOY_CHECK |
Enable Django deploy check in Spectacular | False |
STORAGES_STATICFILES_BACKEND |
Backend for static files storage | whitenoise.storage.CompressedManifestStaticFilesStorage |
TRASHBIN_CUTOFF_DAYS |
Number of days before items are automatically removed from trash after their soft deletion | 30 |
PURGE_GRACE_DAYS |
Number of days before items and their associated file can be permanently purged from storage and database after the trashbin cutoff period | 7 |
USER_RECONCILIATION_FORM_URL |
URL of a third-party form for user reconciliation requests, used in the email sent when a request fails | None |
WOPI_CLIENTS |
List of client name. These client names will be used in the post_setup | [] |
WOPI_{CLIENT_NAME}_DISCOVERY_URL |
The discovery url for each client present in the WOPI_CLIENTS. if WOPI_CLIENTS=vendorA then set WOPI_VENDORA_DISCOVERY_URL |
|
WOPI_EXCLUDED_MIMETYPES |
List of mimetypes excluded when parsing the discovery url | See settings.py module |
WOPI_EXCLUDED_EXTENSIONS |
List of extensions excluded when parsing the discovery url | See settings.py module |
WOPI_SRC_BASE_URL |
The backend url | None |
WOPI_ACCESS_TOKEN_TIMEOUT |
TTL in seconds for the access_token_ttl sent to the WOPI client | 36000 (10H) |
WOPI_LOCK_TIMEOUT |
TTL for the lock acquired by a WOPI client | 1800 (30 min) |
WOPI_CONVERSION_SOURCE_TOKEN_TIMEOUT |
TTL in seconds for the short-lived token OnlyOffice uses to fetch the source file | 120 |
WOPI_ONLYOFFICE_CONVERT_JWT_SECRET |
Shared secret for signing OnlyOffice /converter requests. Required for conversion to work. | None |
WOPI_ONLYOFFICE_CONVERT_HTTP_CONNECT_TIMEOUT |
Connect timeout in seconds for the /converter request | 5 |
WOPI_ONLYOFFICE_CONVERT_HTTP_READ_TIMEOUT |
Read timeout in seconds for the /converter request | 60 |
WOPI_ONLYOFFICE_CONVERT_DOWNLOAD_CONNECT_TIMEOUT |
Connect timeout in seconds for downloading the converted file | 5 |
WOPI_ONLYOFFICE_CONVERT_DOWNLOAD_READ_TIMEOUT |
Read timeout in seconds for downloading the converted file | 30 |
WOPI_DISABLE_CHAT |
Disable chat in the WOPI client interface | 0 |
WOPI_CONFIGURATION_CRONTAB_MINUTE |
Used to configure the celery beat crontab, See https://docs.celeryq.dev/en/main/reference/celery.schedules.html#celery.schedules.crontab | 0 |
WOPI_CONFIGURATION_CRONTAB_HOUR |
Used to configure the celery beat crontab, See https://docs.celeryq.dev/en/main/reference/celery.schedules.html#celery.schedules.crontab | 3 |
WOPI_CONFIGURATION_CRONTAB_DAY_OF_MONTH |
Used to configure the celery beat crontab, See https://docs.celeryq.dev/en/main/reference/celery.schedules.html#celery.schedules.crontab | * |
WOPI_CONFIGURATION_CRONTAB_MONTH_OF_YEAR |
Used to configure the celery beat crontab, See https://docs.celeryq.dev/en/main/reference/celery.schedules.html#celery.schedules.crontab | * |