|
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 |
6 | | -# You may set DATABASE_URL instead for more advanced options |
7 | | -DB_HOST=db |
8 | | -DB_USER=postgres |
9 | | -DB_NAME=postgres |
10 | | -DB_PASS= |
11 | | -DB_PORT=5432 |
12 | | -# Optional ElasticSearch configuration |
13 | | -# You may also set ES_PREFIX to share the same cluster between multiple Mastodon servers (falls back to REDIS_NAMESPACE if not set) |
14 | | -# ES_ENABLED=true |
15 | | -# ES_HOST=es |
16 | | -# ES_PORT=9200 |
| 1 | +# This is a sample configuration file. You can generate your configuration |
| 2 | +# with the `rake mastodon:setup` interactive setup wizard, but to customize |
| 3 | +# your setup even further, you'll need to edit it manually. This sample does |
| 4 | +# not demonstrate all available configuration options. Please look at |
| 5 | +# https://docs.joinmastodon.org/admin/config/ for the full documentation. |
| 6 | + |
| 7 | +# Note that this file accepts slightly different syntax depending on whether |
| 8 | +# you are using `docker-compose` or not. In particular, if you use |
| 9 | +# `docker-compose`, the value of each declared variable will be taken verbatim, |
| 10 | +# including surrounding quotes. |
| 11 | +# See: https://github.com/mastodon/mastodon/issues/16895 |
17 | 12 |
|
18 | 13 | # Federation |
19 | | -# Note: Changing LOCAL_DOMAIN at a later time will cause unwanted side effects, including breaking all existing federation. |
20 | | -# LOCAL_DOMAIN should *NOT* contain the protocol part of the domain e.g https://example.com. |
| 14 | +# ---------- |
| 15 | +# This identifies your server and cannot be changed safely later |
| 16 | +# ---------- |
21 | 17 | LOCAL_DOMAIN=example.com |
22 | 18 |
|
23 | | -# Changing LOCAL_HTTPS in production is no longer supported. (Mastodon will always serve https:// links) |
24 | | - |
25 | | -# Use this only if you need to run mastodon on a different domain than the one used for federation. |
26 | | -# You can read more about this option on https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Serving_a_different_domain.md |
27 | | -# DO *NOT* USE THIS UNLESS YOU KNOW *EXACTLY* WHAT YOU ARE DOING. |
28 | | -# WEB_DOMAIN=mastodon.example.com |
| 19 | +# Redis |
| 20 | +# ----- |
| 21 | +REDIS_HOST=localhost |
| 22 | +REDIS_PORT=6379 |
29 | 23 |
|
30 | | -# Use this if you want to have several aliases [email protected] |
31 | | -# [email protected] etc. for the same user. LOCAL_DOMAIN should not |
32 | | -# be added. Comma separated values |
33 | | -# ALTERNATE_DOMAINS=example1.com,example2.com |
| 24 | +# PostgreSQL |
| 25 | +# ---------- |
| 26 | +DB_HOST=/var/run/postgresql |
| 27 | +DB_USER=mastodon |
| 28 | +DB_NAME=mastodon_production |
| 29 | +DB_PASS= |
| 30 | +DB_PORT=5432 |
34 | 31 |
|
35 | | -# Application secrets |
36 | | -# Generate each with the `RAILS_ENV=production bundle exec rake secret` task (`docker-compose run --rm web bundle exec rake secret` if you use docker compose) |
| 32 | +# Elasticsearch (optional) |
| 33 | +# ------------------------ |
| 34 | +ES_ENABLED=true |
| 35 | +ES_HOST=localhost |
| 36 | +ES_PORT=9200 |
| 37 | +# Authentication for ES (optional) |
| 38 | +ES_USER=elastic |
| 39 | +ES_PASS=password |
| 40 | + |
| 41 | +# Secrets |
| 42 | +# ------- |
| 43 | +# Make sure to use `rake secret` to generate secrets |
| 44 | +# ------- |
37 | 45 | SECRET_KEY_BASE= |
38 | 46 | OTP_SECRET= |
39 | 47 |
|
40 | | -# VAPID keys (used for push notifications |
41 | | -# You can generate the keys using the following command (first is the private key, second is the public one) |
42 | | -# You should only generate this once per instance. If you later decide to change it, all push subscription will |
43 | | -# be invalidated, requiring the users to access the website again to resubscribe. |
44 | | -# |
45 | | -# Generate with `RAILS_ENV=production bundle exec rake mastodon:webpush:generate_vapid_key` task (`docker-compose run --rm web bundle exec rake mastodon:webpush:generate_vapid_key` if you use docker compose) |
46 | | -# |
47 | | -# For more information visit https://rossta.net/blog/using-the-web-push-api-with-vapid.html |
| 48 | +# Web Push |
| 49 | +# -------- |
| 50 | +# Generate with `rake mastodon:webpush:generate_vapid_key` |
| 51 | +# -------- |
48 | 52 | VAPID_PRIVATE_KEY= |
49 | 53 | VAPID_PUBLIC_KEY= |
50 | 54 |
|
51 | | -# Registrations |
52 | | -# Single user mode will disable registrations and redirect frontpage to the first profile |
53 | | -# SINGLE_USER_MODE=true |
54 | | -# Prevent registrations with following e-mail domains |
55 | | -# EMAIL_DOMAIN_BLACKLIST=example1.com|example2.de|etc |
56 | | -# Only allow registrations with the following e-mail domains |
57 | | -# EMAIL_DOMAIN_WHITELIST=example1.com|example2.de|etc |
58 | | - |
59 | | -# Optionally change default language |
60 | | -# DEFAULT_LOCALE=de |
61 | | - |
62 | | -# E-mail configuration |
63 | | -# Note: Mailgun and SparkPost (https://sparkpo.st/smtp) each have good free tiers |
64 | | -# If you want to use an SMTP server without authentication (e.g local Postfix relay) |
65 | | -# then set SMTP_AUTH_METHOD and SMTP_OPENSSL_VERIFY_MODE to 'none' and |
66 | | -# *comment* SMTP_LOGIN and SMTP_PASSWORD (leaving them blank is not enough). |
| 55 | +# Sending mail |
| 56 | +# ------------ |
67 | 57 | SMTP_SERVER=smtp.mailgun.org |
68 | 58 | SMTP_PORT=587 |
69 | 59 | SMTP_LOGIN= |
70 | 60 | SMTP_PASSWORD= |
71 | 61 | SMTP_FROM_ADDRESS=[email protected] |
72 | | -#SMTP_REPLY_TO= |
73 | | -#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN |
74 | | -#SMTP_DELIVERY_METHOD=smtp # delivery method can also be sendmail |
75 | | -#SMTP_AUTH_METHOD=plain |
76 | | -#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt |
77 | | -#SMTP_OPENSSL_VERIFY_MODE=peer |
78 | | -#SMTP_ENABLE_STARTTLS_AUTO=true |
79 | | -#SMTP_TLS=true |
80 | | - |
81 | | -# 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. |
82 | | -# PAPERCLIP_ROOT_PATH=/var/lib/mastodon/public-system |
83 | | -# PAPERCLIP_ROOT_URL=/system |
84 | | - |
85 | | -# Optional asset host for multi-server setups |
86 | | -# The asset host must allow cross origin request from WEB_DOMAIN or LOCAL_DOMAIN |
87 | | -# if WEB_DOMAIN is not set. For example, the server may have the |
88 | | -# following header field: |
89 | | -# Access-Control-Allow-Origin: https://example.com/ |
90 | | -# CDN_HOST=https://assets.example.com |
91 | | - |
92 | | -# S3 (optional) |
93 | | -# The attachment host must allow cross origin request from WEB_DOMAIN or |
94 | | -# LOCAL_DOMAIN if WEB_DOMAIN is not set. For example, the server may have the |
95 | | -# following header field: |
96 | | -# Access-Control-Allow-Origin: https://192.168.1.123:9000/ |
97 | | -# S3_ENABLED=true |
98 | | -# S3_BUCKET= |
99 | | -# AWS_ACCESS_KEY_ID= |
100 | | -# AWS_SECRET_ACCESS_KEY= |
101 | | -# S3_REGION= |
102 | | -# S3_PROTOCOL=http |
103 | | -# S3_HOSTNAME=192.168.1.123:9000 |
104 | | - |
105 | | -# S3 (Minio Config (optional) Please check Minio instance for details) |
106 | | -# The attachment host must allow cross origin request - see the description |
107 | | -# above. |
108 | | -# S3_ENABLED=true |
109 | | -# S3_BUCKET= |
110 | | -# AWS_ACCESS_KEY_ID= |
111 | | -# AWS_SECRET_ACCESS_KEY= |
112 | | -# S3_REGION= |
113 | | -# S3_PROTOCOL=https |
114 | | -# S3_HOSTNAME= |
115 | | -# S3_ENDPOINT= |
116 | | -# S3_SIGNATURE_VERSION= |
117 | | - |
118 | | -# Google Cloud Storage (optional) |
119 | | -# Use S3 compatible API. Since GCS does not support Multipart Upload, |
120 | | -# increase the value of S3_MULTIPART_THRESHOLD to disable Multipart Upload. |
121 | | -# The attachment host must allow cross origin request - see the description |
122 | | -# above. |
123 | | -# S3_ENABLED=true |
124 | | -# AWS_ACCESS_KEY_ID= |
125 | | -# AWS_SECRET_ACCESS_KEY= |
126 | | -# S3_REGION= |
127 | | -# S3_PROTOCOL=https |
128 | | -# S3_HOSTNAME=storage.googleapis.com |
129 | | -# S3_ENDPOINT=https://storage.googleapis.com |
130 | | -# S3_MULTIPART_THRESHOLD=52428801 # 50.megabytes |
131 | | - |
132 | | -# Swift (optional) |
133 | | -# The attachment host must allow cross origin request - see the description |
134 | | -# above. |
135 | | -# SWIFT_ENABLED=true |
136 | | -# SWIFT_USERNAME= |
137 | | -# For Keystone V3, the value for SWIFT_TENANT should be the project name |
138 | | -# SWIFT_TENANT= |
139 | | -# SWIFT_PASSWORD= |
140 | | -# Some OpenStack V3 providers require PROJECT_ID (optional) |
141 | | -# SWIFT_PROJECT_ID= |
142 | | -# Keystone V2 and V3 URLs are supported. Use a V3 URL if possible to avoid |
143 | | -# issues with token rate-limiting during high load. |
144 | | -# SWIFT_AUTH_URL= |
145 | | -# SWIFT_CONTAINER= |
146 | | -# SWIFT_OBJECT_URL= |
147 | | -# SWIFT_REGION= |
148 | | -# Defaults to 'default' |
149 | | -# SWIFT_DOMAIN_NAME= |
150 | | -# Defaults to 60 seconds. Set to 0 to disable |
151 | | -# SWIFT_CACHE_TTL= |
152 | | - |
153 | | -# Optional alias for S3 (e.g. to serve files on a custom domain, possibly using Cloudfront or Cloudflare) |
154 | | -# S3_ALIAS_HOST= |
155 | | - |
156 | | -# Streaming API integration |
157 | | -# STREAMING_API_BASE_URL= |
158 | | - |
159 | | -# Advanced settings |
160 | | -# If you need to use pgBouncer, you need to disable prepared statements: |
161 | | -# PREPARED_STATEMENTS=false |
162 | | - |
163 | | -# Cluster number setting for streaming API server. |
164 | | -# If you comment out following line, cluster number will be `numOfCpuCores - 1`. |
165 | | -STREAMING_CLUSTER_NUM=1 |
166 | | - |
167 | | -# Docker mastodon user |
168 | | -# If you use Docker, you may want to assign UID/GID manually. |
169 | | -# UID=1000 |
170 | | -# GID=1000 |
171 | | - |
172 | | -# LDAP authentication (optional) |
173 | | -# LDAP_ENABLED=true |
174 | | -# LDAP_HOST=localhost |
175 | | -# LDAP_PORT=389 |
176 | | -# LDAP_METHOD=simple_tls |
177 | | -# LDAP_BASE= |
178 | | -# LDAP_BIND_DN= |
179 | | -# LDAP_PASSWORD= |
180 | | -# LDAP_UID=cn |
181 | | -# LDAP_MAIL=mail |
182 | | -# LDAP_SEARCH_FILTER=(|(%{uid}=%{email})(%{mail}=%{email})) |
183 | | -# LDAP_UID_CONVERSION_ENABLED=true |
184 | | -# LDAP_UID_CONVERSION_SEARCH=., - |
185 | | -# LDAP_UID_CONVERSION_REPLACE=_ |
186 | | - |
187 | | -# PAM authentication (optional) |
188 | | -# PAM authentication uses for the email generation the "email" pam variable |
189 | | -# and optional as fallback PAM_DEFAULT_SUFFIX |
190 | | -# The pam environment variable "email" is provided by: |
191 | | -# https://github.com/devkral/pam_email_extractor |
192 | | -# PAM_ENABLED=true |
193 | | -# Fallback email domain for email address generation (LOCAL_DOMAIN by default) |
194 | | -# PAM_EMAIL_DOMAIN=example.com |
195 | | -# Name of the pam service (pam "auth" section is evaluated) |
196 | | -# PAM_DEFAULT_SERVICE=rpam |
197 | | -# Name of the pam service used for checking if an user can register (pam "account" section is evaluated) (nil (disabled) by default) |
198 | | -# PAM_CONTROLLED_SERVICE=rpam |
199 | | - |
200 | | -# Global OAuth settings (optional) : |
201 | | -# If you have only one strategy, you may want to enable this |
202 | | -# OAUTH_REDIRECT_AT_SIGN_IN=true |
203 | | - |
204 | | -# Optional CAS authentication (cf. omniauth-cas) : |
205 | | -# CAS_ENABLED=true |
206 | | -# CAS_URL=https://sso.myserver.com/ |
207 | | -# CAS_HOST=sso.myserver.com/ |
208 | | -# CAS_PORT=443 |
209 | | -# CAS_SSL=true |
210 | | -# CAS_VALIDATE_URL= |
211 | | -# CAS_CALLBACK_URL= |
212 | | -# CAS_LOGOUT_URL= |
213 | | -# CAS_LOGIN_URL= |
214 | | -# CAS_UID_FIELD='user' |
215 | | -# CAS_CA_PATH= |
216 | | -# CAS_DISABLE_SSL_VERIFICATION=false |
217 | | -# CAS_UID_KEY='user' |
218 | | -# CAS_NAME_KEY='name' |
219 | | -# CAS_EMAIL_KEY='email' |
220 | | -# CAS_NICKNAME_KEY='nickname' |
221 | | -# CAS_FIRST_NAME_KEY='firstname' |
222 | | -# CAS_LAST_NAME_KEY='lastname' |
223 | | -# CAS_LOCATION_KEY='location' |
224 | | -# CAS_IMAGE_KEY='image' |
225 | | -# CAS_PHONE_KEY='phone' |
226 | | - |
227 | | -# Optional SAML authentication (cf. omniauth-saml) |
228 | | -# SAML_ENABLED=true |
229 | | -# SAML_ACS_URL=http://localhost:3000/auth/auth/saml/callback |
230 | | -# SAML_ISSUER=https://example.com |
231 | | -# SAML_IDP_SSO_TARGET_URL=https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO |
232 | | -# SAML_IDP_CERT= |
233 | | -# SAML_IDP_CERT_FINGERPRINT= |
234 | | -# SAML_NAME_IDENTIFIER_FORMAT= |
235 | | -# SAML_CERT= |
236 | | -# SAML_PRIVATE_KEY= |
237 | | -# SAML_SECURITY_WANT_ASSERTION_SIGNED=true |
238 | | -# SAML_SECURITY_WANT_ASSERTION_ENCRYPTED=true |
239 | | -# SAML_SECURITY_ASSUME_EMAIL_IS_VERIFIED=true |
240 | | -# SAML_ATTRIBUTES_STATEMENTS_UID="urn:oid:0.9.2342.19200300.100.1.1" |
241 | | -# SAML_ATTRIBUTES_STATEMENTS_EMAIL="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" |
242 | | -# SAML_ATTRIBUTES_STATEMENTS_FULL_NAME="urn:oid:2.16.840.1.113730.3.1.241" |
243 | | -# SAML_ATTRIBUTES_STATEMENTS_FIRST_NAME="urn:oid:2.5.4.42" |
244 | | -# SAML_ATTRIBUTES_STATEMENTS_LAST_NAME="urn:oid:2.5.4.4" |
245 | | -# SAML_UID_ATTRIBUTE="urn:oid:0.9.2342.19200300.100.1.1" |
246 | | -# SAML_ATTRIBUTES_STATEMENTS_VERIFIED= |
247 | | -# SAML_ATTRIBUTES_STATEMENTS_VERIFIED_EMAIL= |
248 | | - |
249 | | -# Use HTTP proxy for outgoing request (optional) |
250 | | -# http_proxy=http://gateway.local:8118 |
251 | | -# Access control for hidden service. |
252 | | -# ALLOW_ACCESS_TO_HIDDEN_SERVICE=true |
253 | | - |
254 | | -# Authorized fetch mode (optional) |
255 | | -# Require remote servers to authentify when fetching toots, see |
256 | | -# https://docs.joinmastodon.org/admin/config/#authorized_fetch |
257 | | -# AUTHORIZED_FETCH=true |
258 | 62 |
|
259 | | -# Whitelist mode (optional) |
260 | | -# Only allow federation with whitelisted domains, see |
261 | | -# https://docs.joinmastodon.org/admin/config/#whitelist_mode |
262 | | -# WHITELIST_MODE=true |
| 63 | +# File storage (optional) |
| 64 | +# ----------------------- |
| 65 | +S3_ENABLED=true |
| 66 | +S3_BUCKET=files.example.com |
| 67 | +AWS_ACCESS_KEY_ID= |
| 68 | +AWS_SECRET_ACCESS_KEY= |
| 69 | +S3_ALIAS_HOST=files.example.com |
| 70 | + |
| 71 | +# IP and session retention |
| 72 | +# ----------------------- |
| 73 | +# Make sure to modify the scheduling of ip_cleanup_scheduler in config/sidekiq.yml |
| 74 | +# to be less than daily if you lower IP_RETENTION_PERIOD below two days (172800). |
| 75 | +# ----------------------- |
| 76 | +IP_RETENTION_PERIOD=31556952 |
| 77 | +SESSION_RETENTION_PERIOD=31556952 |
0 commit comments