name: linuxserver-mastodon
services:
  app:
    image: linuxserver/mastodon:4.5.6
    restart: unless-stopped
    environment:
      PUID: $PUID
      PGID: $PGID
      TZ: $TZ
      LOCAL_DOMAIN: ''
      REDIS_HOST: ''
      REDIS_PORT: ''
      DB_HOST: ''
      DB_USER: ''
      DB_NAME: ''
      DB_PASS: ''
      DB_PORT: ''
      ES_ENABLED: ''
      ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: ''
      ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: ''
      ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: ''
      SECRET_KEY_BASE: ''
      OTP_SECRET: ''
      VAPID_PRIVATE_KEY: ''
      VAPID_PUBLIC_KEY: ''
      SMTP_SERVER: ''
      SMTP_PORT: ''
      SMTP_LOGIN: ''
      SMTP_PASSWORD: ''
      SMTP_FROM_ADDRESS: ''
      S3_ENABLED: ''
      WEB_DOMAIN: ''
      ES_HOST: ''
      ES_PORT: ''
      ES_USER: ''
      ES_PASS: ''
      S3_BUCKET: ''
      AWS_ACCESS_KEY_ID: ''
      AWS_SECRET_ACCESS_KEY: ''
      S3_ALIAS_HOST: ''
      SIDEKIQ_ONLY: ''
      SIDEKIQ_QUEUE: ''
      SIDEKIQ_DEFAULT: ''
      SIDEKIQ_THREADS: ''
      DB_POOL: ''
      NO_CHOWN: ''
      MASTODON_PROMETHEUS_EXPORTER_ENABLED: ''
    x-casaos:
      envs:
        - container: PUID
          description:
            en_us: Run 'id [USER]' for the owner of the host volume directories to get the UID to use here.
        - container: PGID
          description:
            en_us: Run 'id [USER]' for the owner of the host volume directories to get the GID to use here.
        - container: TZ
          description:
            en_us: specify a timezone to use, see this list.
        - container: LOCAL_DOMAIN
          description:
            en_us: This is the unique identifier of your server in the network. It cannot be safely changed later.
        - container: REDIS_HOST
          description:
            en_us: Redis server hostname
        - container: REDIS_PORT
          description:
            en_us: Redis port
        - container: DB_HOST
          description:
            en_us: Postgres database hostname
        - container: DB_USER
          description:
            en_us: Postgres username
        - container: DB_NAME
          description:
            en_us: Postgres db name
        - container: DB_PASS
          description:
            en_us: Postgres password
        - container: DB_PORT
          description:
            en_us: Postgres port
        - container: ES_ENABLED
          description:
            en_us: Enable or disable Elasticsearch (requires a separate ES instance)
        - container: ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY
          description:
            en_us: Primary key for Active Record Encryption.
        - container: ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY
          description:
            en_us: Deterministic key for Active Record Encryption.
        - container: ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT
          description:
            en_us: Derivation salt for Active Record Encryption.
        - container: SECRET_KEY_BASE
          description:
            en_us: Browser session secret. Changing it will break all active browser sessions.
        - container: OTP_SECRET
          description:
            en_us: MFA secret. Changing it after initial setup will break two-factor authentication.
        - container: VAPID_PRIVATE_KEY
          description:
            en_us: Push notification private key. Changing it after initial setup will break push notifications.
        - container: VAPID_PUBLIC_KEY
          description:
            en_us: Push notification public key. Changing it after initial setup will break push notifications.
        - container: SMTP_SERVER
          description:
            en_us: SMTP server for email notifications
        - container: SMTP_PORT
          description:
            en_us: SMTP server port
        - container: SMTP_LOGIN
          description:
            en_us: SMTP username
        - container: SMTP_PASSWORD
          description:
            en_us: SMTP password
        - container: SMTP_FROM_ADDRESS
          description:
            en_us: From address for emails send from Mastodon
        - container: S3_ENABLED
          description:
            en_us: Enable or disable S3 storage of uploaded files
        - container: WEB_DOMAIN
          description:
            en_us: This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See https://docs.joinmastodon.org/admin/config/#basic [OPTIONAL]
        - container: ES_HOST
          description:
            en_us: Elasticsearch server hostname [OPTIONAL]
        - container: ES_PORT
          description:
            en_us: Elasticsearch port [OPTIONAL]
        - container: ES_USER
          description:
            en_us: Elasticsearch username [OPTIONAL]
        - container: ES_PASS
          description:
            en_us: Elasticsearch password [OPTIONAL]
        - container: S3_BUCKET
          description:
            en_us: S3 bucket hostname [OPTIONAL]
        - container: AWS_ACCESS_KEY_ID
          description:
            en_us: S3 bucket access key ID [OPTIONAL]
        - container: AWS_SECRET_ACCESS_KEY
          description:
            en_us: S3 bucket secret access key [OPTIONAL]
        - container: S3_ALIAS_HOST
          description:
            en_us: Alternate hostname for object fetching if you are front the S3 connections. [OPTIONAL]
        - container: SIDEKIQ_ONLY
          description:
            en_us: Only run the sidekiq service in this container instance. For large scale instances that need better queue handling. [OPTIONAL]
        - container: SIDEKIQ_QUEUE
          description:
            en_us: The name of the sidekiq queue to run in this container. See notes. [OPTIONAL]
        - container: SIDEKIQ_DEFAULT
          description:
            en_us: Set to true on the main container if you're running additional sidekiq instances. It will run the default queue. [OPTIONAL]
        - container: SIDEKIQ_THREADS
          description:
            en_us: The number of threads for sidekiq to use. See notes. [OPTIONAL]
        - container: DB_POOL
          description:
            en_us: The size of the DB connection pool, must be at least the same as SIDEKIQ_THREADS. See notes. [OPTIONAL]
        - container: NO_CHOWN
          description:
            en_us: Set to true to skip chown of /config on init. READ THE APPLICATION NOTES BEFORE SETTING THIS. [OPTIONAL]
        - container: MASTODON_PROMETHEUS_EXPORTER_ENABLED
          description:
            en_us: If set to true, Mastodon’s Ruby processes (web & Sidekiq) will enable the Prometheus instrumentation. [OPTIONAL]
    ports:
      - target: 80
        published: 80
        protocol: tcp
      - target: 443
        published: 443
        protocol: tcp
      - target: 9394
        published: 9394
        protocol: tcp
    volumes:
      - type: bind
        source: /srv/lsio/mastodon/config
        target: /config
x-casaos:
  architectures:
    - amd64
    - arm64
  main: app
  description:
    en_us: Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones..
  tagline:
    en_us: A free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. .
  developer: LinuxServer.io
  author: WisdomSky
  icon: https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mastodon-banner.png
  thumbnail: https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mastodon-banner.png
  title:
    en_us: Mastodon
  category: LinuxServer.io
  port_map: '80'
