Skip to content

Instantly share code, notes, and snippets.

@rmoriz
Created August 5, 2025 21:35
Show Gist options
  • Save rmoriz/a2b3406639b230952c4e19372e3d8af3 to your computer and use it in GitHub Desktop.
Save rmoriz/a2b3406639b230952c4e19372e3d8af3 to your computer and use it in GitHub Desktop.
GoToSocial ENV / Environment variables almost complete list (as of 2025-08-05)

GoToSocial Environment Variables

GoToSocial uses environment variables with the GTS_ prefix. Any command-line flag can be converted to an environment variable by:

  1. Adding the GTS_ prefix
  2. Converting hyphens to underscores
  3. Converting to uppercase

General Configuration

  • GTS_LOG_LEVEL - Log level (trace, debug, info, warn, error, fatal)
  • GTS_LOG_TIMESTAMP_FORMAT - Timestamp format for logs
  • GTS_LOG_DB_QUERIES - Log database queries verbosely
  • GTS_LOG_CLIENT_IP - Include client IP in logs
  • GTS_REQUEST_ID_HEADER - Header to extract Request ID from
  • GTS_CONFIG_PATH - Path to configuration file
  • GTS_APPLICATION_NAME - Application name
  • GTS_LANDING_PAGE_USER - User to show on landing page
  • GTS_HOST - Server hostname
  • GTS_ACCOUNT_DOMAIN - Domain for account names
  • GTS_PROTOCOL - Protocol (http/https)
  • GTS_BIND_ADDRESS - Bind address
  • GTS_PORT - Port number
  • GTS_TRUSTED_PROXIES - Trusted proxy addresses

Database Configuration

  • GTS_DB_TYPE - Database type (postgres/sqlite)
  • GTS_DB_ADDRESS - Database address
  • GTS_DB_PORT - Database port
  • GTS_DB_USER - Database username
  • GTS_DB_PASSWORD - Database password
  • GTS_DB_DATABASE - Database name
  • GTS_DB_TLS_MODE - Database TLS mode
  • GTS_DB_TLS_CA_CERT - Path to CA cert for DB TLS
  • GTS_DB_MAX_OPEN_CONNS_MULTIPLIER - Database connection multiplier
  • GTS_DB_SQLITE_JOURNAL_MODE - SQLite journal mode
  • GTS_DB_SQLITE_SYNCHRONOUS - SQLite synchronous mode
  • GTS_DB_SQLITE_CACHE_SIZE - SQLite cache size
  • GTS_DB_SQLITE_BUSY_TIMEOUT - SQLite busy timeout
  • GTS_DB_POSTGRES_CONNECTION_STRING - Full PostgreSQL connection string

Web Configuration

  • GTS_WEB_TEMPLATE_BASE_DIR - HTML template directory
  • GTS_WEB_ASSET_BASE_DIR - Static assets directory

Instance Configuration

  • GTS_INSTANCE_FEDERATION_MODE - Federation mode (blocklist/allowlist)
  • GTS_INSTANCE_FEDERATION_SPAM_FILTER - Enable spam filter
  • GTS_INSTANCE_EXPOSE_PEERS - Expose peers endpoint
  • GTS_INSTANCE_EXPOSE_BLOCKLIST - Expose blocklist
  • GTS_INSTANCE_EXPOSE_BLOCKLIST_WEB - Expose blocklist on web
  • GTS_INSTANCE_EXPOSE_ALLOWLIST - Expose allowlist
  • GTS_INSTANCE_EXPOSE_ALLOWLIST_WEB - Expose allowlist on web
  • GTS_INSTANCE_EXPOSE_PUBLIC_TIMELINE - Expose public timeline
  • GTS_INSTANCE_EXPOSE_CUSTOM_EMOJIS - Expose custom emojis
  • GTS_INSTANCE_DELIVER_TO_SHARED_INBOXES - Use shared inboxes
  • GTS_INSTANCE_INJECT_MASTODON_VERSION - Inject Mastodon version
  • GTS_INSTANCE_LANGUAGES - Preferred languages
  • GTS_INSTANCE_SUBSCRIPTIONS_PROCESS_FROM - Subscription processing start time
  • GTS_INSTANCE_SUBSCRIPTIONS_PROCESS_EVERY - Subscription processing interval
  • GTS_INSTANCE_STATS_MODE - Stats serving mode
  • GTS_INSTANCE_ALLOW_BACKDATING_STATUSES - Allow backdating statuses

Account Configuration

  • GTS_ACCOUNTS_REGISTRATION_OPEN - Allow open registration
  • GTS_ACCOUNTS_REASON_REQUIRED - Require reason for signup
  • GTS_ACCOUNTS_REGISTRATION_DAILY_LIMIT - Daily registration limit
  • GTS_ACCOUNTS_REGISTRATION_BACKLOG_LIMIT - Registration backlog limit
  • GTS_ACCOUNTS_ALLOW_CUSTOM_CSS - Allow custom CSS
  • GTS_ACCOUNTS_CUSTOM_CSS_LENGTH - Custom CSS length limit
  • GTS_ACCOUNTS_MAX_PROFILE_FIELDS - Max profile fields

Storage Configuration

  • GTS_STORAGE_BACKEND - Storage backend (local/s3)
  • GTS_STORAGE_LOCAL_BASE_PATH - Local storage path
  • GTS_STORAGE_S3_ENDPOINT - S3 endpoint
  • GTS_STORAGE_S3_ACCESS_KEY - S3 access key
  • GTS_STORAGE_S3_SECRET_KEY - S3 secret key
  • GTS_STORAGE_S3_USE_SSL - Use SSL for S3
  • GTS_STORAGE_S3_BUCKET - S3 bucket name
  • GTS_STORAGE_S3_PROXY - Proxy S3 content
  • GTS_STORAGE_S3_REDIRECT_URL - Custom S3 redirect URL
  • GTS_STORAGE_S3_BUCKET_LOOKUP - S3 bucket lookup type
  • GTS_STORAGE_S3_KEY_PREFIX - S3 key prefix

Status Configuration

  • GTS_STATUSES_MAX_CHARS - Max status characters
  • GTS_STATUSES_POLL_MAX_OPTIONS - Max poll options
  • GTS_STATUSES_POLL_OPTION_MAX_CHARS - Max poll option characters
  • GTS_STATUSES_MEDIA_MAX_FILES - Max media files per status

Media Configuration

  • GTS_MEDIA_DESCRIPTION_MIN_CHARS - Min media description chars
  • GTS_MEDIA_DESCRIPTION_MAX_CHARS - Max media description chars
  • GTS_MEDIA_REMOTE_CACHE_DAYS - Remote media cache days
  • GTS_MEDIA_EMOJI_LOCAL_MAX_SIZE - Local emoji max size
  • GTS_MEDIA_EMOJI_REMOTE_MAX_SIZE - Remote emoji max size
  • GTS_MEDIA_LOCAL_MAX_SIZE - Local media max size
  • GTS_MEDIA_REMOTE_MAX_SIZE - Remote media max size
  • GTS_MEDIA_CLEANUP_FROM - Media cleanup start time
  • GTS_MEDIA_CLEANUP_EVERY - Media cleanup interval
  • GTS_MEDIA_FFMPEG_POOL_SIZE - FFMPEG pool size
  • GTS_MEDIA_THUMB_MAX_PIXELS - Thumbnail max pixels

TLS/LetsEncrypt Configuration

  • GTS_LETSENCRYPT_ENABLED - Enable LetsEncrypt
  • GTS_LETSENCRYPT_PORT - LetsEncrypt port
  • GTS_LETSENCRYPT_CERT_DIR - Certificate directory
  • GTS_LETSENCRYPT_EMAIL_ADDRESS - Email for LetsEncrypt
  • GTS_TLS_CERTIFICATE_CHAIN - TLS certificate chain path
  • GTS_TLS_CERTIFICATE_KEY - TLS private key path

OIDC Configuration

  • GTS_OIDC_ENABLED - Enable OIDC
  • GTS_OIDC_IDP_NAME - OIDC provider name
  • GTS_OIDC_SKIP_VERIFICATION - Skip OIDC verification
  • GTS_OIDC_ISSUER - OIDC issuer URL
  • GTS_OIDC_CLIENT_ID - OIDC client ID
  • GTS_OIDC_CLIENT_SECRET - OIDC client secret
  • GTS_OIDC_SCOPES - OIDC scopes
  • GTS_OIDC_LINK_EXISTING - Link existing users
  • GTS_OIDC_ALLOWED_GROUPS - Allowed groups
  • GTS_OIDC_ADMIN_GROUPS - Admin groups

SMTP Configuration

  • GTS_SMTP_HOST - SMTP host
  • GTS_SMTP_PORT - SMTP port
  • GTS_SMTP_USERNAME - SMTP username
  • GTS_SMTP_PASSWORD - SMTP password
  • GTS_SMTP_FROM - SMTP from address
  • GTS_SMTP_DISCLOSE_RECIPIENTS - Disclose email recipients

Observability Configuration

  • GTS_TRACING_ENABLED - Enable tracing
  • GTS_METRICS_ENABLED - Enable metrics

Syslog Configuration

  • GTS_SYSLOG_ENABLED - Enable syslog
  • GTS_SYSLOG_PROTOCOL - Syslog protocol
  • GTS_SYSLOG_ADDRESS - Syslog address

HTTP Client Configuration

  • GTS_HTTP_CLIENT_ALLOW_IPS - Allowed IPs for outgoing requests
  • GTS_HTTP_CLIENT_BLOCK_IPS - Blocked IPs for outgoing requests
  • GTS_HTTP_CLIENT_TIMEOUT - HTTP client timeout
  • GTS_HTTP_CLIENT_TLS_INSECURE_SKIP_VERIFY - Skip TLS verification
  • GTS_HTTP_CLIENT_INSECURE_OUTGOING - Use insecure outgoing connections

Advanced Configuration

  • GTS_ADVANCED_COOKIES_SAMESITE - Cookie SameSite attribute
  • GTS_ADVANCED_SENDER_MULTIPLIER - ActivityPub sender multiplier
  • GTS_ADVANCED_CSP_EXTRA_URIS - Extra CSP URIs
  • GTS_ADVANCED_HEADER_FILTER_MODE - Header filter mode
  • GTS_ADVANCED_RATE_LIMIT_REQUESTS - Rate limit requests
  • GTS_ADVANCED_RATE_LIMIT_EXCEPTIONS - Rate limit exceptions
  • GTS_ADVANCED_THROTTLING_MULTIPLIER - Throttling multiplier
  • GTS_ADVANCED_THROTTLING_RETRY_AFTER - Throttling retry after
  • GTS_ADVANCED_SCRAPER_DETERRENCE_ENABLED - Enable scraper deterrence
  • GTS_ADVANCED_SCRAPER_DETERRENCE_DIFFICULTY - Scraper deterrence difficulty

Cache Configuration

  • GTS_CACHE_MEMORY_TARGET - Memory target for caches
  • GTS_CACHE_ACCOUNT_MEM_RATIO - Account cache memory ratio
  • GTS_CACHE_ACCOUNT_NOTE_MEM_RATIO - Account note cache memory ratio
  • GTS_CACHE_ACCOUNT_SETTINGS_MEM_RATIO - Account settings cache memory ratio
  • GTS_CACHE_ACCOUNT_STATS_MEM_RATIO - Account stats cache memory ratio
  • GTS_CACHE_APPLICATION_MEM_RATIO - Application cache memory ratio
  • GTS_CACHE_BLOCK_MEM_RATIO - Block cache memory ratio
  • GTS_CACHE_BLOCK_IDS_MEM_RATIO - Block IDs cache memory ratio
  • GTS_CACHE_BOOST_OF_IDS_MEM_RATIO - Boost of IDs cache memory ratio
  • GTS_CACHE_CLIENT_MEM_RATIO - Client cache memory ratio
  • GTS_CACHE_CONVERSATION_MEM_RATIO - Conversation cache memory ratio
  • GTS_CACHE_CONVERSATION_LAST_STATUS_IDS_MEM_RATIO - Conversation last status IDs cache memory ratio
  • GTS_CACHE_DOMAIN_PERMISSION_DRAFT_MEM_RATIO - Domain permission draft cache memory ratio
  • GTS_CACHE_DOMAIN_PERMISSION_SUBSCRIPTION_MEM_RATIO - Domain permission subscription cache memory ratio
  • GTS_CACHE_EMOJI_MEM_RATIO - Emoji cache memory ratio
  • GTS_CACHE_EMOJI_CATEGORY_MEM_RATIO - Emoji category cache memory ratio
  • GTS_CACHE_FILTER_MEM_RATIO - Filter cache memory ratio
  • GTS_CACHE_FILTER_IDS_MEM_RATIO - Filter IDs cache memory ratio
  • GTS_CACHE_FILTER_KEYWORD_MEM_RATIO - Filter keyword cache memory ratio
  • GTS_CACHE_FILTER_STATUS_MEM_RATIO - Filter status cache memory ratio
  • GTS_CACHE_FOLLOW_MEM_RATIO - Follow cache memory ratio
  • GTS_CACHE_FOLLOW_IDS_MEM_RATIO - Follow IDs cache memory ratio
  • GTS_CACHE_FOLLOW_REQUEST_MEM_RATIO - Follow request cache memory ratio
  • GTS_CACHE_FOLLOW_REQUEST_IDS_MEM_RATIO - Follow request IDs cache memory ratio
  • GTS_CACHE_FOLLOWING_TAG_IDS_MEM_RATIO - Following tag IDs cache memory ratio
  • GTS_CACHE_IN_REPLY_TO_IDS_MEM_RATIO - In reply to IDs cache memory ratio
  • GTS_CACHE_INSTANCE_MEM_RATIO - Instance cache memory ratio
  • GTS_CACHE_INTERACTION_REQUEST_MEM_RATIO - Interaction request cache memory ratio
  • GTS_CACHE_LIST_MEM_RATIO - List cache memory ratio
  • GTS_CACHE_LIST_IDS_MEM_RATIO - List IDs cache memory ratio
  • GTS_CACHE_LISTED_IDS_MEM_RATIO - Listed IDs cache memory ratio
  • GTS_CACHE_MARKER_MEM_RATIO - Marker cache memory ratio
  • GTS_CACHE_MEDIA_MEM_RATIO - Media cache memory ratio
  • GTS_CACHE_MENTION_MEM_RATIO - Mention cache memory ratio
  • GTS_CACHE_MOVE_MEM_RATIO - Move cache memory ratio
  • GTS_CACHE_NOTIFICATION_MEM_RATIO - Notification cache memory ratio
  • GTS_CACHE_POLL_MEM_RATIO - Poll cache memory ratio
  • GTS_CACHE_POLL_VOTE_MEM_RATIO - Poll vote cache memory ratio
  • GTS_CACHE_POLL_VOTE_IDS_MEM_RATIO - Poll vote IDs cache memory ratio
  • GTS_CACHE_REPORT_MEM_RATIO - Report cache memory ratio
  • GTS_CACHE_SIN_BIN_STATUS_MEM_RATIO - Sin bin status cache memory ratio
  • GTS_CACHE_STATUS_MEM_RATIO - Status cache memory ratio
  • GTS_CACHE_STATUS_BOOKMARK_MEM_RATIO - Status bookmark cache memory ratio
  • GTS_CACHE_STATUS_BOOKMARK_IDS_MEM_RATIO - Status bookmark IDs cache memory ratio
  • GTS_CACHE_STATUS_EDIT_MEM_RATIO - Status edit cache memory ratio
  • GTS_CACHE_STATUS_FAVE_MEM_RATIO - Status fave cache memory ratio
  • GTS_CACHE_STATUS_FAVE_IDS_MEM_RATIO - Status fave IDs cache memory ratio
  • GTS_CACHE_TAG_MEM_RATIO - Tag cache memory ratio
  • GTS_CACHE_THREAD_MUTE_MEM_RATIO - Thread mute cache memory ratio
  • GTS_CACHE_TOKEN_MEM_RATIO - Token cache memory ratio
  • GTS_CACHE_TOMBSTONE_MEM_RATIO - Tombstone cache memory ratio
  • GTS_CACHE_USER_MEM_RATIO - User cache memory ratio
  • GTS_CACHE_USER_MUTE_MEM_RATIO - User mute cache memory ratio
  • GTS_CACHE_USER_MUTE_IDS_MEM_RATIO - User mute IDs cache memory ratio
  • GTS_CACHE_WEBFINGER_MEM_RATIO - Webfinger cache memory ratio
  • GTS_CACHE_WEB_PUSH_SUBSCRIPTION_MEM_RATIO - Web push subscription cache memory ratio
  • GTS_CACHE_WEB_PUSH_SUBSCRIPTION_IDS_MEM_RATIO - Web push subscription IDs cache memory ratio
  • GTS_CACHE_MUTES_MEM_RATIO - Mutes cache memory ratio
  • GTS_CACHE_STATUS_FILTER_MEM_RATIO - Status filter cache memory ratio
  • GTS_CACHE_VISIBILITY_MEM_RATIO - Visibility cache memory ratio

Admin Commands (Ephemeral)

These are temporary environment variables used for admin commands:

  • GTS_USERNAME - Username for admin operations
  • GTS_EMAIL - Email for admin operations
  • GTS_PASSWORD - Password for admin operations
  • GTS_PATH - Path for import/export operations
  • GTS_DRY_RUN - Perform dry run for media prune
  • GTS_LOCAL_ONLY - List only local attachments/emojis
  • GTS_REMOTE_ONLY - List only remote attachments/emojis
  • GTS_SKIP_DB_SETUP - Skip testrig database setup
  • GTS_SKIP_DB_TEARDOWN - Skip testrig database teardown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment