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 # Amazon S3 storage configuration
99 STORAGE_S3_KEY=your-s3-key
100 STORAGE_S3_SECRET=your-s3-secret
101 STORAGE_S3_BUCKET=s3-bucket-name
102 STORAGE_S3_REGION=s3-bucket-region
104 # S3 endpoint to use for storage calls
105 # Only set this if using a non-Amazon s3-compatible service such as Minio
106 STORAGE_S3_ENDPOINT=https://my-custom-s3-compatible.service.com:8001
109 # Used as a base for any generated image urls.
110 # An s3-format URL will be generated if not set.
113 # Authentication method to use
114 # Can be 'standard' or 'ldap'
117 # Social authentication configuration
118 # All disabled by default.
119 # Refer to https://www.bookstackapp.com/docs/admin/third-party-auth/
122 AZURE_APP_SECRET=false
124 AZURE_AUTO_REGISTER=false
125 AZURE_AUTO_CONFIRM_EMAIL=false
128 DISCORD_APP_SECRET=false
129 DISCORD_AUTO_REGISTER=false
130 DISCORD_AUTO_CONFIRM_EMAIL=false
132 FACEBOOK_APP_ID=false
133 FACEBOOK_APP_SECRET=false
134 FACEBOOK_AUTO_REGISTER=false
135 FACEBOOK_AUTO_CONFIRM_EMAIL=false
138 GITHUB_APP_SECRET=false
139 GITHUB_AUTO_REGISTER=false
140 GITHUB_AUTO_CONFIRM_EMAIL=false
143 GITLAB_APP_SECRET=false
144 GITLAB_BASE_URI=false
145 GITLAB_AUTO_REGISTER=false
146 GITLAB_AUTO_CONFIRM_EMAIL=false
149 GOOGLE_APP_SECRET=false
150 GOOGLE_SELECT_ACCOUNT=false
151 GOOGLE_AUTO_REGISTER=false
152 GOOGLE_AUTO_CONFIRM_EMAIL=false
156 OKTA_APP_SECRET=false
157 OKTA_AUTO_REGISTER=false
158 OKTA_AUTO_CONFIRM_EMAIL=false
161 SLACK_APP_SECRET=false
162 SLACK_AUTO_REGISTER=false
163 SLACK_AUTO_CONFIRM_EMAIL=false
166 TWITCH_APP_SECRET=false
167 TWITCH_AUTO_REGISTER=false
168 TWITCH_AUTO_CONFIRM_EMAIL=false
171 TWITTER_APP_SECRET=false
172 TWITTER_AUTO_REGISTER=false
173 TWITTER_AUTO_CONFIRM_EMAIL=false
175 # LDAP authentication configuration
176 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
181 LDAP_USER_FILTER=false
183 LDAP_TLS_INSECURE=false
184 LDAP_EMAIL_ATTRIBUTE=mail
185 LDAP_DISPLAY_NAME_ATTRIBUTE=cn
186 LDAP_FOLLOW_REFERRALS=true
188 # LDAP group sync configuration
189 # Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
190 LDAP_USER_TO_GROUPS=false
191 LDAP_GROUP_ATTRIBUTE="memberOf"
192 LDAP_REMOVE_FROM_GROUPS=false
194 # Disable default third-party services such as Gravatar and Draw.IO
195 # Service-specific options will override this option
196 DISABLE_EXTERNAL_SERVICES=false
198 # Use custom avatar service, Sets fetch URL
199 # Possible placeholders: ${hash} ${size} ${email}
200 # If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
201 # Example: AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
204 # Enable Draw.io integration
207 # Default item listing view
208 # Used for public visitors and user's without a preference
209 # Can be 'list' or 'grid'
211 APP_VIEWS_BOOKSHELVES=grid
213 # Page revision limit
214 # Number of page revisions to keep in the system before deleting old revisions.
215 # If set to 'false' a limit will not be enforced.
218 # Allow <script> tags in page content
219 # Note, if set to 'true' the page editor may still escape scripts.
220 ALLOW_CONTENT_SCRIPTS=false
222 # Indicate if robots/crawlers should crawl your instance.
223 # Can be 'true', 'false' or 'null'.
224 # The behaviour of the default 'null' option will depend on the 'app-public' admin setting.
225 # Contents of the robots.txt file can be overridden, making this option obsolete.