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 # Host can contain a port (localhost:3306) or a separate DB_PORT option can be used.
44 DB_DATABASE=database_database
45 DB_USERNAME=database_username
46 DB_PASSWORD=database_user_password
49 # Can be 'smtp', 'mail' or 'sendmail'
52 # Mail sending options
53 MAIL_FROM=mail@bookstackapp.com
54 MAIL_FROM_NAME=BookStack
63 # Cache & Session driver to use
64 # Can be 'file', 'database', 'memcached' or 'redis'
68 # Session configuration
70 SESSION_COOKIE_NAME=bookstack_session
71 SESSION_SECURE_COOKIE=false
74 # Can be used to prevent conflicts multiple BookStack instances use the same store.
75 CACHE_PREFIX=bookstack
77 # Memcached server configuration
78 # If using a UNIX socket path for the host, set the port to 0
79 # This follows the following format: HOST:PORT:WEIGHT
80 # For multiple servers separate with a comma
81 MEMCACHED_SERVERS=127.0.0.1:11211:100
83 # Redis server configuration
84 # This follows the following format: HOST:PORT:DATABASE
85 # or, if using a password: HOST:PORT:DATABASE:PASSWORD
86 # For multiple servers separate with a comma. These will be clustered.
87 REDIS_SERVERS=127.0.0.1:6379:0
90 # Queue not really currently used but may be configurable in the future.
91 # Would advise not to change this for now.
94 # Storage system to use
95 # Can be 'local', 'local_secure' or 's3'
98 # Image storage system to use
99 # Defaults to the value of STORAGE_TYPE if unset.
100 # Accepts the same values as STORAGE_TYPE.
101 STORAGE_IMAGE_TYPE=local
103 # Attachment storage system to use
104 # Defaults to the value of STORAGE_TYPE if unset.
105 # Accepts the same values as STORAGE_TYPE although 'local' will be forced to 'local_secure'.
106 STORAGE_ATTACHMENT_TYPE=local_secure
108 # Amazon S3 storage configuration
109 STORAGE_S3_KEY=your-s3-key
110 STORAGE_S3_SECRET=your-s3-secret
111 STORAGE_S3_BUCKET=s3-bucket-name
112 STORAGE_S3_REGION=s3-bucket-region
114 # S3 endpoint to use for storage calls
115 # Only set this if using a non-Amazon s3-compatible service such as Minio
116 STORAGE_S3_ENDPOINT=https://my-custom-s3-compatible.service.com:8001
119 # Used as a base for any generated image urls.
120 # An s3-format URL will be generated if not set.
123 # Authentication method to use
124 # Can be 'standard' or 'ldap'
127 # Social authentication configuration
128 # All disabled by default.
129 # Refer to https://www.bookstackapp.com/docs/admin/third-party-auth/
132 AZURE_APP_SECRET=false
134 AZURE_AUTO_REGISTER=false
135 AZURE_AUTO_CONFIRM_EMAIL=false
138 DISCORD_APP_SECRET=false
139 DISCORD_AUTO_REGISTER=false
140 DISCORD_AUTO_CONFIRM_EMAIL=false
142 FACEBOOK_APP_ID=false
143 FACEBOOK_APP_SECRET=false
144 FACEBOOK_AUTO_REGISTER=false
145 FACEBOOK_AUTO_CONFIRM_EMAIL=false
148 GITHUB_APP_SECRET=false
149 GITHUB_AUTO_REGISTER=false
150 GITHUB_AUTO_CONFIRM_EMAIL=false
153 GITLAB_APP_SECRET=false
154 GITLAB_BASE_URI=false
155 GITLAB_AUTO_REGISTER=false
156 GITLAB_AUTO_CONFIRM_EMAIL=false
159 GOOGLE_APP_SECRET=false
160 GOOGLE_SELECT_ACCOUNT=false
161 GOOGLE_AUTO_REGISTER=false
162 GOOGLE_AUTO_CONFIRM_EMAIL=false
166 OKTA_APP_SECRET=false
167 OKTA_AUTO_REGISTER=false
168 OKTA_AUTO_CONFIRM_EMAIL=false
171 SLACK_APP_SECRET=false
172 SLACK_AUTO_REGISTER=false
173 SLACK_AUTO_CONFIRM_EMAIL=false
176 TWITCH_APP_SECRET=false
177 TWITCH_AUTO_REGISTER=false
178 TWITCH_AUTO_CONFIRM_EMAIL=false
181 TWITTER_APP_SECRET=false
182 TWITTER_AUTO_REGISTER=false
183 TWITTER_AUTO_CONFIRM_EMAIL=false
185 # LDAP authentication configuration
186 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
191 LDAP_USER_FILTER=false
193 LDAP_TLS_INSECURE=false
194 LDAP_EMAIL_ATTRIBUTE=mail
195 LDAP_DISPLAY_NAME_ATTRIBUTE=cn
196 LDAP_FOLLOW_REFERRALS=true
198 # LDAP group sync configuration
199 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
200 LDAP_USER_TO_GROUPS=false
201 LDAP_GROUP_ATTRIBUTE="memberOf"
202 LDAP_REMOVE_FROM_GROUPS=false
204 # Disable default third-party services such as Gravatar and Draw.IO
205 # Service-specific options will override this option
206 DISABLE_EXTERNAL_SERVICES=false
208 # Use custom avatar service, Sets fetch URL
209 # Possible placeholders: ${hash} ${size} ${email}
210 # If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
211 # Example: AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
214 # Enable Draw.io integration
217 # Default item listing view
218 # Used for public visitors and user's without a preference
219 # Can be 'list' or 'grid'
221 APP_VIEWS_BOOKSHELVES=grid
223 # Page revision limit
224 # Number of page revisions to keep in the system before deleting old revisions.
225 # If set to 'false' a limit will not be enforced.
228 # Allow <script> tags in page content
229 # Note, if set to 'true' the page editor may still escape scripts.
230 ALLOW_CONTENT_SCRIPTS=false
232 # Indicate if robots/crawlers should crawl your instance.
233 # Can be 'true', 'false' or 'null'.
234 # The behaviour of the default 'null' option will depend on the 'app-public' admin setting.
235 # Contents of the robots.txt file can be overridden, making this option obsolete.