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