Enviroment Variables List
Environment Variables
Here are all the additional variables you can define in the .env
file for setting up a self-hosted instance:
Environment Variable | Default | Description |
---|---|---|
PAGINATION_TAKE_COUNT | 50 | The numbers of Links to fetch every time you reach the bottom of the webpage |
STORAGE_FOLDER | /data | The folder to store your Screenshots, PDFs, and profile photos. |
AUTOSCROLL_TIMEOUT | 30 | The amount of time to wait for the website to be archived (in seconds). |
RE_ARCHIVE_LIMIT | 5 | Adjusts how often a user can trigger a new archive for each link (in minutes). |
Authentication Settings
Environment Variable | Default | Description |
---|---|---|
NEXT_PUBLIC_DISABLE_REGISTRATION | false | If set to true, registration will be disabled. |
NEXT_PUBLIC_CREDENTIALS_ENABLED | true | If set to true, users will be able to login with username and password. |
DISABLE_NEW_SSO_USERS | false | If set to true, new users will not be able to login with SSO. |
Digital Ocean Spaces/AWS S3 Settings
Digital Ocean Spaces uses AWS S3 behind the scenes, so you can also choose to store your STORAGE_FOLDER
files in Digital Ocean Spaces or Amazon S3:
Environment Variable | Default | Description |
---|---|---|
SPACES_KEY | - | - |
SPACES_SECRET | - | - |
SPACES_ENDPOINT | - | - |
SPACES_BUCKET_NAME | - | - |
SPACES_REGION | - | - |
SPACES_FORCE_PATH_STYLE | - | - |
SMTP Settings
The variables you need to configure to enable password recovery without the admin interfering, email verification, etc...
Environment Variable | Default | Description |
---|---|---|
NEXT_PUBLIC_EMAIL_PROVIDER | - | If set to true, email will be enabled and you'll need to define the next two variables below. |
EMAIL_FROM | - | The email that will send the verification emails. |
EMAIL_SERVER | - | That sensitive string that starts with smtp://... . |
Full EnviromentVariables List
Core Configuration:
-
NEXTAUTH_URL: The URL for NextAuth (authentication).
Example:NEXTAUTH_URL=http://localhost:3000/api/v1/auth
-
NEXTAUTH_SECRET: Secret key for signing NextAuth tokens.
Example:NEXTAUTH_SECRET=supersecretkey
-
DATABASE_URL: PostgreSQL database connection string.
Example:DATABASE_URL=postgresql://linkwarden:password@localhost:5432/linkwardendb
-
POSTGRES_PASSWORD: Password for the PostgreSQL database user.
Example:POSTGRES_PASSWORD=yourpassword
Optional Settings:
-
PAGINATION_TAKE_COUNT: Number of links displayed per page.
Example:PAGINATION_TAKE_COUNT=20
-
STORAGE_FOLDER: Directory path for storing files like images and PDFs.
Example:STORAGE_FOLDER=/mnt/data/linkwarden_storage
-
AUTOSCROLL_TIMEOUT: Time (in ms) before auto-scroll happens.
Example:AUTOSCROLL_TIMEOUT=5000
-
NEXT_PUBLIC_DISABLE_REGISTRATION: Disable user registration if
true
.
Example:NEXT_PUBLIC_DISABLE_REGISTRATION=true
-
NEXT_PUBLIC_CREDENTIALS_ENABLED: Enable login with username/password.
Example:NEXT_PUBLIC_CREDENTIALS_ENABLED=true
-
DISABLE_NEW_SSO_USERS: Disable new users signing up via SSO.
Example:DISABLE_NEW_SSO_USERS=true
-
RE_ARCHIVE_LIMIT: Maximum number of links to re-archive.
Example:RE_ARCHIVE_LIMIT=50
-
MAX_LINKS_PER_USER: Max number of links a user can save.
Example:MAX_LINKS_PER_USER=1000
-
ARCHIVE_TAKE_COUNT: Number of links to archive in one operation.
Example:ARCHIVE_TAKE_COUNT=100
-
BROWSER_TIMEOUT: Browser process timeout (in ms).
Example:BROWSER_TIMEOUT=30000
-
IGNORE_UNAUTHORIZED_CA: Ignore unauthorized SSL certificates.
Example:IGNORE_UNAUTHORIZED_CA=true
-
IGNORE_HTTPS_ERRORS: Ignore HTTPS-related errors.
Example:IGNORE_HTTPS_ERRORS=true
-
IGNORE_URL_SIZE_LIMIT: Ignore URL size limits.
Example:IGNORE_URL_SIZE_LIMIT=true
-
NEXT_PUBLIC_DEMO: Enable demo mode.
Example:NEXT_PUBLIC_DEMO=true
-
NEXT_PUBLIC_DEMO_USERNAME: Demo mode username.
Example:NEXT_PUBLIC_DEMO_USERNAME=demo
-
NEXT_PUBLIC_DEMO_PASSWORD: Demo mode password.
Example:NEXT_PUBLIC_DEMO_PASSWORD=demopassword
-
NEXT_PUBLIC_ADMIN: Admin username.
Example:NEXT_PUBLIC_ADMIN=adminuser
-
NEXT_PUBLIC_MAX_FILE_BUFFER: Max buffer size for file uploads.
Example:NEXT_PUBLIC_MAX_FILE_BUFFER=1024
-
MONOLITH_MAX_BUFFER: Max buffer size for Monolith operations.
Example:MONOLITH_MAX_BUFFER=2048
-
MONOLITH_CUSTOM_OPTIONS: Custom options for Monolith (web archiving).
Example:MONOLITH_CUSTOM_OPTIONS="--timeout 60000"
-
PDF_MAX_BUFFER: Max buffer size for PDF processing.
Example:PDF_MAX_BUFFER=4096
-
SCREENSHOT_MAX_BUFFER: Max buffer size for screenshots.
Example:SCREENSHOT_MAX_BUFFER=2048
-
READABILITY_MAX_BUFFER: Max buffer size for readability processing.
Example:READABILITY_MAX_BUFFER=1024
-
PREVIEW_MAX_BUFFER: Max buffer size for preview generation.
Example:PREVIEW_MAX_BUFFER=2048
-
IMPORT_LIMIT: Limit on the number of links for import.
Example:IMPORT_LIMIT=500
AWS S3 Settings:
-
SPACES_KEY: AWS S3 access key.
Example:SPACES_KEY=yourawskey
-
SPACES_SECRET: AWS S3 secret key.
Example:SPACES_SECRET=yourawssecret
-
SPACES_ENDPOINT: AWS S3 endpoint URL.
Example:SPACES_ENDPOINT=https://nyc3.digitaloceanspaces.com
-
SPACES_BUCKET_NAME: Name of the S3 bucket.
Example:SPACES_BUCKET_NAME=mybucket
-
SPACES_REGION: AWS region for S3.
Example:SPACES_REGION=us-east-1
-
SPACES_FORCE_PATH_STYLE: Force path-style access for S3.
Example:SPACES_FORCE_PATH_STYLE=true
SMTP Settings:
-
NEXT_PUBLIC_EMAIL_PROVIDER: Email provider (e.g., SMTP).
Example:NEXT_PUBLIC_EMAIL_PROVIDER=smtp
-
EMAIL_FROM: Email address from which emails are sent.
Example:EMAIL_FROM=no-reply@yourdomain.com
-
EMAIL_SERVER: SMTP server URL.
Example:EMAIL_SERVER=smtp://smtp.mailtrap.io:2525
-
BASE_URL: The base URL of your application.
Example:BASE_URL=https://app.yourdomain.com
Proxy Settings:
-
PROXY: Proxy server URL.
Example:PROXY=http://proxy.yourdomain.com
-
PROXY_USERNAME: Username for proxy authentication.
Example:PROXY_USERNAME=proxyuser
-
PROXY_PASSWORD: Password for proxy authentication.
Example:PROXY_PASSWORD=proxypassword
-
PROXY_BYPASS: Hosts to bypass the proxy.
Example:PROXY_BYPASS=localhost,127.0.0.1
PDF Archive Settings:
-
PDF_MARGIN_TOP: Top margin for PDFs.
Example:PDF_MARGIN_TOP=10
-
PDF_MARGIN_BOTTOM: Bottom margin for PDFs.
Example:PDF_MARGIN_BOTTOM=10
SSO Providers:
# 42 School
NEXT_PUBLIC_FORTYTWO_ENABLED=
FORTYTWO_CUSTOM_NAME=
FORTYTWO_CLIENT_ID=
FORTYTWO_CLIENT_SECRET=
# Apple
NEXT_PUBLIC_APPLE_ENABLED=
APPLE_CUSTOM_NAME=
APPLE_ID=
APPLE_SECRET=
# Atlassian
NEXT_PUBLIC_ATLASSIAN_ENABLED=
ATLASSIAN_CUSTOM_NAME=
ATLASSIAN_CLIENT_ID=
ATLASSIAN_CLIENT_SECRET=
ATLASSIAN_SCOPE=
# Auth0
NEXT_PUBLIC_AUTH0_ENABLED=
AUTH0_CUSTOM_NAME=
AUTH0_ISSUER=
AUTH0_CLIENT_SECRET=
AUTH0_CLIENT_ID=
# Authelia
NEXT_PUBLIC_AUTHELIA_ENABLED=""
AUTHELIA_CLIENT_ID=""
AUTHELIA_CLIENT_SECRET=""
AUTHELIA_WELLKNOWN_URL=""
# Authentik
NEXT_PUBLIC_AUTHENTIK_ENABLED=
AUTHENTIK_CUSTOM_NAME=
AUTHENTIK_ISSUER=
AUTHENTIK_CLIENT_ID=
AUTHENTIK_CLIENT_SECRET=
# Azure AD B2C
NEXT_PUBLIC_AZURE_AD_B2C_ENABLED=
AZURE_AD_B2C_TENANT_NAME=
AZURE_AD_B2C_CLIENT_ID=
AZURE_AD_B2C_CLIENT_SECRET=
AZURE_AD_B2C_PRIMARY_USER_FLOW=
# Azure AD
NEXT_PUBLIC_AZURE_AD_ENABLED=
AZURE_AD_CLIENT_ID=
AZURE_AD_CLIENT_SECRET=
AZURE_AD_TENANT_ID=
# Battle.net
NEXT_PUBLIC_BATTLENET_ENABLED=
BATTLENET_CUSTOM_NAME=
BATTLENET_CLIENT_ID=
BATTLENET_CLIENT_SECRET=
BATTLENET_ISSUER=
# Box
NEXT_PUBLIC_BOX_ENABLED=
BOX_CUSTOM_NAME=
BOX_CLIENT_ID=
BOX_CLIENT_SECRET=
# Bungie
NEXT_PUBLIC_BUNGIE_ENABLED=
BUNGIE_CUSTOM_NAME=
BUNGIE_CLIENT_ID=
BUNGIE_CLIENT_SECRET=
BUNGIE_API_KEY=
# Cognito
NEXT_PUBLIC_COGNITO_ENABLED=
COGNITO_CUSTOM_NAME=
COGNITO_CLIENT_ID=
COGNITO_CLIENT_SECRET=
COGNITO_ISSUER=
# Coinbase
NEXT_PUBLIC_COINBASE_ENABLED=
COINBASE_CUSTOM_NAME=
COINBASE_CLIENT_ID=
COINBASE_CLIENT_SECRET=
# Discord
NEXT_PUBLIC_DISCORD_ENABLED=
DISCORD_CUSTOM_NAME=
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
# Dropbox
NEXT_PUBLIC_DROPBOX_ENABLED=
DROPBOX_CUSTOM_NAME=
DROPBOX_CLIENT_ID=
DROPBOX_CLIENT_SECRET=
# DuendeIndentityServer6
NEXT_PUBLIC_DUENDE_IDS6_ENABLED=
DUENDE_IDS6_CUSTOM_NAME=
DUENDE_IDS6_CLIENT_ID=
DUENDE_IDS6_CLIENT_SECRET=
DUENDE_IDS6_ISSUER=
# EVE Online
NEXT_PUBLIC_EVEONLINE_ENABLED=
EVEONLINE_CUSTOM_NAME=
EVEONLINE_CLIENT_ID=
EVEONLINE_CLIENT_SECRET=
# Facebook
NEXT_PUBLIC_FACEBOOK_ENABLED=
FACEBOOK_CUSTOM_NAME=
FACEBOOK_CLIENT_ID=
FACEBOOK_CLIENT_SECRET=
# FACEIT
NEXT_PUBLIC_FACEIT_ENABLED=
FACEIT_CUSTOM_NAME=
FACEIT_CLIENT_ID=
FACEIT_CLIENT_SECRET=
# Foursquare
NEXT_PUBLIC_FOURSQUARE_ENABLED=
FOURSQUARE_CUSTOM_NAME=
FOURSQUARE_CLIENT_ID=
FOURSQUARE_CLIENT_SECRET=
FOURSQUARE_APIVERSION=
# Freshbooks
NEXT_PUBLIC_FRESHBOOKS_ENABLED=
FRESHBOOKS_CUSTOM_NAME=
FRESHBOOKS_CLIENT_ID=
FRESHBOOKS_CLIENT_SECRET=
# FusionAuth
NEXT_PUBLIC_FUSIONAUTH_ENABLED=
FUSIONAUTH_CUSTOM_NAME=
FUSIONAUTH_CLIENT_ID=
FUSIONAUTH_CLIENT_SECRET=
FUSIONAUTH_ISSUER=
FUSIONAUTH_TENANT_ID=
# GitHub
NEXT_PUBLIC_GITHUB_ENABLED=
GITHUB_CUSTOM_NAME=
GITHUB_ID=
GITHUB_SECRET=
# GitLab
NEXT_PUBLIC_GITLAB_ENABLED=
GITLAB_CUSTOM_NAME=
GITLAB_CLIENT_ID=
GITLAB_CLIENT_SECRET=
# Google
NEXT_PUBLIC_GOOGLE_ENABLED=
GOOGLE_CUSTOM_NAME=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# HubSpot
NEXT_PUBLIC_HUBSPOT_ENABLED=
HUBSPOT_CUSTOM_NAME=
HUBSPOT_CLIENT_ID=
HUBSPOT_CLIENT_SECRET=
# IdentityServer4
NEXT_PUBLIC_IDS4_ENABLED=
IDS4_CUSTOM_NAME=
IDS4_CLIENT_ID=
IDS4_CLIENT_SECRET=
IDS4_ISSUER=
# Kakao
NEXT_PUBLIC_KAKAO_ENABLED=
KAKAO_CUSTOM_NAME=
KAKAO_CLIENT_ID=
KAKAO_CLIENT_SECRET=
# Keycloak
NEXT_PUBLIC_KEYCLOAK_ENABLED=
KEYCLOAK_CUSTOM_NAME=
KEYCLOAK_ISSUER=
KEYCLOAK_CLIENT_ID=
KEYCLOAK_CLIENT_SECRET=
# LINE
NEXT_PUBLIC_LINE_ENABLED=
LINE_CUSTOM_NAME=
LINE_CLIENT_ID=
LINE_CLIENT_SECRET=
# LinkedIn
NEXT_PUBLIC_LINKEDIN_ENABLED=
LINKEDIN_CUSTOM_NAME=
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
# Mailchimp
NEXT_PUBLIC_MAILCHIMP_ENABLED=
MAILCHIMP_CUSTOM_NAME=
MAILCHIMP_CLIENT_ID=
MAILCHIMP_CLIENT_SECRET=
# Mail.ru
NEXT_PUBLIC_MAILRU_ENABLED=
MAILRU_CUSTOM_NAME=
MAILRU_CLIENT_ID=
MAILRU_CLIENT_SECRET=
# Naver
NEXT_PUBLIC_NAVER_ENABLED=
NAVER_CUSTOM_NAME=
NAVER_CLIENT_ID=
NAVER_CLIENT_SECRET=
# Netlify
NEXT_PUBLIC_NETLIFY_ENABLED=
NETLIFY_CUSTOM_NAME=
NETLIFY_CLIENT_ID=
NETLIFY_CLIENT_SECRET=
# Okta
NEXT_PUBLIC_OKTA_ENABLED=
OKTA_CUSTOM_NAME=
OKTA_CLIENT_ID=
OKTA_CLIENT_SECRET=
OKTA_ISSUER=
# OneLogin
NEXT_PUBLIC_ONELOGIN_ENABLED=
ONELOGIN_CUSTOM_NAME=
ONELOGIN_CLIENT_ID=
ONELOGIN_CLIENT_SECRET=
ONELOGIN_ISSUER=
# Osso
NEXT_PUBLIC_OSSO_ENABLED=
OSSO_CUSTOM_NAME=
OSSO_CLIENT_ID=
OSSO_CLIENT_SECRET=
OSSO_ISSUER=
# osu!
NEXT_PUBLIC_OSU_ENABLED=
OSU_CUSTOM_NAME=
OSU_CLIENT_ID=
OSU_CLIENT_SECRET=
# Patreon
NEXT_PUBLIC_PATREON_ENABLED=
PATREON_CUSTOM_NAME=
PATREON_CLIENT_ID=
PATREON_CLIENT_SECRET=
# Pinterest
NEXT_PUBLIC_PINTEREST_ENABLED=
PINTEREST_CUSTOM_NAME=
PINTEREST_CLIENT_ID=
PINTEREST_CLIENT_SECRET=
# Pipedrive
NEXT_PUBLIC_PIPEDRIVE_ENABLED=
PIPEDRIVE_CUSTOM_NAME=
PIPEDRIVE_CLIENT_ID=
PIPEDRIVE_CLIENT_SECRET=
# Reddit
NEXT_PUBLIC_REDDIT_ENABLED=
REDDIT_CUSTOM_NAME=
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=
# Salesforce
NEXT_PUBLIC_SALESFORCE_ENABLED=
SALESFORCE_CUSTOM_NAME=
SALESFORCE_CLIENT_ID=
SALESFORCE_CLIENT_SECRET=
# Slack
NEXT_PUBLIC_SLACK_ENABLED=
SLACK_CUSTOM_NAME=
SLACK_CLIENT_ID=
SLACK_CLIENT_SECRET=
# Spotify
NEXT_PUBLIC_SPOTIFY_ENABLED=
SPOTIFY_CUSTOM_NAME=
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
# Strava
NEXT_PUBLIC_STRAVA_ENABLED=
STRAVA_CUSTOM_NAME=
STRAVA_CLIENT_ID=
STRAVA_CLIENT_SECRET=
# Todoist
NEXT_PUBLIC_TODOIST_ENABLED=
TODOIST_CUSTOM_NAME=
TODOIST_CLIENT_ID=
TODOIST_CLIENT_SECRET=
# Twitch
NEXT_PUBLIC_TWITCH_ENABLED=
TWITCH_CUSTOM_NAME=
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
# United Effects
NEXT_PUBLIC_UNITED_EFFECTS_ENABLED=
UNITED_EFFECTS_CUSTOM_NAME=
UNITED_EFFECTS_CLIENT_ID=
UNITED_EFFECTS_CLIENT_SECRET=
UNITED_EFFECTS_ISSUER=
# VK
NEXT_PUBLIC_VK_ENABLED=
VK_CUSTOM_NAME=
VK_CLIENT_ID=
VK_CLIENT_SECRET=
# Wikimedia
NEXT_PUBLIC_WIKIMEDIA_ENABLED=
WIKIMEDIA_CUSTOM_NAME=
WIKIMEDIA_CLIENT_ID=
WIKIMEDIA_CLIENT_SECRET=
# Wordpress.com
NEXT_PUBLIC_WORDPRESS_ENABLED=
WORDPRESS_CUSTOM_NAME=
WORDPRESS_CLIENT_ID=
WORDPRESS_CLIENT_SECRET=
# Yandex
NEXT_PUBLIC_YANDEX_ENABLED=
YANDEX_CUSTOM_NAME=
YANDEX_CLIENT_ID=
YANDEX_CLIENT_SECRET=
# Zitadel
NEXT_PUBLIC_ZITADEL_ENABLED=
ZITADEL_CUSTOM_NAME=
ZITADEL_CLIENT_ID=
ZITADEL_CLIENT_SECRET=
ZITADEL_ISSUER=
# Zoho
NEXT_PUBLIC_ZOHO_ENABLED=
ZOHO_CUSTOM_NAME=
ZOHO_CLIENT_ID=
ZOHO_CLIENT_SECRET=
# Zoom
NEXT_PUBLIC_ZOOM_ENABLED=
ZOOM_CUSTOM_NAME=
ZOOM_CLIENT_ID=
ZOOM_CLIENT_SECRET=