ConfigPathstring`name:"config-path" usage:"Path to a file containing gotosocial configuration. Values set in this file will be overwritten by values set as env vars or arguments"`
ApplicationNamestring`name:"application-name" usage:"Name of the application, used in various places internally"`
LandingPageUserstring`name:"landing-page-user" usage:"the user that should be shown on the instance's landing page"`
Hoststring`name:"host" usage:"Hostname to use for the server (eg., example.org, gotosocial.whatever.com). DO NOT change this on a server that's already run!"`
AccountDomainstring`name:"account-domain" usage:"Domain to use in account names (eg., example.org, whatever.com). If not set, will default to the setting for host. DO NOT change this on a server that's already run!"`
Protocolstring`name:"protocol" usage:"Protocol to use for the REST api of the server (only use http if you are debugging; https should be used even if running behind a reverse proxy!)"`
BindAddressstring`name:"bind-address" usage:"Bind address to use for the GoToSocial server (eg., 0.0.0.0, 172.138.0.9, [::], localhost). For ipv6, enclose the address in square brackets, eg [2001:db8::fed1]. Default binds to all interfaces."`
Portint`name:"port" usage:"Port to use for GoToSocial. Change this to 443 if you're running the binary directly on the host machine."`
TrustedProxies[]string`name:"trusted-proxies" usage:"Proxies to trust when parsing x-forwarded headers into real IPs."`
DbTLSCACertstring`name:"db-tls-ca-cert" usage:"Path to CA cert for db tls connection"`
DbMaxOpenConnsMultiplierint`name:"db-max-open-conns-multiplier" usage:"Multiplier to use per cpu for max open database connections. 0 or less is normalized to 1."`
DbSqliteJournalModestring`name:"db-sqlite-journal-mode" usage:"Sqlite only: see https://www.sqlite.org/pragma.html#pragma_journal_mode"`
DbSqliteSynchronousstring`name:"db-sqlite-synchronous" usage:"Sqlite only: see https://www.sqlite.org/pragma.html#pragma_synchronous"`
DbSqliteCacheSizebytesize.Size`name:"db-sqlite-cache-size" usage:"Sqlite only: see https://www.sqlite.org/pragma.html#pragma_cache_size"`
DbSqliteBusyTimeouttime.Duration`name:"db-sqlite-busy-timeout" usage:"Sqlite only: see https://www.sqlite.org/pragma.html#pragma_busy_timeout"`
DbPostgresConnectionStringstring`name:"db-postgres-connection-string" usage:"Full Database URL for connection to postgres"`
InstanceFederationSpamFilterbool`name:"instance-federation-spam-filter" usage:"Enable basic spam filter heuristics for messages coming from other instances, and drop messages identified as spam"`
InstanceExposePeersbool`name:"instance-expose-peers" usage:"Allow unauthenticated users to query /api/v1/instance/peers?filter=open"`
InstanceExposeBlocklistbool`name:"instance-expose-blocklist" usage:"Expose list of blocked domains via web UI, and allow unauthenticated users to query /api/v1/instance/peers?filter=blocked and /api/v1/instance/domain_blocks"`
InstanceExposeBlocklistWebbool`name:"instance-expose-blocklist-web" usage:"Expose list of explicitly blocked domains as webpage on /about/domain_blocks"`
InstanceExposeAllowlistbool`name:"instance-expose-allowlist" usage:"Expose list of allowed domains via web UI, and allow unauthenticated users to query /api/v1/instance/peers?filter=allowed and /api/v1/instance/domain_allows"`
InstanceExposeAllowlistWebbool`name:"instance-expose-allowlist-web" usage:"Expose list of explicitly allowed domains as webpage on /about/domain_allows"`
InstanceDeliverToSharedInboxesbool`name:"instance-deliver-to-shared-inboxes" usage:"Deliver federated messages to shared inboxes, if they're available."`
InstanceInjectMastodonVersionbool`name:"instance-inject-mastodon-version" usage:"This injects a Mastodon compatible version in /api/v1/instance to help Mastodon clients that use that version for feature detection"`
InstanceLanguageslanguage.Languages`name:"instance-languages" usage:"BCP47 language tags for the instance. Used to indicate the preferred languages of instance residents (in order from most-preferred to least-preferred)."`
InstanceSubscriptionsProcessFromstring`name:"instance-subscriptions-process-from" usage:"Time of day from which to start running instance subscriptions processing jobs. Should be in the format 'hh:mm:ss', eg., '15:04:05'."`
InstanceSubscriptionsProcessEverytime.Duration`name:"instance-subscriptions-process-every" usage:"Period to elapse between instance subscriptions processing jobs, starting from instance-subscriptions-process-from."`
InstanceStatsModestring`name:"instance-stats-mode" usage:"Allows you to customize the way stats are served to crawlers: one of '', 'serve', 'zero', 'baffle'. Home page stats remain unchanged."`
InstanceAllowBackdatingStatusesbool`name:"instance-allow-backdating-statuses" usage:"Allow local accounts to backdate statuses using the scheduled_at param to /api/v1/statuses"`
InstanceAllowEmptyUserAgentsbool`name:"instance-allow-empty-user-agents" usage:"Allow incoming HTTP requests that do not have a User-Agent header set"`
AccountsRegistrationOpenbool`name:"accounts-registration-open" usage:"Allow anyone to submit an account signup request. If false, server will be invite-only."`
AccountsReasonRequiredbool`name:"accounts-reason-required" usage:"Do new account signups require a reason to be submitted on registration?"`
AccountsRegistrationDailyLimitint`name:"accounts-registration-daily-limit" usage:"Limit amount of approved account sign-ups allowed per 24hrs before registration is closed. 0 or less = no limit."`
AccountsRegistrationBacklogLimitint`name:"accounts-registration-backlog-limit" usage:"Limit how big the 'accounts pending approval' queue can grow before registration is closed. 0 or less = no limit."`
AccountsAllowCustomCSSbool`name:"accounts-allow-custom-css" usage:"Allow accounts to enable custom CSS for their profile pages and statuses."`
AccountsCustomCSSLengthint`name:"accounts-custom-css-length" usage:"Maximum permitted length (characters) of custom CSS for accounts."`
StorageBackendstring`name:"storage-backend" usage:"Storage backend to use for media attachments"`
StorageLocalBasePathstring`name:"storage-local-base-path" usage:"Full path to an already-created directory where gts should store/retrieve media files. Subfolders will be created within this dir."`
StorageS3UseSSLbool`name:"storage-s3-use-ssl" usage:"Use SSL for S3 connections. Only set this to 'false' when testing locally"`
StorageS3BucketNamestring`name:"storage-s3-bucket" usage:"Place blobs in this bucket"`
StorageS3Proxybool`name:"storage-s3-proxy" usage:"Proxy S3 contents through GoToSocial instead of redirecting to a presigned URL"`
StorageS3RedirectURLstring`name:"storage-s3-redirect-url" usage:"Custom URL to use for redirecting S3 media links. If set, this will be used instead of the S3 bucket URL."`
StorageS3BucketLookupstring`name:"storage-s3-bucket-lookup" usage:"S3 bucket lookup type to use. Can be 'auto', 'dns' or 'path'. Defaults to 'auto'."`
StorageS3KeyPrefixstring`name:"storage-s3-key-prefix" usage:"Prefix to use for S3 keys. This is useful for separating multiple instances sharing the same S3 bucket."`
LetsEncryptEnabledbool`name:"letsencrypt-enabled" usage:"Enable letsencrypt TLS certs for this server. If set to true, then cert dir also needs to be set (or take the default)."`
LetsEncryptPortint`name:"letsencrypt-port" usage:"Port to listen on for letsencrypt certificate challenges. Must not be the same as the GtS webserver/API port."`
LetsEncryptCertDirstring`name:"letsencrypt-cert-dir" usage:"Directory to store acquired letsencrypt certificates."`
LetsEncryptEmailAddressstring`name:"letsencrypt-email-address" usage:"Email address to use when requesting letsencrypt certs. Will receive updates on cert expiry etc."`
TLSCertificateChainstring`name:"tls-certificate-chain" usage:"Filesystem path to the certificate chain including any intermediate CAs and the TLS public key"`
TLSCertificateKeystring`name:"tls-certificate-key" usage:"Filesystem path to the TLS private key"`
OIDCEnabledbool`name:"oidc-enabled" usage:"Enabled OIDC authorization for this instance. If set to true, then the other OIDC flags must also be set."`
OIDCIdpNamestring`name:"oidc-idp-name" usage:"Name of the OIDC identity provider. Will be shown to the user when logging in."`
OIDCSkipVerificationbool`name:"oidc-skip-verification" usage:"Skip verification of tokens returned by the OIDC provider. Should only be set to 'true' for testing purposes, never in a production environment!"`
OIDCIssuerstring`name:"oidc-issuer" usage:"Address of the OIDC issuer. Should be the web address, including protocol, at which the issuer can be reached. Eg., 'https://example.org/auth'"`
OIDCClientIDstring`name:"oidc-client-id" usage:"ClientID of GoToSocial, as registered with the OIDC provider."`
OIDCClientSecretstring`name:"oidc-client-secret" usage:"ClientSecret of GoToSocial, as registered with the OIDC provider."`
OIDCAllowedGroups[]string`name:"oidc-allowed-groups" usage:"Membership of one of the listed groups allows access to GtS. If this is empty, all groups are allowed."`
SMTPHoststring`name:"smtp-host" usage:"Host of the smtp server. Eg., 'smtp.eu.mailgun.org'"`
SMTPPortint`name:"smtp-port" usage:"Port of the smtp server. Eg., 587"`
SMTPUsernamestring`name:"smtp-username" usage:"Username to authenticate with the smtp server as. Eg., 'postmaster@mail.example.org'"`
SMTPPasswordstring`name:"smtp-password" usage:"Password to pass to the smtp server."`
SMTPFromstring`name:"smtp-from" usage:"Address to use as the 'from' field of the email. Eg., 'gotosocial@example.org'"`
SMTPDiscloseRecipientsbool`name:"smtp-disclose-recipients" usage:"If true, email notifications sent to multiple recipients will be To'd to every recipient at once. If false, recipients will not be disclosed"`
AdminAccountUsernamestring`name:"username" usage:"the username to create/delete/etc" ephemeral:"yes"`
AdminAccountEmailstring`name:"email" usage:"the email address of this account" ephemeral:"yes"`
AdminAccountPasswordstring`name:"password" usage:"the password to set for this account" ephemeral:"yes"`
AdminTransPathstring`name:"path" usage:"the path of the file to import from/export to" ephemeral:"yes"`
AdminMediaPruneDryRunbool`name:"dry-run" usage:"perform a dry run and only log number of items eligible for pruning" ephemeral:"yes"`
AdminMediaListLocalOnlybool`name:"local-only" usage:"list only local attachments/emojis; if specified then remote-only cannot also be true" ephemeral:"yes"`
AdminMediaListRemoteOnlybool`name:"remote-only" usage:"list only remote attachments/emojis; if specified then local-only cannot also be true" ephemeral:"yes"`
DescriptionMinCharsint`name:"description-min-chars" usage:"Min required chars for an image description"`
DescriptionMaxCharsint`name:"description-max-chars" usage:"Max permitted chars for an image description"`
RemoteCacheDaysint`name:"remote-cache-days" usage:"Number of days to locally cache media from remote instances. If set to 0, remote media will be kept indefinitely."`
EmojiLocalMaxSizebytesize.Size`name:"emoji-local-max-size" usage:"Max size in bytes of emojis uploaded to this instance via the admin API."`
EmojiRemoteMaxSizebytesize.Size`name:"emoji-remote-max-size" usage:"Max size in bytes of emojis to download from other instances."`
ImageSizeHintbytesize.Size`name:"image-size-hint" usage:"Size in bytes of max image size referred to on /api/v_/instance endpoints (else, local max size)"`
VideoSizeHintbytesize.Size`name:"video-size-hint" usage:"Size in bytes of max video size referred to on /api/v_/instance endpoints (else, local max size)"`
LocalMaxSizebytesize.Size`name:"local-max-size" usage:"Max size in bytes of media uploaded to this instance via API"`
RemoteMaxSizebytesize.Size`name:"remote-max-size" usage:"Max size in bytes of media to download from other instances"`
CleanupFromstring`name:"cleanup-from" usage:"Time of day from which to start running media cleanup/prune jobs. Should be in the format 'hh:mm:ss', eg., '15:04:05'."`
CleanupEverytime.Duration`name:"cleanup-every" usage:"Period to elapse between cleanups, starting from media-cleanup-at."`
FfmpegPoolSizeint`name:"ffmpeg-pool-size" usage:"Number of instances of the embedded ffmpeg WASM binary to add to the media processing pool. 0 or less uses GOMAXPROCS."`
ThumbMaxPixelsint`name:"thumb-max-pixels" usage:"Max size in pixels of any one dimension of a thumbnail (as input media ratio is preserved)."`
CookiesSamesitestring`name:"cookies-samesite" usage:"'strict' or 'lax', see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite"`
SenderMultiplierint`name:"sender-multiplier" usage:"Multiplier to use per cpu for batching outgoing fedi messages. 0 or less turns batching off (not recommended)."`
CSPExtraURIs[]string`name:"csp-extra-uris" usage:"Additional URIs to allow when building content-security-policy for media + images."`
Enabledbool`name:"enabled" usage:"Enable proof-of-work based scraper deterrence on profile / status pages"`
Difficultyuint32`name:"difficulty" usage:"The proof-of-work difficulty, which determines roughly how many hash-encode rounds required of each client."`