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