1 # Full list of environment variables that can be used with BookStack.
2 # Selectively copy these to your '.env' file as required.
3 # Each option is shown with it's default value.
4 # Do not copy this whole file to use as your '.env' file.
6 # Application environment
7 # Can be 'production', 'development', 'testing' or 'demo'
11 # Shows advanced debug information and errors.
12 # CAN EXPOSE OTHER VARIABLES, LEAVE DISABLED
16 # Used for encryption where needed.
17 # Run `php artisan key:generate` to generate a valid key.
18 APP_KEY=SomeRandomString
21 # This must be the root URL that you want to host BookStack on.
22 # All URL's in BookStack will be generated using this value.
23 APP_URL=https://example.com
25 # Application default language
26 # The default language choice to show.
27 # May be overridden by user-preference or visitor browser settings.
30 # Auto-detect language for public visitors.
31 # Uses browser-sent headers to infer a language.
32 # APP_LANG will be used if such a header is not provided.
33 APP_AUTO_LANG_PUBLIC=true
35 # Application timezone
36 # Used where dates are displayed such as on exported content.
37 # Valid timezone values can be found here: https://www.php.net/manual/en/timezones.php
41 # Used to specific a themes/<APP_THEME> folder where BookStack UI
42 # overrides can be made. Defaults to disabled.
46 # Host can contain a port (localhost:3306) or a separate DB_PORT option can be used.
49 DB_DATABASE=database_database
50 DB_USERNAME=database_username
51 DB_PASSWORD=database_user_password
54 # Can be 'smtp', 'mail' or 'sendmail'
57 # Mail sending options
58 MAIL_FROM=mail@bookstackapp.com
59 MAIL_FROM_NAME=BookStack
68 # Cache & Session driver to use
69 # Can be 'file', 'database', 'memcached' or 'redis'
73 # Session configuration
75 SESSION_COOKIE_NAME=bookstack_session
76 SESSION_SECURE_COOKIE=false
79 # Can be used to prevent conflicts multiple BookStack instances use the same store.
80 CACHE_PREFIX=bookstack
82 # Memcached server configuration
83 # If using a UNIX socket path for the host, set the port to 0
84 # This follows the following format: HOST:PORT:WEIGHT
85 # For multiple servers separate with a comma
86 MEMCACHED_SERVERS=127.0.0.1:11211:100
88 # Redis server configuration
89 # This follows the following format: HOST:PORT:DATABASE
90 # or, if using a password: HOST:PORT:DATABASE:PASSWORD
91 # For multiple servers separate with a comma. These will be clustered.
92 REDIS_SERVERS=127.0.0.1:6379:0
95 # Queue not really currently used but may be configurable in the future.
96 # Would advise not to change this for now.
99 # Storage system to use
100 # Can be 'local', 'local_secure' or 's3'
103 # Image storage system to use
104 # Defaults to the value of STORAGE_TYPE if unset.
105 # Accepts the same values as STORAGE_TYPE.
106 STORAGE_IMAGE_TYPE=local
108 # Attachment storage system to use
109 # Defaults to the value of STORAGE_TYPE if unset.
110 # Accepts the same values as STORAGE_TYPE although 'local' will be forced to 'local_secure'.
111 STORAGE_ATTACHMENT_TYPE=local_secure
113 # Amazon S3 storage configuration
114 STORAGE_S3_KEY=your-s3-key
115 STORAGE_S3_SECRET=your-s3-secret
116 STORAGE_S3_BUCKET=s3-bucket-name
117 STORAGE_S3_REGION=s3-bucket-region
119 # S3 endpoint to use for storage calls
120 # Only set this if using a non-Amazon s3-compatible service such as Minio
121 STORAGE_S3_ENDPOINT=https://my-custom-s3-compatible.service.com:8001
124 # Used as a base for any generated image urls.
125 # An s3-format URL will be generated if not set.
128 # Authentication method to use
129 # Can be 'standard', 'ldap' or 'saml2'
132 # Social authentication configuration
133 # All disabled by default.
134 # Refer to https://www.bookstackapp.com/docs/admin/third-party-auth/
137 AZURE_APP_SECRET=false
139 AZURE_AUTO_REGISTER=false
140 AZURE_AUTO_CONFIRM_EMAIL=false
143 DISCORD_APP_SECRET=false
144 DISCORD_AUTO_REGISTER=false
145 DISCORD_AUTO_CONFIRM_EMAIL=false
147 FACEBOOK_APP_ID=false
148 FACEBOOK_APP_SECRET=false
149 FACEBOOK_AUTO_REGISTER=false
150 FACEBOOK_AUTO_CONFIRM_EMAIL=false
153 GITHUB_APP_SECRET=false
154 GITHUB_AUTO_REGISTER=false
155 GITHUB_AUTO_CONFIRM_EMAIL=false
158 GITLAB_APP_SECRET=false
159 GITLAB_BASE_URI=false
160 GITLAB_AUTO_REGISTER=false
161 GITLAB_AUTO_CONFIRM_EMAIL=false
164 GOOGLE_APP_SECRET=false
165 GOOGLE_SELECT_ACCOUNT=false
166 GOOGLE_AUTO_REGISTER=false
167 GOOGLE_AUTO_CONFIRM_EMAIL=false
171 OKTA_APP_SECRET=false
172 OKTA_AUTO_REGISTER=false
173 OKTA_AUTO_CONFIRM_EMAIL=false
176 SLACK_APP_SECRET=false
177 SLACK_AUTO_REGISTER=false
178 SLACK_AUTO_CONFIRM_EMAIL=false
181 TWITCH_APP_SECRET=false
182 TWITCH_AUTO_REGISTER=false
183 TWITCH_AUTO_CONFIRM_EMAIL=false
186 TWITTER_APP_SECRET=false
187 TWITTER_AUTO_REGISTER=false
188 TWITTER_AUTO_CONFIRM_EMAIL=false
190 # LDAP authentication configuration
191 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
196 LDAP_USER_FILTER=false
198 LDAP_TLS_INSECURE=false
199 LDAP_ID_ATTRIBUTE=uid
200 LDAP_EMAIL_ATTRIBUTE=mail
201 LDAP_DISPLAY_NAME_ATTRIBUTE=cn
202 LDAP_FOLLOW_REFERRALS=true
203 LDAP_DUMP_USER_DETAILS=false
205 # LDAP group sync configuration
206 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
207 LDAP_USER_TO_GROUPS=false
208 LDAP_GROUP_ATTRIBUTE="memberOf"
209 LDAP_REMOVE_FROM_GROUPS=false
211 # SAML authentication configuration
212 # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/
214 SAML2_EMAIL_ATTRIBUTE=email
215 SAML2_DISPLAY_NAME_ATTRIBUTES=username
216 SAML2_EXTERNAL_ID_ATTRIBUTE=null
217 SAML2_IDP_ENTITYID=null
221 SAML2_ONELOGIN_OVERRIDES=null
222 SAML2_DUMP_USER_DETAILS=false
223 SAML2_AUTOLOAD_METADATA=false
225 # SAML group sync configuration
226 # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/
227 SAML2_USER_TO_GROUPS=false
228 SAML2_GROUP_ATTRIBUTE=group
229 SAML2_REMOVE_FROM_GROUPS=false
231 # Disable default third-party services such as Gravatar and Draw.IO
232 # Service-specific options will override this option
233 DISABLE_EXTERNAL_SERVICES=false
235 # Use custom avatar service, Sets fetch URL
236 # Possible placeholders: ${hash} ${size} ${email}
237 # If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
238 # Example: AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
241 # Enable diagrams.net integration
242 # Can simply be true/false to enable/disable the integration.
243 # Alternatively, It can be URL to the diagrams.net instance you want to use.
244 # For URLs, The following URL parameters should be included: embed=1&proto=json&spin=1
247 # Default item listing view
248 # Used for public visitors and user's without a preference
249 # Can be 'list' or 'grid'
251 APP_VIEWS_BOOKSHELVES=grid
253 # Page revision limit
254 # Number of page revisions to keep in the system before deleting old revisions.
255 # If set to 'false' a limit will not be enforced.
258 # Recycle Bin Lifetime
259 # The number of days that content will remain in the recycle bin before
260 # being considered for auto-removal. It is not a guarantee that content will
261 # be removed after this time.
262 # Set to 0 for no recycle bin functionality.
263 # Set to -1 for unlimited recycle bin lifetime.
264 RECYCLE_BIN_LIFETIME=30
266 # Allow <script> tags in page content
267 # Note, if set to 'true' the page editor may still escape scripts.
268 ALLOW_CONTENT_SCRIPTS=false
270 # Indicate if robots/crawlers should crawl your instance.
271 # Can be 'true', 'false' or 'null'.
272 # The behaviour of the default 'null' option will depend on the 'app-public' admin setting.
273 # Contents of the robots.txt file can be overridden, making this option obsolete.
276 # A list of hosts that BookStack can be iframed within.
277 # Space separated if multiple. BookStack host domain is auto-inferred.
278 # For Example: ALLOWED_IFRAME_HOSTS="https://example.com https://a.example.com"
279 # Setting this option will also auto-adjust cookies to be SameSite=None.
280 ALLOWED_IFRAME_HOSTS=null
282 # The default and maximum item-counts for listing API requests.
283 API_DEFAULT_ITEM_COUNT=100
284 API_MAX_ITEM_COUNT=500
286 # The number of API requests that can be made per minute by a single user.
287 API_REQUESTS_PER_MIN=180
289 # Enable the logging of failed email+password logins with the given message.
290 # The default log channel below uses the php 'error_log' function which commonly
291 # results in messages being output to the webserver error logs.
292 # The message can contain a %u parameter which will be replaced with the login
293 # user identifier (Username or email).
294 LOG_FAILED_LOGIN_MESSAGE=false
295 LOG_FAILED_LOGIN_CHANNEL=errorlog_plain_webserver