gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

config.yaml (35757B)


      1 #  GoToSocial
      2 #  Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org
      3 
      4 #  This program is free software: you can redistribute it and/or modify
      5 #  it under the terms of the GNU Affero General Public License as published by
      6 #  the Free Software Foundation, either version 3 of the License, or
      7 #  (at your option) any later version.
      8 
      9 #  This program is distributed in the hope that it will be useful,
     10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
     11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12 #  GNU Affero General Public License for more details.
     13 
     14 #  You should have received a copy of the GNU Affero General Public License
     15 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     16 
     17 ###########################
     18 ##### GENERAL CONFIG ######
     19 ###########################
     20 
     21 # String. Log level to use throughout the application. Must be lower-case.
     22 # Options: ["trace","debug","info","warn","error","fatal"]
     23 # Default: "info"
     24 log-level: "info"
     25 
     26 # Bool. Log database queries when log-level is set to debug or trace.
     27 # This setting produces verbose logs, so it's better to only enable it
     28 # when you're trying to track an issue down.
     29 # Options: [true, false]
     30 # Default: false
     31 log-db-queries: false
     32 
     33 # Bool. Include the client IP in the emitted log lines
     34 # Options: [true, false]
     35 # Default: true
     36 log-client-ip: true
     37 
     38 # String. Application name to use internally.
     39 # Examples: ["My Application","gotosocial"]
     40 # Default: "gotosocial"
     41 application-name: "gotosocial"
     42 
     43 # String. The user that will be shown instead of the landing page. if no user is set, the landing page will be shown.
     44 # Examples: "admin"
     45 # Default: ""
     46 landing-page-user: ""
     47 
     48 # String. Hostname that this server will be reachable at. Defaults to localhost for local testing,
     49 # but you should *definitely* change this when running for real, or your server won't work at all.
     50 # DO NOT change this after your server has already run once, or you will break things!
     51 # Examples: ["gts.example.org","some.server.com"]
     52 # Default: "localhost"
     53 host: "localhost"
     54 
     55 # String. Domain to use when federating profiles. This is useful when you want your server to be at
     56 # eg., "gts.example.org", but you want the domain on accounts to be "example.org" because it looks better
     57 # or is just shorter/easier to remember.
     58 #
     59 # To make this setting work properly, you need to redirect requests at "example.org/.well-known/webfinger"
     60 # to "gts.example.org/.well-known/webfinger" so that GtS can handle them properly.
     61 #
     62 # You should also redirect requests at "example.org/.well-known/nodeinfo" in the same way.
     63 #
     64 # You should also redirect requests at "example.org/.well-known/host-meta" in the same way. This endpoint
     65 # is used by a number of clients to discover the API endpoint to use when the host and account domain are
     66 # different.
     67 #
     68 # An empty string (ie., not set) means that the same value as 'host' will be used.
     69 #
     70 # DO NOT change this after your server has already run once, or you will break things!
     71 #
     72 # Please read the appropriate section of the installation guide before you go messing around with this setting:
     73 # https://docs.gotosocial.org/installation_guide/advanced/#can-i-host-my-instance-at-fediexampleorg-but-have-just-exampleorg-in-my-username
     74 #
     75 # Examples: ["example.org","server.com"]
     76 # Default: ""
     77 account-domain: ""
     78 
     79 # String. Protocol to use for the server. Only change to http for local testing!
     80 # This should be the protocol part of the URI that your server is actually reachable on. So even if you're
     81 # running GoToSocial behind a reverse proxy that handles SSL certificates for you, instead of using built-in
     82 # letsencrypt, it should still be https.
     83 # Options: ["http","https"]
     84 # Default: "https"
     85 protocol: "https"
     86 
     87 # String. Address to bind the GoToSocial server to.
     88 # This can be an IPv4 address or an IPv6 address (surrounded in square brackets), or a hostname.
     89 # The default value will bind to all interfaces, which makes the server
     90 # accessible by other machines. For most setups there is no need to change this.
     91 # If you are using GoToSocial in a reverse proxy setup with the proxy running on
     92 # the same machine, you will want to set this to "localhost" or an equivalent,
     93 # so that the proxy can't be bypassed.
     94 # Examples: ["0.0.0.0", "172.128.0.16", "localhost", "[::]", "[2001:db8::fed1]"]
     95 # Default: "0.0.0.0"
     96 bind-address: "0.0.0.0"
     97 
     98 # Int. Listen port for the GoToSocial webserver + API. If you're running behind a reverse proxy and/or in a docker,
     99 # container, just set this to whatever you like (or leave the default), and make sure it's forwarded properly.
    100 # If you are running with built-in letsencrypt enabled, and running GoToSocial directly on a host machine, you will
    101 # probably want to set this to 443 (standard https port), unless you have other services already using that port.
    102 # This *MUST NOT* be the same as the letsencrypt port specified below, unless letsencrypt is turned off.
    103 # Examples: [443, 6666, 8080]
    104 # Default: 8080
    105 port: 8080
    106 
    107 # Array of string. CIDRs or IP addresses of proxies that should be trusted when determining real client IP from behind a reverse proxy.
    108 # If you're running inside a Docker container behind Traefik or Nginx, for example, add the subnet of your docker network,
    109 # or the gateway of the docker network, and/or the address of the reverse proxy (if it's not running on the host network).
    110 # Example: ["127.0.0.1/32", "172.20.0.1"]
    111 # Default: ["127.0.0.1/32", "::1"] (localhost ipv4 + ipv6)
    112 trusted-proxies:
    113   - "127.0.0.1/32"
    114   - "::1"
    115 
    116 ############################
    117 ##### DATABASE CONFIG ######
    118 ############################
    119 
    120 # Config pertaining to the Gotosocial database connection
    121 
    122 # String. Database type.
    123 # Options: ["postgres","sqlite"]
    124 # Default: "postgres"
    125 db-type: "postgres"
    126 
    127 # String. Database address or parameters.
    128 #
    129 # For Postgres, this should be the address or socket at which the database can be reached.
    130 #
    131 # For Sqlite, this should be the path to your sqlite database file. Eg., /opt/gotosocial/sqlite.db.
    132 # If the file doesn't exist at the specified path, it will be created.
    133 # If just a filename is provided (no directory) then the database will be created in the same directory
    134 # as the GoToSocial binary.
    135 # If address is set to :memory: then an in-memory database will be used (no file).
    136 # WARNING: :memory: should NOT BE USED except for testing purposes.
    137 #
    138 # Examples: ["localhost","my.db.host","127.0.0.1","192.111.39.110",":memory:", "sqlite.db"]
    139 # Default: ""
    140 db-address: ""
    141 
    142 # Int. Port for database connection.
    143 # Examples: [5432, 1234, 6969]
    144 # Default: 5432
    145 db-port: 5432
    146 
    147 # String. Username for the database connection.
    148 # Examples: ["mydbuser","postgres","gotosocial"]
    149 # Default: ""
    150 db-user: ""
    151 
    152 # String. Password to use for the database connection
    153 # Examples: ["password123","verysafepassword","postgres"]
    154 # Default: ""
    155 db-password: ""
    156 
    157 # String. Name of the database to use within the provided database type.
    158 # Examples: ["mydb","postgres","gotosocial"]
    159 # Default: "gotosocial"
    160 db-database: "gotosocial"
    161 
    162 # String. Disable, enable, or require SSL/TLS connection to the database.
    163 # If "disable" then no TLS connection will be attempted.
    164 # If "enable" then TLS will be tried, but the database certificate won't be checked (for self-signed certs).
    165 # If "require" then TLS will be required to make a connection, and a valid certificate must be presented.
    166 # Options: ["disable", "enable", "require"]
    167 # Default: "disable"
    168 db-tls-mode: "disable"
    169 
    170 # String. Path to a CA certificate on the host machine for db certificate validation.
    171 # If this is left empty, just the host certificates will be used.
    172 # If filled in, the certificate will be loaded and added to host certificates.
    173 # Examples: ["/path/to/some/cert.crt"]
    174 # Default: ""
    175 db-tls-ca-cert: ""
    176 
    177 # Int. Number to multiply by CPU count to set permitted total of open database connections (in-use and idle).
    178 # You can use this setting to tune your database connection behavior, though most admins won't need to touch it.
    179 #
    180 # Example values for multiplier 8:
    181 #
    182 # 1 cpu = 08 open connections
    183 # 2 cpu = 16 open connections
    184 # 4 cpu = 32 open connections
    185 #
    186 # Example values for multiplier 4:
    187 #
    188 # 1 cpu = 04 open connections
    189 # 2 cpu = 08 open connections
    190 # 4 cpu = 16 open connections
    191 #
    192 # A multiplier of 8 is a sensible default, but you may wish to increase this for instances
    193 # running on very performant hardware, or decrease it for instances using v. slow CPUs.
    194 #
    195 # If you set the multiplier to less than 1, only one open connection will be used regardless of cpu count.
    196 #
    197 # PLEASE NOTE!!: This setting currently only applies for Postgres. SQLite will always use 1 connection regardless
    198 # of what is set here. This behavior will change in future when we implement better SQLITE_BUSY handling.
    199 # See https://github.com/superseriousbusiness/gotosocial/issues/1407 for more details.
    200 #
    201 # Examples: [16, 8, 10, 2]
    202 # Default: 8
    203 db-max-open-conns-multiplier: 8
    204 
    205 # String. SQLite journaling mode.
    206 # SQLite only -- unused otherwise.
    207 # If set to empty string, the sqlite default will be used.
    208 # See: https://www.sqlite.org/pragma.html#pragma_journal_mode
    209 # Examples: ["DELETE", "TRUNCATE", "PERSIST", "MEMORY", "WAL", "OFF"]
    210 # Default: "WAL"
    211 db-sqlite-journal-mode: "WAL"
    212 
    213 # String. SQLite synchronous mode.
    214 # SQLite only -- unused otherwise.
    215 # If set to empty string, the sqlite default will be used.
    216 # See: https://www.sqlite.org/pragma.html#pragma_synchronous
    217 # Examples: ["OFF", "NORMAL", "FULL", "EXTRA"]
    218 # Default: "NORMAL"
    219 db-sqlite-synchronous: "NORMAL"
    220 
    221 # Byte size. SQlite cache size.
    222 # SQLite only -- unused otherwise.
    223 # If set to empty string or zero, the sqlite default (2MiB) will be used.
    224 # See: https://www.sqlite.org/pragma.html#pragma_cache_size
    225 # Examples: ["0", "2MiB", "8MiB", "64MiB"]
    226 # Default: "8MiB"
    227 db-sqlite-cache-size: "8MiB"
    228 
    229 # Duration. SQlite busy timeout.
    230 # SQLite only -- unused otherwise.
    231 # If set to empty string or zero, the sqlite default will be used.
    232 # See: https://www.sqlite.org/pragma.html#pragma_busy_timeout
    233 # Examples: ["0s", "1s", "30s", "1m", "5m"]
    234 # Default: "5s"
    235 db-sqlite-busy-timeout: "5m"
    236 
    237 cache:
    238   # Cache configuration options:
    239   #
    240   # max-size   = maximum cached objects count
    241   # ttl        = cached object lifetime
    242   # sweep-freq = frequency to look for stale cache objects
    243   #              (zero will disable cache sweeping)
    244 
    245   #############################
    246   #### VISIBILITY CACHES ######
    247   #############################
    248   #
    249   # Configure Status and account 
    250   # visibility cache.
    251 
    252   visibility-max-size: 2000
    253   visibility-ttl: "30m"
    254   visibility-sweep-freq: "1m"
    255 
    256   gts:
    257     ###########################
    258     #### DATABASE CACHES ######
    259     ###########################
    260     #
    261     # Configure GTS database
    262     # model caches.
    263 
    264     account-max-size: 2000
    265     account-ttl: "30m"
    266     account-sweep-freq: "1m"
    267 
    268     block-max-size: 100
    269     block-ttl: "30m"
    270     block-sweep-freq: "1m"
    271 
    272     domain-block-max-size: 2000
    273     domain-block-ttl: "24h"
    274     domain-block-sweep-freq: "1m"
    275 
    276     emoji-max-size: 2000
    277     emoji-ttl: "30m"
    278     emoji-sweep-freq: "1m"
    279 
    280     emoji-category-max-size: 100
    281     emoji-category-ttl: "30m"
    282     emoji-category-sweep-freq: "1m"
    283 
    284     follow-max-size: 2000
    285     follow-ttl: "30m"
    286     follow-sweep-freq: "1m"
    287 
    288     follow-request-max-size: 2000
    289     follow-request-ttl: "30m"
    290     follow-request-sweep-freq: "1m"
    291 
    292     list-max-size: 2000
    293     list-ttl: "30m"
    294     list-sweep-freq: "1m"
    295 
    296     list-entry-max-size: 2000
    297     list-entry-ttl: "30m"
    298     list-entry-sweep-freq: "1m"
    299 
    300     media-max-size: 1000
    301     media-ttl: "30m"
    302     media-sweep-freq: "1m"
    303 
    304     mention-max-size: 2000
    305     mention-ttl: "30m"
    306     mention-sweep-freq: "1m"
    307 
    308     notification-max-size: 1000
    309     notification-ttl: "30m"
    310     notification-sweep-freq: "1m"
    311 
    312     report-max-size: 100
    313     report-ttl: "30m"
    314     report-sweep-freq: "1m"
    315 
    316     status-max-size: 2000
    317     status-ttl: "30m"
    318     status-sweep-freq: "1m"
    319 
    320     status-fave-max-size: 2000
    321     status-fave-ttl: "30m"
    322     status-fave-sweep-freq: "1m"
    323 
    324     tombstone-max-size: 500
    325     tombstone-ttl: "30m"
    326     tombstone-sweep-freq: "1m"
    327 
    328     user-max-size: 500
    329     user-ttl: "30m"
    330     user-sweep-freq: "1m"
    331 
    332     webfinger-max-size: 250
    333     webfinger-ttl: "24h"
    334     webfinger-sweep-freq: "1m"
    335 
    336 ######################
    337 ##### WEB CONFIG #####
    338 ######################
    339 
    340 # Config pertaining to templating and serving of web pages/email notifications and the like
    341 
    342 # String. Directory from which gotosocial will attempt to load html templates (.tmpl files).
    343 # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
    344 # Default: "./web/template/"
    345 web-template-base-dir: "./web/template/"
    346 
    347 # String. Directory from which gotosocial will attempt to serve static web assets (images, scripts).
    348 # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"]
    349 # Default: "./web/assets/"
    350 web-asset-base-dir: "./web/assets/"
    351 
    352 ###########################
    353 ##### INSTANCE CONFIG #####
    354 ###########################
    355 
    356 # Config pertaining to instance federation settings, pages to hide/expose, etc.
    357 
    358 # Bool. Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=open in order
    359 # to see a list of instances that this instance 'peers' with. Even if set to 'false', then authenticated
    360 # users (members of the instance) will still be able to query the endpoint.
    361 # Options: [true, false]
    362 # Default: false
    363 instance-expose-peers: false
    364 
    365 # Bool. Allow unauthenticated users to make queries to /api/v1/instance/peers?filter=suspended in order
    366 # to see a list of instances that this instance blocks/suspends. This will also allow unauthenticated
    367 # users to see the list through the web UI. Even if set to 'false', then authenticated users (members
    368 # of the instance) will still be able to query the endpoint.
    369 # Options: [true, false]
    370 # Default: false
    371 instance-expose-suspended: false
    372 
    373 # Bool. Allow unauthenticated users to view /about/suspended,
    374 # showing the HTML rendered list of instances that this instance blocks/suspends.
    375 # Options: [true, false]
    376 # Default: false
    377 instance-expose-suspended-web: false
    378 
    379 # Bool. Allow unauthenticated users to make queries to /api/v1/timelines/public in order
    380 # to see a list of public posts on this server. Even if set to 'false', then authenticated
    381 # users (members of the instance) will still be able to query the endpoint.
    382 # Options: [true, false]
    383 # Default: false
    384 instance-expose-public-timeline: false
    385 
    386 # Bool. This flag tweaks whether GoToSocial will deliver ActivityPub messages
    387 # to the shared inbox of a recipient, if one is available, instead of delivering
    388 # each message to each actor who should receive a message individually.
    389 #
    390 # Shared inbox delivery can significantly reduce network load when delivering
    391 # to multiple recipients share an inbox (eg., on large Mastodon instances).
    392 #
    393 # See: https://www.w3.org/TR/activitypub/#shared-inbox-delivery
    394 #
    395 # Options: [true, false]
    396 # Default: true
    397 instance-deliver-to-shared-inboxes: true
    398 
    399 ###########################
    400 ##### ACCOUNTS CONFIG #####
    401 ###########################
    402 
    403 # Config pertaining to creation and maintenance of accounts on the server, as well as defaults for new accounts.
    404 
    405 # Bool. Do we want people to be able to just submit sign up requests, or do we want invite only?
    406 # Options: [true, false]
    407 # Default: true
    408 accounts-registration-open: true
    409 
    410 # Bool. Do sign up requests require approval from an admin/moderator before an account can sign in/use the server?
    411 # Options: [true, false]
    412 # Default: true
    413 accounts-approval-required: true
    414 
    415 # Bool. Are sign up requests required to submit a reason for the request (eg., an explanation of why they want to join the instance)?
    416 # Options: [true, false]
    417 # Default: true
    418 accounts-reason-required: true
    419 
    420 # Bool. Allow accounts on this instance to set custom CSS for their profile pages and statuses.
    421 # Enabling this setting will allow accounts to upload custom CSS via the /user settings page,
    422 # which will then be rendered on the web view of the account's profile and statuses.
    423 #
    424 # For instances with public sign ups, it is **HIGHLY RECOMMENDED** to leave this setting on 'false',
    425 # since setting it to true allows malicious accounts to make their profile pages misleading, unusable
    426 # or even dangerous to visitors. In other words, you should only enable this setting if you trust
    427 # the users on your instance not to produce harmful CSS.
    428 #
    429 # Regardless of what this value is set to, any uploaded CSS will not be federated to other instances,
    430 # it will only be shown on profiles and statuses on *this* instance.
    431 #
    432 # Options: [true, false]
    433 # Default: false
    434 accounts-allow-custom-css: false
    435 
    436 # Int. If accounts-allow-custom-css is true, this is the permitted length in characters for
    437 # CSS uploaded by accounts on this instance. No effect if accounts-allow-custom-css is false.
    438 #
    439 # Examples: [500, 5000, 9999]
    440 # Default: 10000
    441 accounts-custom-css-length: 10000
    442 
    443 ########################
    444 ##### MEDIA CONFIG #####
    445 ########################
    446 
    447 # Config pertaining to media uploads (videos, image, image descriptions, emoji).
    448 
    449 # Int. Maximum allowed image upload size in bytes.
    450 # Examples: [2097152, 10485760]
    451 # Default: 10485760 -- aka 10MB
    452 media-image-max-size: 10485760
    453 
    454 # Int. Maximum allowed video upload size in bytes.
    455 # Examples: [2097152, 10485760]
    456 # Default: 41943040 -- aka 40MB
    457 media-video-max-size: 41943040
    458 
    459 # Int. Minimum amount of characters required as an image or video description.
    460 # Examples: [500, 1000, 1500]
    461 # Default: 0 (not required)
    462 media-description-min-chars: 0
    463 
    464 # Int. Maximum amount of characters permitted in an image or video description.
    465 # Examples: [500, 1000, 1500]
    466 # Default: 500
    467 media-description-max-chars: 500
    468 
    469 # Int. Number of days to cache media from remote instances before they are removed from the cache.
    470 # A job will run every day at midnight to clean up any remote media older than the given amount of days.
    471 #
    472 # When remote media is removed from the cache, it is deleted from storage but the database entries for the media
    473 # are kept so that it can be fetched again if requested by a user.
    474 #
    475 # If this is set to 0, then media from remote instances will be cached indefinitely.
    476 # Examples: [30, 60, 7, 0]
    477 # Default: 30
    478 media-remote-cache-days: 30
    479 
    480 # Int. Max size in bytes of emojis uploaded to this instance via the admin API.
    481 # The default is the same as the Mastodon size limit for emojis (50kb), which allows
    482 # for good interoperability. Raising this limit may cause issues with federation
    483 # of your emojis to other instances, so beware.
    484 # Examples: [51200, 102400]
    485 # Default: 51200
    486 media-emoji-local-max-size: 51200
    487 
    488 # Int. Max size in bytes of emojis to download from other instances.
    489 # By default this is 100kb, or twice the size of the default for media-emoji-local-max-size.
    490 # This strikes a good balance between decent interoperability with instances that have
    491 # higher emoji size limits, and not taking up too much space in storage.
    492 # Examples: [51200, 102400]
    493 # Default: 51200
    494 media-emoji-remote-max-size: 102400
    495 
    496 ##########################
    497 ##### STORAGE CONFIG #####
    498 ##########################
    499 
    500 # Config pertaining to storage of user-created uploads (videos, images, etc).
    501 
    502 # String. Type of storage backend to use.
    503 # Examples: ["local", "s3"]
    504 # Default: "local" (storage on local disk)
    505 storage-backend: "local"
    506 
    507 # String. Directory to use as a base path for storing files.
    508 # Make sure whatever user/group gotosocial is running as has permission to access
    509 # this directory, and create new subdirectories and files within it.
    510 # Only required when running with the local storage backend.
    511 # Examples: ["/home/gotosocial/storage", "/opt/gotosocial/datastorage"]
    512 # Default: "/gotosocial/storage"
    513 storage-local-base-path: "/gotosocial/storage"
    514 
    515 # String. API endpoint of the S3 compatible service.
    516 # Only required when running with the s3 storage backend.
    517 # Examples: ["minio:9000", "s3.nl-ams.scw.cloud", "s3.us-west-002.backblazeb2.com"]
    518 # GoToSocial uses "DNS-style" when accessing buckets. 
    519 # If you are using Scaleways object storage, please remove the "bucket name" from the endpoint address
    520 # Default: ""
    521 storage-s3-endpoint: ""
    522 
    523 # Bool. If data stored in S3 should be proxied through GoToSocial instead of redirecting to a presigned URL.
    524 #
    525 # Default: false
    526 storage-s3-proxy: false
    527 # Bool. Use SSL for S3 connections.
    528 #
    529 # Only set this to 'false' when testing locally.
    530 #
    531 # Default: true
    532 storage-s3-use-ssl: true
    533 
    534 # String. Access key part of the S3 credentials.
    535 # Consider setting this value using environment variables to avoid leaking it via the config file
    536 # Only required when running with the s3 storage backend.
    537 # Examples: ["AKIAJSIE27KKMHXI3BJQ","miniouser"]
    538 # Default: ""
    539 storage-s3-access-key: ""
    540 # String. Secret key part of the S3 credentials.
    541 # Consider setting this value using environment variables to avoid leaking it via the config file
    542 # Only required when running with the s3 storage backend.
    543 # Examples: ["5bEYu26084qjSFyclM/f2pz4gviSfoOg+mFwBH39","miniopassword"]
    544 # Default: ""
    545 storage-s3-secret-key: ""
    546 # String. Name of the storage bucket.
    547 #
    548 # If you have already encoded your bucket name in the storage-s3-endpoint, this
    549 # value will be used as a directory containing your data.
    550 #
    551 # The bucket must exist prior to starting GoToSocial
    552 #
    553 # Only required when running with the s3 storage backend.
    554 # Examples: ["gts","cool-instance"]
    555 # Default: ""
    556 storage-s3-bucket: ""
    557 
    558 ###########################
    559 ##### STATUSES CONFIG #####
    560 ###########################
    561 
    562 # Config pertaining to the creation of statuses/posts, and permitted limits.
    563 
    564 # Int. Maximum amount of characters permitted for a new status.
    565 # Note that going way higher than the default might break federation.
    566 # Examples: [140, 500, 5000]
    567 # Default: 5000
    568 statuses-max-chars: 5000
    569 
    570 # Int. Maximum amount of characters allowed in the CW/subject header of a status.
    571 # Note that going way higher than the default might break federation.
    572 # Examples: [100, 200]
    573 # Default: 100
    574 statuses-cw-max-chars: 100
    575 
    576 # Int. Maximum amount of options to permit when creating a new poll.
    577 # Note that going way higher than the default might break federation.
    578 # Examples: [4, 6, 10]
    579 # Default: 6
    580 statuses-poll-max-options: 6
    581 
    582 # Int. Maximum amount of characters to permit per poll option when creating a new poll.
    583 # Note that going way higher than the default might break federation.
    584 # Examples: [50, 100, 150]
    585 # Default: 50
    586 statuses-poll-option-max-chars: 50
    587 
    588 # Int. Maximum amount of media files that can be attached to a new status.
    589 # Note that going way higher than the default might break federation.
    590 # Examples: [4, 6, 10]
    591 # Default: 6
    592 statuses-media-max-files: 6
    593 
    594 ##############################
    595 ##### LETSENCRYPT CONFIG #####
    596 ##############################
    597 
    598 # Config pertaining to the automatic acquisition and use of LetsEncrypt HTTPS certificates.
    599 
    600 # Bool. Whether or not letsencrypt should be enabled for the server.
    601 # If false, the rest of the settings here will be ignored.
    602 # If you serve GoToSocial behind a reverse proxy like nginx or traefik, leave this turned off.
    603 # If you don't, then turn it on so that you can use https.
    604 # Options: [true, false]
    605 # Default: false
    606 letsencrypt-enabled: false
    607 
    608 # Int. Port to listen for letsencrypt certificate challenges on.
    609 # If letsencrypt is enabled, this port must be reachable or you won't be able to obtain certs.
    610 # If letsencrypt is disabled, this port will not be used.
    611 # This *must not* be the same as the webserver/API port specified above.
    612 # Examples: [80, 8000, 1312]
    613 # Default: 80
    614 letsencrypt-port: 80
    615 
    616 # String. Directory in which to store LetsEncrypt certificates.
    617 # It is a good move to make this a sub-path within your storage directory, as it makes
    618 # backup easier, but you might wish to move them elsewhere if they're also accessed by other services.
    619 # In any case, make sure GoToSocial has permissions to write to / read from this directory.
    620 # Examples: ["/home/gotosocial/storage/certs", "/acmecerts"]
    621 # Default: "/gotosocial/storage/certs"
    622 letsencrypt-cert-dir: "/gotosocial/storage/certs"
    623 
    624 # String. Email address to use when registering LetsEncrypt certs.
    625 # Most likely, this will be the email address of the instance administrator.
    626 # LetsEncrypt will send notifications about expiring certificates etc to this address.
    627 # Examples: ["admin@example.org"]
    628 # Default: ""
    629 letsencrypt-email-address: ""
    630 
    631 ##############################
    632 ##### MANUAL TLS CONFIG  #####
    633 ##############################
    634 
    635 # String. Path to a PEM-encoded file on disk that includes the certificate chain 
    636 # and the public key
    637 # Examples: ["/gotosocial/storage/certs/chain.pem"]
    638 # Default: ""
    639 tls-certificate-chain: ""
    640 
    641 # String. Path to a PEM-encoded file on disk containing the private key for the
    642 # associated tls-certificate-chain
    643 # Examples: ["/gotosocial/storage/certs/private.pem"]
    644 # Default: ""
    645 tls-certificate-key: ""
    646 
    647 #######################
    648 ##### OIDC CONFIG #####
    649 #######################
    650 
    651 # Config for authentication with an external OIDC provider (Dex, Google, Auth0, etc).
    652 
    653 # Bool. Enable authentication with external OIDC provider. If set to true, then
    654 # the other OIDC options must be set as well. If this is set to false, then the standard
    655 # internal oauth flow will be used, where users sign in to GtS with username/password.
    656 # Options: [true, false]
    657 # Default: false
    658 oidc-enabled: false
    659 
    660 # String. Name of the oidc idp (identity provider). This will be shown to users when
    661 # they log in.
    662 # Examples: ["Google", "Dex", "Auth0"]
    663 # Default: ""
    664 oidc-idp-name: ""
    665 
    666 # Bool. Skip the normal verification flow of tokens returned from the OIDC provider, ie.,
    667 # don't check the expiry or signature. This should only be used in debugging or testing,
    668 # never ever in a production environment as it's extremely unsafe!
    669 # Options: [true, false]
    670 # Default: false
    671 oidc-skip-verification: false
    672 
    673 # String. The OIDC issuer URI. This is where GtS will redirect users to for login.
    674 # Typically this will look like a standard web URL.
    675 # Examples: ["https://auth.example.org", "https://example.org/auth"]
    676 # Default: ""
    677 oidc-issuer: ""
    678 
    679 # String. The ID for this client as registered with the OIDC provider.
    680 # Examples: ["some-client-id", "fda3772a-ad35-41c9-9a59-f1943ad18f54"]
    681 # Default: ""
    682 oidc-client-id: ""
    683 
    684 # String. The secret for this client as registered with the OIDC provider.
    685 # Examples: ["super-secret-business", "79379cf5-8057-426d-bb83-af504d98a7b0"]
    686 # Default: ""
    687 oidc-client-secret: ""
    688 
    689 # Array of string. Scopes to request from the OIDC provider. The returned values will be used to
    690 # populate users created in GtS as a result of the authentication flow. 'openid' and 'email' are required.
    691 # 'profile' is used to extract a username for the newly created user.
    692 # 'groups' is optional and can be used to determine if a user is an admin based on oidc-admin-groups.
    693 # Examples: See eg., https://auth0.com/docs/scopes/openid-connect-scopes
    694 # Default: ["openid", "email", "profile", "groups"]
    695 oidc-scopes:
    696   - "openid"
    697   - "email"
    698   - "profile"
    699   - "groups"
    700 
    701 # Bool. Link OIDC authenticated users to existing ones based on their email address.
    702 # This is mostly intended for migration purposes if you were running previous versions of GTS
    703 # which only correlated users with their email address. Should be set to false for most usecases.
    704 # Options: [true, false]
    705 # Default: false
    706 oidc-link-existing: false
    707 
    708 # Array of string. If the returned ID token contains a 'groups' claim that matches one of the
    709 # groups in oidc-admin-groups, then this user will be granted admin rights on the GtS instance
    710 # Default: []
    711 oidc-admin-groups: []
    712 
    713 #######################
    714 ##### SMTP CONFIG #####
    715 #######################
    716 
    717 # Config for sending emails via an smtp server. See https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
    718 
    719 # String. The hostname of the smtp server you want to use.
    720 # If this is not set, smtp will not be used to send emails, and you can ignore the other settings.
    721 # Examples: ["mail.example.org", "localhost"]
    722 # Default: ""
    723 smtp-host: ""
    724 
    725 # Int. Port to use to connect to the smtp server.
    726 # Examples: []
    727 # Default: 0
    728 smtp-port: 0
    729 
    730 # String. Username to use when authenticating with the smtp server.
    731 # This should have been provided to you by your smtp host.
    732 # This is often, but not always, an email address.
    733 # Examples: ["maillord@example.org"]
    734 # Default: ""
    735 smtp-username: ""
    736 
    737 # String. Password to use when authenticating with the smtp server.
    738 # This should have been provided to you by your smtp host.
    739 # Examples: ["1234", "password"]
    740 # Default: ""
    741 smtp-password: ""
    742 
    743 # String. 'From' address for sent emails.
    744 # Examples: ["mail@example.org"]
    745 # Default: ""
    746 smtp-from: ""
    747 
    748 # Bool. If true, when an email is sent that has multiple recipients, each recipient
    749 # will be included in the To field, so that each recipient can see who else got the
    750 # email, and they can 'reply all' to the other recipients if they want to.
    751 #
    752 # If false, email will be sent to Undisclosed Recipients, and each recipient will not
    753 # be able to see who else received the email.
    754 #
    755 # It might be useful to change this setting to 'true' if you want to be able to discuss
    756 # new moderation reports with other admins by 'replying-all' to the notification email.
    757 # Default: false
    758 smtp-disclose-recipients: false
    759 
    760 #########################
    761 ##### SYSLOG CONFIG #####
    762 #########################
    763 
    764 # Config for additional syslog log hooks. See https://en.wikipedia.org/wiki/Syslog,
    765 # and https://github.com/sirupsen/logrus/tree/master/hooks/syslog.
    766 #
    767 # These settings are useful when one wants to daemonize GoToSocial and send logs
    768 # to a specific place, either a local location or a syslog server. Most users will
    769 # not need to touch these settings.
    770 
    771 # Bool. Enable the syslog logging hook. Logs will be mirrored to the configured destination.
    772 # Options: [true, false]
    773 # Default: false
    774 syslog-enabled: false
    775 
    776 # String. Protocol to use when directing logs to syslog. Leave empty to connect to local syslog.
    777 # Options: ["udp", "tcp", ""]
    778 # Default: "tcp"
    779 syslog-protocol: "udp"
    780 
    781 # String. Address:port to send syslog logs to. Leave empty to connect to local syslog.
    782 # Default: "localhost:514"
    783 syslog-address: "localhost:514"
    784 
    785 ##################################
    786 ##### OBSERVABILITY SETTINGS #####
    787 ##################################
    788 
    789 # String. Header name to use to extract a request or trace ID from. Typically set by a
    790 # loadbalancer or proxy.
    791 # Default: "X-Request-Id"
    792 request-id-header: "X-Request-Id"
    793 
    794 # Bool. Enable OpenTelemetry based tracing support.
    795 # Default: false
    796 tracing-enabled: false
    797 
    798 # String. Set the transport protocol for the tracing system. Can either be "grpc" for
    799 # OTLP gRPC or "jaeger" for jaeger based ingesters.
    800 # Options: ["grpc", "jaeger"]
    801 # Default: "grpc"
    802 tracing-transport: "grpc"
    803 
    804 # String. Endpoint of the trace ingester. When using the gRPC based transport, the
    805 # endpoint is usually a single address/port combination. For the jaeger transport it
    806 # should be a fully qualified URL.
    807 # OTLP gRPC or "jaeger" for jaeger based ingesters
    808 # Examples: ["localhost:4317", "http://localhost:14268/api/traces"]
    809 # Default: ""
    810 tracing-endpoint: ""
    811 
    812 # Bool. Disable HTTPS for the gRPC transport protocol.
    813 # Default: false
    814 tracing-insecure-transport: false
    815 
    816 #############################
    817 ##### ADVANCED SETTINGS #####
    818 #############################
    819 
    820 # Advanced settings pertaining to http timeouts, security, cookies, and more.
    821 #
    822 # ONLY ADJUST THESE SETTINGS IF YOU KNOW WHAT YOU ARE DOING!
    823 #
    824 # Most users will not need to (and should not) touch these settings, since
    825 # they are set to sensible defaults, and may break if they are changed.
    826 #
    827 # Nevertheless, they are provided for the sake of allowing server admins to
    828 # tweak their instance for performance or security reasons.
    829 
    830 # String. Value of the SameSite attribute of cookies set by GoToSocial.
    831 # Defaults to 'lax' to ensure that the OIDC flow does not break, which is
    832 # fine in most cases. If you want to harden your instance against CSRF attacks
    833 # and don't mind if some login-related things might break, you can set this
    834 # to 'strict' instead.
    835 #
    836 # For an overview of what this does, see:
    837 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
    838 #
    839 # Options: ["lax", "strict"]
    840 # Default: "lax"
    841 advanced-cookies-samesite: "lax"
    842 
    843 # Int. Amount of requests to permit per router grouping from a single IP address within
    844 # a span of 5 minutes. If this amount is exceeded, a 429 HTTP error code will be returned.
    845 #
    846 # If you find yourself adjusting this limit because it's regularly being exceeded,
    847 # you should first verify that your settings for `trusted-proxies` (above) are correct.
    848 # In many cases, when the rate limit is exceeded it is because your instance sees all
    849 # incoming requests as coming from the *same IP address* (you can verify this by looking
    850 # at the client IPs in your instance logs). If this is the case, try adding that IP
    851 # address to your `trusted-proxies` *BEFORE* you go adjusting this rate limit setting!
    852 #
    853 # If you set this to 0 or less, rate limiting will be disabled entirely.
    854 #
    855 # Examples: [1000, 500, 0]
    856 # Default: 300
    857 advanced-rate-limit-requests: 300
    858 
    859 # Int. Amount of open requests to permit per CPU, per router grouping, before applying http
    860 # request throttling. Any requests beyond the calculated limit are held in a backlog queue for
    861 # up to 30 seconds before either being processed or timing out. Requests that don't fit in the backlog
    862 # queue will have status 503 returned to them, and the header 'Retry-After' will be set to 30 seconds.
    863 #
    864 # Open request limit is available CPUs * multiplier; backlog queue limit is limit * multiplier.
    865 #
    866 # Example values for multiplier 8:
    867 #
    868 # 1 cpu = 08 open, 064 backlog
    869 # 2 cpu = 16 open, 128 backlog
    870 # 4 cpu = 32 open, 256 backlog
    871 #
    872 # Example values for multiplier 4:
    873 #
    874 # 1 cpu = 04 open, 016 backlog
    875 # 2 cpu = 08 open, 032 backlog
    876 # 4 cpu = 16 open, 064 backlog
    877 #
    878 # A multiplier of 8 is a sensible default, but you may wish to increase this for instances
    879 # running on very performant hardware, or decrease it for instances using v. slow CPUs.
    880 #
    881 # If you set this to 0 or less, http request throttling will be disabled entirely.
    882 #
    883 # Examples: [8, 4, 9, 0]
    884 # Default: 8
    885 advanced-throttling-multiplier: 8
    886 
    887 # Duration. Time period to use as the "retry-after" header value in response to throttled requests.
    888 # Minimum resolution is 1 second.
    889 #
    890 # Examples: [30s, 10s, 5s, 1m]
    891 # Default: 30s
    892 advanced-throttling-retry-after: "30s"
    893 
    894 # Int. CPU multiplier for the amount of goroutines to spawn in order to send messages via ActivityPub.
    895 # Messages will be batched so that at most multiplier * CPU count messages will be sent out at once.
    896 # This can be tuned to limit concurrent POSTing to remote inboxes, preventing your instance CPU
    897 # usage from skyrocketing when an account with many followers posts a new status.
    898 #
    899 # Messages are split among available senders, and each sender processes its assigned messages in serial.
    900 # For example, say a user with 1000 followers is on an instance with 2 CPUs. With the default multiplier
    901 # of 2, this means 4 senders would be in process at once on this instance. When the user creates a new post,
    902 # each sender would end up iterating through about 250 Create messages + delivering them to remote instances.
    903 #
    904 # If you set this to 0 or less, only 1 sender will be used regardless of CPU count. This may be
    905 # useful in cases where you are working with very tight network or CPU constraints.
    906 #
    907 # Example values for multiplier 2 (default):
    908 #
    909 # 1 cpu = 2 concurrent senders
    910 # 2 cpu = 4 concurrent senders
    911 # 4 cpu = 8 concurrent senders
    912 #
    913 # Example values for multiplier 4:
    914 #
    915 # 1 cpu = 4 concurrent senders
    916 # 2 cpu = 8 concurrent senders
    917 # 4 cpu = 16 concurrent senders
    918 #
    919 # Example values for multiplier <1:
    920 #
    921 # 1 cpu = 1 concurrent sender
    922 # 2 cpu = 1 concurrent sender
    923 # 4 cpu = 1 concurrent sender
    924 advanced-sender-multiplier: 2