]> BookStack Code Mirror - bookstack/blob - .env.example.complete
Pages: Redirect user to view if they can't edit
[bookstack] / .env.example.complete
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.
5
6 # The details here only serve as a quick reference.
7 # Please refer to the BookStack documentation for full details:
8 # https://www.bookstackapp.com/docs/
9
10 # Application environment
11 # Can be 'production', 'development', 'testing' or 'demo'
12 APP_ENV=production
13
14 # Enable debug mode
15 # Shows advanced debug information and errors.
16 # CAN EXPOSE OTHER VARIABLES, LEAVE DISABLED
17 APP_DEBUG=false
18
19 # Application key
20 # Used for encryption where needed.
21 # Run `php artisan key:generate` to generate a valid key.
22 APP_KEY=SomeRandomString
23
24 # Application URL
25 # This must be the root URL that you want to host BookStack on.
26 # All URL's in BookStack will be generated using this value.
27 APP_URL=https://example.com
28
29 # Application default language
30 # The default language choice to show.
31 # May be overridden by user-preference or visitor browser settings.
32 APP_LANG=en
33
34 # Auto-detect language for public visitors.
35 # Uses browser-sent headers to infer a language.
36 # APP_LANG will be used if such a header is not provided.
37 APP_AUTO_LANG_PUBLIC=true
38
39 # Application timezone
40 # Used where dates are displayed such as on exported content.
41 # Valid timezone values can be found here: https://www.php.net/manual/en/timezones.php
42 APP_TIMEZONE=UTC
43
44 # Application theme
45 # Used to specific a themes/<APP_THEME> folder where BookStack UI
46 # overrides can be made. Defaults to disabled.
47 APP_THEME=false
48
49 # Trusted proxies
50 # Used to indicate trust of systems that proxy to the application so
51 # certain header values (Such as "X-Forwarded-For") can be used from the
52 # incoming proxy request to provide origin detail.
53 # Set to an IP address, or multiple comma seperated IP addresses.
54 # Can alternatively be set to "*" to trust all proxy addresses.
55 APP_PROXIES=null
56
57 # Database details
58 # Host can contain a port (localhost:3306) or a separate DB_PORT option can be used.
59 # An ipv6 address can be used via the square bracket format ([::1]).
60 DB_HOST=localhost
61 DB_PORT=3306
62 DB_DATABASE=database_database
63 DB_USERNAME=database_username
64 DB_PASSWORD=database_user_password
65
66 # MySQL specific connection options
67 # Path to Certificate Authority (CA) certificate file for your MySQL instance.
68 # When this option is used host name identity verification will be performed
69 # which checks the hostname, used by the client, against names within the
70 # certificate itself (Common Name or Subject Alternative Name).
71 MYSQL_ATTR_SSL_CA="/path/to/ca.pem"
72
73 # Mail configuration
74 # Refer to https://www.bookstackapp.com/docs/admin/email-webhooks/#email-configuration
75 MAIL_DRIVER=smtp
76 MAIL_FROM=bookstack@example.com
77 MAIL_FROM_NAME=BookStack
78
79 MAIL_HOST=localhost
80 MAIL_PORT=587
81 MAIL_USERNAME=null
82 MAIL_PASSWORD=null
83 MAIL_ENCRYPTION=null
84 MAIL_VERIFY_SSL=true
85
86 MAIL_SENDMAIL_COMMAND="/usr/sbin/sendmail -bs"
87
88 # Cache & Session driver to use
89 # Can be 'file', 'database', 'memcached' or 'redis'
90 CACHE_DRIVER=file
91 SESSION_DRIVER=file
92
93 # Session configuration
94 SESSION_LIFETIME=120
95 SESSION_COOKIE_NAME=bookstack_session
96 SESSION_SECURE_COOKIE=false
97
98 # Cache key prefix
99 # Can be used to prevent conflicts multiple BookStack instances use the same store.
100 CACHE_PREFIX=bookstack
101
102 # Memcached server configuration
103 # If using a UNIX socket path for the host, set the port to 0
104 # This follows the following format: HOST:PORT:WEIGHT
105 # For multiple servers separate with a comma
106 MEMCACHED_SERVERS=127.0.0.1:11211:100
107
108 # Redis server configuration
109 # This follows the following format: HOST:PORT:DATABASE
110 # or, if using a password: HOST:PORT:DATABASE:PASSWORD
111 # For multiple servers separate with a comma. These will be clustered.
112 REDIS_SERVERS=127.0.0.1:6379:0
113
114 # Queue driver to use
115 # Can be 'sync', 'database' or 'redis'
116 QUEUE_CONNECTION=sync
117
118 # Storage system to use
119 # Can be 'local', 'local_secure' or 's3'
120 STORAGE_TYPE=local
121
122 # Image storage system to use
123 # Defaults to the value of STORAGE_TYPE if unset.
124 # Accepts the same values as STORAGE_TYPE.
125 STORAGE_IMAGE_TYPE=local
126
127 # Attachment storage system to use
128 # Defaults to the value of STORAGE_TYPE if unset.
129 # Accepts the same values as STORAGE_TYPE although 'local' will be forced to 'local_secure'.
130 STORAGE_ATTACHMENT_TYPE=local_secure
131
132 # Amazon S3 storage configuration
133 STORAGE_S3_KEY=your-s3-key
134 STORAGE_S3_SECRET=your-s3-secret
135 STORAGE_S3_BUCKET=s3-bucket-name
136 STORAGE_S3_REGION=s3-bucket-region
137
138 # S3 endpoint to use for storage calls
139 # Only set this if using a non-Amazon s3-compatible service such as Minio
140 STORAGE_S3_ENDPOINT=https://my-custom-s3-compatible.service.com:8001
141
142 # Storage URL prefix
143 # Used as a base for any generated image urls.
144 # An s3-format URL will be generated if not set.
145 STORAGE_URL=false
146
147 # Authentication method to use
148 # Can be 'standard', 'ldap', 'saml2' or 'oidc'
149 AUTH_METHOD=standard
150
151 # Automatically initiate login via external auth system if it's the only auth method.
152 # Works with saml2 or oidc auth methods.
153 AUTH_AUTO_INITIATE=false
154
155 # Social authentication configuration
156 # All disabled by default.
157 # Refer to https://www.bookstackapp.com/docs/admin/third-party-auth/
158
159 AZURE_APP_ID=false
160 AZURE_APP_SECRET=false
161 AZURE_TENANT=false
162 AZURE_AUTO_REGISTER=false
163 AZURE_AUTO_CONFIRM_EMAIL=false
164
165 DISCORD_APP_ID=false
166 DISCORD_APP_SECRET=false
167 DISCORD_AUTO_REGISTER=false
168 DISCORD_AUTO_CONFIRM_EMAIL=false
169
170 FACEBOOK_APP_ID=false
171 FACEBOOK_APP_SECRET=false
172 FACEBOOK_AUTO_REGISTER=false
173 FACEBOOK_AUTO_CONFIRM_EMAIL=false
174
175 GITHUB_APP_ID=false
176 GITHUB_APP_SECRET=false
177 GITHUB_AUTO_REGISTER=false
178 GITHUB_AUTO_CONFIRM_EMAIL=false
179
180 GITLAB_APP_ID=false
181 GITLAB_APP_SECRET=false
182 GITLAB_BASE_URI=false
183 GITLAB_AUTO_REGISTER=false
184 GITLAB_AUTO_CONFIRM_EMAIL=false
185
186 GOOGLE_APP_ID=false
187 GOOGLE_APP_SECRET=false
188 GOOGLE_SELECT_ACCOUNT=false
189 GOOGLE_AUTO_REGISTER=false
190 GOOGLE_AUTO_CONFIRM_EMAIL=false
191
192 OKTA_BASE_URL=false
193 OKTA_APP_ID=false
194 OKTA_APP_SECRET=false
195 OKTA_AUTO_REGISTER=false
196 OKTA_AUTO_CONFIRM_EMAIL=false
197
198 SLACK_APP_ID=false
199 SLACK_APP_SECRET=false
200 SLACK_AUTO_REGISTER=false
201 SLACK_AUTO_CONFIRM_EMAIL=false
202
203 TWITCH_APP_ID=false
204 TWITCH_APP_SECRET=false
205 TWITCH_AUTO_REGISTER=false
206 TWITCH_AUTO_CONFIRM_EMAIL=false
207
208 TWITTER_APP_ID=false
209 TWITTER_APP_SECRET=false
210 TWITTER_AUTO_REGISTER=false
211 TWITTER_AUTO_CONFIRM_EMAIL=false
212
213 # LDAP authentication configuration
214 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
215 LDAP_SERVER=false
216 LDAP_BASE_DN=false
217 LDAP_DN=false
218 LDAP_PASS=false
219 LDAP_USER_FILTER="(&(uid={user}))"
220 LDAP_VERSION=false
221 LDAP_START_TLS=false
222 LDAP_TLS_INSECURE=false
223 LDAP_TLS_CA_CERT=false
224 LDAP_ID_ATTRIBUTE=uid
225 LDAP_EMAIL_ATTRIBUTE=mail
226 LDAP_DISPLAY_NAME_ATTRIBUTE=cn
227 LDAP_THUMBNAIL_ATTRIBUTE=null
228 LDAP_FOLLOW_REFERRALS=true
229 LDAP_DUMP_USER_DETAILS=false
230
231 # LDAP group sync configuration
232 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
233 LDAP_USER_TO_GROUPS=false
234 LDAP_GROUP_ATTRIBUTE="memberOf"
235 LDAP_REMOVE_FROM_GROUPS=false
236 LDAP_DUMP_USER_GROUPS=false
237
238 # SAML authentication configuration
239 # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/
240 SAML2_NAME=SSO
241 SAML2_EMAIL_ATTRIBUTE=email
242 SAML2_DISPLAY_NAME_ATTRIBUTES=username
243 SAML2_EXTERNAL_ID_ATTRIBUTE=null
244 SAML2_IDP_ENTITYID=null
245 SAML2_IDP_SSO=null
246 SAML2_IDP_SLO=null
247 SAML2_IDP_x509=null
248 SAML2_ONELOGIN_OVERRIDES=null
249 SAML2_DUMP_USER_DETAILS=false
250 SAML2_AUTOLOAD_METADATA=false
251 SAML2_IDP_AUTHNCONTEXT=true
252 SAML2_SP_x509=null
253 SAML2_SP_x509_KEY=null
254
255 # SAML group sync configuration
256 # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/
257 SAML2_USER_TO_GROUPS=false
258 SAML2_GROUP_ATTRIBUTE=group
259 SAML2_REMOVE_FROM_GROUPS=false
260
261 # OpenID Connect authentication configuration
262 # Refer to https://www.bookstackapp.com/docs/admin/oidc-auth/
263 OIDC_NAME=SSO
264 OIDC_DISPLAY_NAME_CLAIMS=name
265 OIDC_CLIENT_ID=null
266 OIDC_CLIENT_SECRET=null
267 OIDC_ISSUER=null
268 OIDC_ISSUER_DISCOVER=false
269 OIDC_PUBLIC_KEY=null
270 OIDC_AUTH_ENDPOINT=null
271 OIDC_TOKEN_ENDPOINT=null
272 OIDC_USERINFO_ENDPOINT=null
273 OIDC_ADDITIONAL_SCOPES=null
274 OIDC_DUMP_USER_DETAILS=false
275 OIDC_USER_TO_GROUPS=false
276 OIDC_GROUPS_CLAIM=groups
277 OIDC_REMOVE_FROM_GROUPS=false
278 OIDC_EXTERNAL_ID_CLAIM=sub
279 OIDC_END_SESSION_ENDPOINT=false
280
281 # Disable default third-party services such as Gravatar and Draw.IO
282 # Service-specific options will override this option
283 DISABLE_EXTERNAL_SERVICES=false
284
285 # Use custom avatar service, Sets fetch URL
286 # Possible placeholders: ${hash} ${size} ${email}
287 # If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
288 # Example: AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
289 AVATAR_URL=
290
291 # Enable diagrams.net integration
292 # Can simply be true/false to enable/disable the integration.
293 # Alternatively, It can be URL to the diagrams.net instance you want to use.
294 # For URLs, The following URL parameters should be included: embed=1&proto=json&spin=1&configure=1
295 DRAWIO=true
296
297 # Default item listing view
298 # Used for public visitors and user's without a preference.
299 # Can be 'list' or 'grid'.
300 APP_VIEWS_BOOKS=list
301 APP_VIEWS_BOOKSHELVES=grid
302 APP_VIEWS_BOOKSHELF=grid
303
304 # Use dark mode by default
305 # Will be overriden by any user/session preference.
306 APP_DEFAULT_DARK_MODE=false
307
308 # Page revision limit
309 # Number of page revisions to keep in the system before deleting old revisions.
310 # If set to 'false' a limit will not be enforced.
311 REVISION_LIMIT=100
312
313 # Recycle Bin Lifetime
314 # The number of days that content will remain in the recycle bin before
315 # being considered for auto-removal. It is not a guarantee that content will
316 # be removed after this time.
317 # Set to 0 for no recycle bin functionality.
318 # Set to -1 for unlimited recycle bin lifetime.
319 RECYCLE_BIN_LIFETIME=30
320
321 # File Upload Limit
322 # Maximum file size, in megabytes, that can be uploaded to the system.
323 FILE_UPLOAD_SIZE_LIMIT=50
324
325 # Export Page Size
326 # Primarily used to determine page size of PDF exports.
327 # Can be 'a4' or 'letter'.
328 EXPORT_PAGE_SIZE=a4
329
330 # Export PDF Command
331 # Set a command which can be used to convert a HTML file into a PDF file.
332 # When false this will not be used.
333 # String values represent the command to be called for conversion.
334 # Supports '{input_html_path}' and '{output_pdf_path}' placeholder values.
335 # Example: EXPORT_PDF_COMMAND="/scripts/convert.sh {input_html_path} {output_pdf_path}"
336 EXPORT_PDF_COMMAND=false
337
338 # Export PDF Command Timeout
339 # The number of seconds that the export PDF command will run before a timeout occurs.
340 # Only applies for the EXPORT_PDF_COMMAND option, not for DomPDF or wkhtmltopdf.
341 EXPORT_PDF_COMMAND_TIMEOUT=15
342
343 # Set path to wkhtmltopdf binary for PDF generation.
344 # Can be 'false' or a path path like: '/home/bins/wkhtmltopdf'
345 # When false, BookStack will attempt to find a wkhtmltopdf in the application
346 # root folder then fall back to the default dompdf renderer if no binary exists.
347 # Only used if 'ALLOW_UNTRUSTED_SERVER_FETCHING=true' which disables security protections.
348 WKHTMLTOPDF=false
349
350 # Allow <script> tags in page content
351 # Note, if set to 'true' the page editor may still escape scripts.
352 ALLOW_CONTENT_SCRIPTS=false
353
354 # Indicate if robots/crawlers should crawl your instance.
355 # Can be 'true', 'false' or 'null'.
356 # The behaviour of the default 'null' option will depend on the 'app-public' admin setting.
357 # Contents of the robots.txt file can be overridden, making this option obsolete.
358 ALLOW_ROBOTS=null
359
360 # Allow server-side fetches to be performed to potentially unknown
361 # and user-provided locations. Primarily used in exports when loading
362 # in externally referenced assets.
363 # Can be 'true' or 'false'.
364 ALLOW_UNTRUSTED_SERVER_FETCHING=false
365
366 # A list of hosts that BookStack can be iframed within.
367 # Space separated if multiple. BookStack host domain is auto-inferred.
368 # For Example: ALLOWED_IFRAME_HOSTS="https://example.com https://a.example.com"
369 # Setting this option will also auto-adjust cookies to be SameSite=None.
370 ALLOWED_IFRAME_HOSTS=null
371
372 # A list of sources/hostnames that can be loaded within iframes within BookStack.
373 # Space separated if multiple. BookStack host domain is auto-inferred.
374 # Can be set to a lone "*" to allow all sources for iframe content (Not advised).
375 # Defaults to a set of common services.
376 # Current host and source for the "DRAWIO" setting will be auto-appended to the sources configured.
377 ALLOWED_IFRAME_SOURCES="https://*.draw.io https://*.youtube.com https://*.youtube-nocookie.com https://*.vimeo.com"
378
379 # A list of the sources/hostnames that can be reached by application SSR calls.
380 # This is used wherever users can provide URLs/hosts in-platform, like for webhooks.
381 # Host-specific functionality (usually controlled via other options) like auth
382 # or user avatars for example, won't use this list.
383 # Space seperated if multiple. Can use '*' as a wildcard.
384 # Values will be compared prefix-matched, case-insensitive, against called SSR urls.
385 # Defaults to allow all hosts.
386 ALLOWED_SSR_HOSTS="*"
387
388 # The default and maximum item-counts for listing API requests.
389 API_DEFAULT_ITEM_COUNT=100
390 API_MAX_ITEM_COUNT=500
391
392 # The number of API requests that can be made per minute by a single user.
393 API_REQUESTS_PER_MIN=180
394
395 # Enable the logging of failed email+password logins with the given message.
396 # The default log channel below uses the php 'error_log' function which commonly
397 # results in messages being output to the webserver error logs.
398 # The message can contain a %u parameter which will be replaced with the login
399 # user identifier (Username or email).
400 LOG_FAILED_LOGIN_MESSAGE=false
401 LOG_FAILED_LOGIN_CHANNEL=errorlog_plain_webserver
402
403 # Alter the precision of IP addresses stored by BookStack.
404 # Should be a number between 0 and 4, where 4 retains the full IP address
405 # and 0 completely hides the IP address. As an example, a value of 2 for the
406 # IP address '146.191.42.4' would result in '146.191.x.x' being logged.
407 # For the IPv6 address '2001:db8:85a3:8d3:1319:8a2e:370:7348' this would result as:
408 # '2001:db8:85a3:8d3:x:x:x:x'
409 IP_ADDRESS_PRECISION=4
Morty Proxy This is a proxified and sanitized view of the page, visit original site.