.env.production.sample 8.3 KB
Newer Older
1
# Service dependencies
2
# You may set REDIS_URL instead for more advanced options
3
# You may also set REDIS_NAMESPACE to share Redis between multiple Mastodon servers
4
REDIS_HOST=redis
5
REDIS_PORT=6379
abcang's avatar
abcang committed
6
# You may set DATABASE_URL instead for more advanced options
7 8 9 10 11
DB_HOST=db
DB_USER=postgres
DB_NAME=postgres
DB_PASS=
DB_PORT=5432
12 13
# Optional ElasticSearch configuration
# ES_ENABLED=true
14
# ES_HOST=es
15
# ES_PORT=9200
16 17

# Federation
18
# Note: Changing LOCAL_DOMAIN at a later time will cause unwanted side effects, including breaking all existing federation.
19
# LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com.
20
LOCAL_DOMAIN=example.com
21 22

# Changing LOCAL_HTTPS in production is no longer supported. (Mastodon will always serve https:// links)
23

24
# Use this only if you need to run mastodon on a different domain than the one used for federation.
25 26
# You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md
# DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING.
27 28
# WEB_DOMAIN=mastodon.example.com

29 30 31 32 33
# Use this if you want to have several aliases handler@example1.com
# handler@example2.com etc. for the same user. LOCAL_DOMAIN should not
# be added. Comma separated values
# ALTERNATE_DOMAINS=example1.com,example2.com

34
# Application secrets
35
# Generate each with the `RAILS_ENV=production bundle exec rake secret` task (`docker-compose run --rm web rake secret` if you use docker compose)
36
SECRET_KEY_BASE=
Eugen Rochko's avatar
Eugen Rochko committed
37
OTP_SECRET=
38

39 40 41 42 43
# VAPID keys (used for push notifications
# You can generate the keys using the following command (first is the private key, second is the public one)
# You should only generate this once per instance. If you later decide to change it, all push subscription will
# be invalidated, requiring the users to access the website again to resubscribe.
#
44
# Generate with `RAILS_ENV=production bundle exec rake mastodon:webpush:generate_vapid_key` task (`docker-compose run --rm web rake mastodon:webpush:generate_vapid_key` if you use docker compose)
45 46 47 48 49
#
# For more information visit https://rossta.net/blog/using-the-web-push-api-with-vapid.html
VAPID_PRIVATE_KEY=
VAPID_PUBLIC_KEY=

Eugen Rochko's avatar
Eugen Rochko committed
50 51 52 53 54
# Registrations
# Single user mode will disable registrations and redirect frontpage to the first profile
# SINGLE_USER_MODE=true
# Prevent registrations with following e-mail domains
# EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc
Pete Keen's avatar
Pete Keen committed
55 56
# Only allow registrations with the following e-mail domains
# EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc
Eugen Rochko's avatar
Eugen Rochko committed
57

58 59 60
# Optionally change default language
# DEFAULT_LOCALE=de

61
# E-mail configuration
62
# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers
63
# If you want to use an SMTP server without authentication (e.g local Postfix relay)
64
# then set SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE to 'none' and
65
# *comment* SMTP_LOGIN and SMTP_PASSWORD (leaving them blank is not enough).
66 67 68 69 70
SMTP_SERVER=smtp.mailgun.org
SMTP_PORT=587
SMTP_LOGIN=
SMTP_PASSWORD=
SMTP_FROM_ADDRESS=notifications@example.com
71
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
72
#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail
73
#SMTP_AUTH_METHOD=plain
74
#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
75 76
#SMTP_OPENSSL_VERIFY_MODE=peer
#SMTP_ENABLE_STARTTLS_AUTO=true
77
#SMTP_TLS=true
78

79 80 81 82
# Optional user upload path and URL (images, avatars). Default is :rails_root/public/system. If you set this variable, you are responsible for making your HTTP server (eg. nginx) serve these files.
# PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system
# PAPERCLIP_ROOT_URL=/system

83
# Optional asset host for multi-server setups
84 85 86 87
# The asset host must allow cross origin request from WEB_DOMAIN or LOCAL_DOMAIN
# if WEB_DOMAIN is not set. For example, the server may have the
# following header field:
# Access-Control-Allow-Origin: https://example.com/
88
# CDN_HOST=https://assets.example.com
89 90

# S3 (optional)
91 92 93 94
# The attachment host must allow cross origin request from WEB_DOMAIN or
# LOCAL_DOMAIN if WEB_DOMAIN is not set. For example, the server may have the
# following header field:
# Access-Control-Allow-Origin: https://192.168.1.123:9000/
Eugen Rochko's avatar
Eugen Rochko committed
95 96 97 98 99
# S3_ENABLED=true
# S3_BUCKET=
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=
# S3_REGION=
leopku's avatar
leopku committed
100 101
# S3_PROTOCOL=http
# S3_HOSTNAME=192.168.1.123:9000
Eugen Rochko's avatar
Eugen Rochko committed
102

103
# S3 (Minio Config (optional) Please check Minio instance for details)
104 105
# The attachment host must allow cross origin request - see the description
# above.
106 107 108 109 110 111 112 113
# S3_ENABLED=true
# S3_BUCKET=
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=
# S3_REGION=
# S3_PROTOCOL=https
# S3_HOSTNAME=
# S3_ENDPOINT=
114
# S3_SIGNATURE_VERSION=
115

116
# Swift (optional)
117 118
# The attachment host must allow cross origin request - see the description
# above.
119 120
# SWIFT_ENABLED=true
# SWIFT_USERNAME=
121
# For Keystone V3, the value for SWIFT_TENANT should be the project name
122 123
# SWIFT_TENANT=
# SWIFT_PASSWORD=
124 125
# Some OpenStack V3 providers require PROJECT_ID (optional)
# SWIFT_PROJECT_ID=
126 127
# Keystone V2 and V3 URLs are supported. Use a V3 URL if possible to avoid
# issues with token rate-limiting during high load.
128 129 130
# SWIFT_AUTH_URL=
# SWIFT_CONTAINER=
# SWIFT_OBJECT_URL=
131 132 133 134 135
# SWIFT_REGION=
# Defaults to 'default'
# SWIFT_DOMAIN_NAME=
# Defaults to 60 seconds. Set to 0 to disable
# SWIFT_CACHE_TTL=
136

137 138
# Optional alias for S3 (e.g. to serve files on a custom domain, possibly using Cloudfront or Cloudflare)
# S3_ALIAS_HOST=
Eugen Rochko's avatar
Eugen Rochko committed
139

140 141
# Streaming API integration
# STREAMING_API_BASE_URL=
142 143 144 145

# Advanced settings
# If you need to use pgBouncer, you need to disable prepared statements:
# PREPARED_STATEMENTS=false
146 147 148 149

# Cluster number setting for streaming API server.
# If you comment out following line, cluster number will be `numOfCpuCores - 1`.
STREAMING_CLUSTER_NUM=1
150 151 152 153 154

# Docker mastodon user
# If you use Docker, you may want to assign UID/GID manually.
# UID=1000
# GID=1000
155

156 157 158 159 160 161 162 163 164
# LDAP authentication (optional)
# LDAP_ENABLED=true
# LDAP_HOST=localhost
# LDAP_PORT=389
# LDAP_METHOD=simple_tls
# LDAP_BASE=
# LDAP_BIND_DN=
# LDAP_PASSWORD=
# LDAP_UID=cn
Immae's avatar
Immae committed
165
# LDAP_SEARCH_FILTER="%{uid}=%{email}"
166

167
# PAM authentication (optional)
168 169 170 171
# PAM authentication uses for the email generation the "email" pam variable
# and optional as fallback PAM_DEFAULT_SUFFIX
# The pam environment variable "email" is provided by:
# https://github.com/devkral/pam_email_extractor
172
# PAM_ENABLED=true
173 174
# Fallback email domain for email address generation (LOCAL_DOMAIN by default)
# PAM_EMAIL_DOMAIN=example.com
175 176
# Name of the pam service (pam "auth" section is evaluated)
# PAM_DEFAULT_SERVICE=rpam
177
# Name of the pam service used for checking if an user can register (pam "account" section is evaluated) (nil (disabled) by default)
178 179
# PAM_CONTROLLED_SERVICE=rpam

180 181 182 183
# Global OAuth settings (optional) :
# If you have only one strategy, you may want to enable this
# OAUTH_REDIRECT_AT_SIGN_IN=true

184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
# Optional CAS authentication (cf. omniauth-cas) :
# CAS_ENABLED=true
# CAS_URL=https://sso.myserver.com/
# CAS_HOST=sso.myserver.com/
# CAS_PORT=443
# CAS_SSL=true
# CAS_VALIDATE_URL=
# CAS_CALLBACK_URL=
# CAS_LOGOUT_URL=
# CAS_LOGIN_URL=
# CAS_UID_FIELD='user'
# CAS_CA_PATH=
# CAS_DISABLE_SSL_VERIFICATION=false
# CAS_UID_KEY='user'
# CAS_NAME_KEY='name'
# CAS_EMAIL_KEY='email'
# CAS_NICKNAME_KEY='nickname'
# CAS_FIRST_NAME_KEY='firstname'
# CAS_LAST_NAME_KEY='lastname'
# CAS_LOCATION_KEY='location'
# CAS_IMAGE_KEY='image'
# CAS_PHONE_KEY='phone'

# Optional SAML authentication (cf. omniauth-saml)
# SAML_ENABLED=true
# SAML_ACS_URL=
Eugen Rochko's avatar
Eugen Rochko committed
210
# SAML_ISSUER=http://localhost:3000/auth/auth/saml/callback
211 212 213 214 215 216 217 218
# SAML_IDP_SSO_TARGET_URL=https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO
# SAML_IDP_CERT=
# SAML_IDP_CERT_FINGERPRINT=
# SAML_NAME_IDENTIFIER_FORMAT=
# SAML_CERT=
# SAML_PRIVATE_KEY=
# SAML_SECURITY_WANT_ASSERTION_SIGNED=true
# SAML_SECURITY_WANT_ASSERTION_ENCRYPTED=true
219
# SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED=true
220 221
# SAML_ATTRIBUTES_STATEMENTS_UID="urn:oid:0.9.2342.19200300.100.1.1"
# SAML_ATTRIBUTES_STATEMENTS_EMAIL="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"
222 223 224
# SAML_ATTRIBUTES_STATEMENTS_FULL_NAME="urn:oid:2.16.840.1.113730.3.1.241"
# SAML_ATTRIBUTES_STATEMENTS_FIRST_NAME="urn:oid:2.5.4.42"
# SAML_ATTRIBUTES_STATEMENTS_LAST_NAME="urn:oid:2.5.4.4"
225
# SAML_UID_ATTRIBUTE="urn:oid:0.9.2342.19200300.100.1.1"
226 227
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED=
# SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL=
228 229 230 231 232

# Use HTTP proxy for outgoing request (optional)
# http_proxy=http://gateway.local:8118
# Access control for hidden service.
# ALLOW_ACCESS_TO_HIDDEN_SERVICE=true