]> BookStack Code Mirror - bookstack/blob - .env.example.complete
e28fedad9c58246ad2bc5cfc479ce780291bd707
[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_TABLE_PREFIX=
59 DB_USERNAME=database_username
60 DB_PASSWORD=database_user_password
61
62 # Mail system to use
63 # Can be 'smtp' or 'sendmail'
64 MAIL_DRIVER=smtp
65
66 # Mail sending options
67 [email protected]
68 MAIL_FROM_NAME=BookStack
69
70 # SMTP mail options
71 MAIL_HOST=localhost
72 MAIL_PORT=1025
73 MAIL_USERNAME=null
74 MAIL_PASSWORD=null
75 MAIL_ENCRYPTION=null
76
77 # Cache & Session driver to use
78 # Can be 'file', 'database', 'memcached' or 'redis'
79 CACHE_DRIVER=file
80 SESSION_DRIVER=file
81
82 # Session configuration
83 SESSION_LIFETIME=120
84 SESSION_COOKIE_NAME=bookstack_session
85 SESSION_SECURE_COOKIE=false
86
87 # Cache key prefix
88 # Can be used to prevent conflicts multiple BookStack instances use the same store.
89 CACHE_PREFIX=bookstack
90
91 # Memcached server configuration
92 # If using a UNIX socket path for the host, set the port to 0
93 # This follows the following format: HOST:PORT:WEIGHT
94 # For multiple servers separate with a comma
95 MEMCACHED_SERVERS=127.0.0.1:11211:100
96
97 # Redis server configuration
98 # This follows the following format: HOST:PORT:DATABASE
99 # or, if using a password: HOST:PORT:DATABASE:PASSWORD
100 # For multiple servers separate with a comma. These will be clustered.
101 REDIS_SERVERS=127.0.0.1:6379:0
102
103 # Queue driver to use
104 # Queue not really currently used but may be configurable in the future.
105 # Would advise not to change this for now.
106 QUEUE_CONNECTION=sync
107
108 # Storage system to use
109 # Can be 'local', 'local_secure' or 's3'
110 STORAGE_TYPE=local
111
112 # Image storage system to use
113 # Defaults to the value of STORAGE_TYPE if unset.
114 # Accepts the same values as STORAGE_TYPE.
115 STORAGE_IMAGE_TYPE=local
116
117 # Attachment storage system to use
118 # Defaults to the value of STORAGE_TYPE if unset.
119 # Accepts the same values as STORAGE_TYPE although 'local' will be forced to 'local_secure'.
120 STORAGE_ATTACHMENT_TYPE=local_secure
121
122 # Amazon S3 storage configuration
123 STORAGE_S3_KEY=your-s3-key
124 STORAGE_S3_SECRET=your-s3-secret
125 STORAGE_S3_BUCKET=s3-bucket-name
126 STORAGE_S3_REGION=s3-bucket-region
127
128 # S3 endpoint to use for storage calls
129 # Only set this if using a non-Amazon s3-compatible service such as Minio
130 STORAGE_S3_ENDPOINT=https://my-custom-s3-compatible.service.com:8001
131
132 # Storage URL prefix
133 # Used as a base for any generated image urls.
134 # An s3-format URL will be generated if not set.
135 STORAGE_URL=false
136
137 # Authentication method to use
138 # Can be 'standard', 'ldap' or 'saml2'
139 AUTH_METHOD=standard
140
141 # Social authentication configuration
142 # All disabled by default.
143 # Refer to https://www.bookstackapp.com/docs/admin/third-party-auth/
144
145 AZURE_APP_ID=false
146 AZURE_APP_SECRET=false
147 AZURE_TENANT=false
148 AZURE_AUTO_REGISTER=false
149 AZURE_AUTO_CONFIRM_EMAIL=false
150
151 DISCORD_APP_ID=false
152 DISCORD_APP_SECRET=false
153 DISCORD_AUTO_REGISTER=false
154 DISCORD_AUTO_CONFIRM_EMAIL=false
155
156 FACEBOOK_APP_ID=false
157 FACEBOOK_APP_SECRET=false
158 FACEBOOK_AUTO_REGISTER=false
159 FACEBOOK_AUTO_CONFIRM_EMAIL=false
160
161 GITHUB_APP_ID=false
162 GITHUB_APP_SECRET=false
163 GITHUB_AUTO_REGISTER=false
164 GITHUB_AUTO_CONFIRM_EMAIL=false
165
166 GITLAB_APP_ID=false
167 GITLAB_APP_SECRET=false
168 GITLAB_BASE_URI=false
169 GITLAB_AUTO_REGISTER=false
170 GITLAB_AUTO_CONFIRM_EMAIL=false
171
172 GOOGLE_APP_ID=false
173 GOOGLE_APP_SECRET=false
174 GOOGLE_SELECT_ACCOUNT=false
175 GOOGLE_AUTO_REGISTER=false
176 GOOGLE_AUTO_CONFIRM_EMAIL=false
177
178 OKTA_BASE_URL=false
179 OKTA_APP_ID=false
180 OKTA_APP_SECRET=false
181 OKTA_AUTO_REGISTER=false
182 OKTA_AUTO_CONFIRM_EMAIL=false
183
184 SLACK_APP_ID=false
185 SLACK_APP_SECRET=false
186 SLACK_AUTO_REGISTER=false
187 SLACK_AUTO_CONFIRM_EMAIL=false
188
189 TWITCH_APP_ID=false
190 TWITCH_APP_SECRET=false
191 TWITCH_AUTO_REGISTER=false
192 TWITCH_AUTO_CONFIRM_EMAIL=false
193
194 TWITTER_APP_ID=false
195 TWITTER_APP_SECRET=false
196 TWITTER_AUTO_REGISTER=false
197 TWITTER_AUTO_CONFIRM_EMAIL=false
198
199 # LDAP authentication configuration
200 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
201 LDAP_SERVER=false
202 LDAP_BASE_DN=false
203 LDAP_DN=false
204 LDAP_PASS=false
205 LDAP_USER_FILTER=false
206 LDAP_VERSION=false
207 LDAP_START_TLS=false
208 LDAP_TLS_INSECURE=false
209 LDAP_ID_ATTRIBUTE=uid
210 LDAP_EMAIL_ATTRIBUTE=mail
211 LDAP_DISPLAY_NAME_ATTRIBUTE=cn
212 LDAP_THUMBNAIL_ATTRIBUTE=null
213 LDAP_FOLLOW_REFERRALS=true
214 LDAP_DUMP_USER_DETAILS=false
215
216 # LDAP group sync configuration
217 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
218 LDAP_USER_TO_GROUPS=false
219 LDAP_GROUP_ATTRIBUTE="memberOf"
220 LDAP_REMOVE_FROM_GROUPS=false
221
222 # SAML authentication configuration
223 # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/
224 SAML2_NAME=SSO
225 SAML2_EMAIL_ATTRIBUTE=email
226 SAML2_DISPLAY_NAME_ATTRIBUTES=username
227 SAML2_EXTERNAL_ID_ATTRIBUTE=null
228 SAML2_IDP_ENTITYID=null
229 SAML2_IDP_SSO=null
230 SAML2_IDP_SLO=null
231 SAML2_IDP_x509=null
232 SAML2_ONELOGIN_OVERRIDES=null
233 SAML2_DUMP_USER_DETAILS=false
234 SAML2_AUTOLOAD_METADATA=false
235 SAML2_IDP_AUTHNCONTEXT=true
236
237 # SAML group sync configuration
238 # Refer to https://www.bookstackapp.com/docs/admin/saml2-auth/
239 SAML2_USER_TO_GROUPS=false
240 SAML2_GROUP_ATTRIBUTE=group
241 SAML2_REMOVE_FROM_GROUPS=false
242
243 # Disable default third-party services such as Gravatar and Draw.IO
244 # Service-specific options will override this option
245 DISABLE_EXTERNAL_SERVICES=false
246
247 # Use custom avatar service, Sets fetch URL
248 # Possible placeholders: ${hash} ${size} ${email}
249 # If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
250 # Example: AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
251 AVATAR_URL=
252
253 # Enable diagrams.net integration
254 # Can simply be true/false to enable/disable the integration.
255 # Alternatively, It can be URL to the diagrams.net instance you want to use.
256 # For URLs, The following URL parameters should be included: embed=1&proto=json&spin=1
257 DRAWIO=true
258
259 # Default item listing view
260 # Used for public visitors and user's without a preference.
261 # Can be 'list' or 'grid'.
262 APP_VIEWS_BOOKS=list
263 APP_VIEWS_BOOKSHELVES=grid
264 APP_VIEWS_BOOKSHELF=grid
265
266 # Use dark mode by default
267 # Will be overriden by any user/session preference.
268 APP_DEFAULT_DARK_MODE=false
269
270 # Page revision limit
271 # Number of page revisions to keep in the system before deleting old revisions.
272 # If set to 'false' a limit will not be enforced.
273 REVISION_LIMIT=50
274
275 # Recycle Bin Lifetime
276 # The number of days that content will remain in the recycle bin before
277 # being considered for auto-removal. It is not a guarantee that content will
278 # be removed after this time.
279 # Set to 0 for no recycle bin functionality.
280 # Set to -1 for unlimited recycle bin lifetime.
281 RECYCLE_BIN_LIFETIME=30
282
283 # Allow <script> tags in page content
284 # Note, if set to 'true' the page editor may still escape scripts.
285 ALLOW_CONTENT_SCRIPTS=false
286
287 # Indicate if robots/crawlers should crawl your instance.
288 # Can be 'true', 'false' or 'null'.
289 # The behaviour of the default 'null' option will depend on the 'app-public' admin setting.
290 # Contents of the robots.txt file can be overridden, making this option obsolete.
291 ALLOW_ROBOTS=null
292
293 # Allow server-side fetches to be performed to potentially unknown
294 # and user-provided locations. Primarily used in exports when loading
295 # in externally referenced assets.
296 # Can be 'true' or 'false'.
297 ALLOW_UNTRUSTED_SERVER_FETCHING=false
298
299 # A list of hosts that BookStack can be iframed within.
300 # Space separated if multiple. BookStack host domain is auto-inferred.
301 # For Example: ALLOWED_IFRAME_HOSTS="https://example.com https://a.example.com"
302 # Setting this option will also auto-adjust cookies to be SameSite=None.
303 ALLOWED_IFRAME_HOSTS=null
304
305 # The default and maximum item-counts for listing API requests.
306 API_DEFAULT_ITEM_COUNT=100
307 API_MAX_ITEM_COUNT=500
308
309 # The number of API requests that can be made per minute by a single user.
310 API_REQUESTS_PER_MIN=180
311
312 # Enable the logging of failed email+password logins with the given message.
313 # The default log channel below uses the php 'error_log' function which commonly
314 # results in messages being output to the webserver error logs.
315 # The message can contain a %u parameter which will be replaced with the login
316 # user identifier (Username or email).
317 LOG_FAILED_LOGIN_MESSAGE=false
318 LOG_FAILED_LOGIN_CHANNEL=errorlog_plain_webserver