Stasiek Michalski 7bfc09
# Configuration specific to AS registration. Unless other marked, all fields
Stasiek Michalski 7bfc09
# are *REQUIRED*.
Stasiek Michalski 7bfc09
homeserver:
Stasiek Michalski 7bfc09
  # The URL to the home server for client-server API calls, also used to form the
Stasiek Michalski 7bfc09
  # media URLs as displayed in bridged IRC channels:
Stasiek Michalski 7bfc09
  url: "https://matrix.opensuse.org:8448"
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # The URL of the homeserver hosting media files. This is only used to transform
Stasiek Michalski 7bfc09
  # mxc URIs to http URIs when bridging m.room.[file|image] events. Optional. By
Stasiek Michalski 7bfc09
  # default, this is the homeserver URL, specified above.
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # media_url: "http://media.repo:8008"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Drop Matrix messages which are older than this number of seconds, according to
Stasiek Michalski 7bfc09
  # the event's origin_server_ts.
Stasiek Michalski 7bfc09
  # If the bridge is down for a while, the homeserver will attempt to send all missed
Stasiek Michalski 7bfc09
  # events on reconnection. These events may be hours old, which can be confusing to
Stasiek Michalski 7bfc09
  # IRC users if they are then bridged. This option allows these old messages to be
Stasiek Michalski 7bfc09
  # dropped.
Stasiek Michalski 7bfc09
  # CAUTION: This is a very coarse heuristic. Federated homeservers may have different
Stasiek Michalski 7bfc09
  # clock times and hence produce different origin_server_ts values, which may be old
Stasiek Michalski 7bfc09
  # enough to cause *all* events from the homeserver to be dropped.
Stasiek Michalski 7bfc09
  # Default: 0 (don't ever drop)
Stasiek Michalski 7bfc09
  # dropMatrixMessagesAfterSecs: 300 # 5 minutes
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # The 'domain' part for user IDs on this home server. Usually (but not always)
Stasiek Michalski 7bfc09
  # is the "domain name" part of the HS URL.
Stasiek Michalski 7bfc09
  domain: "opensuse.org"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Should presence be enabled for matrix clients on this bridge. If disabled on the
Stasiek Michalski 7bfc09
  # homeserver then it should also be disabled here to avoid excess traffic.
Stasiek Michalski 7bfc09
  # Default: true
Stasiek Michalski 7bfc09
  enablePresence: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Which port should the appservice bind to. Takes priority over the one provided in the
Stasiek Michalski 7bfc09
  # command line! Optional.
Stasiek Michalski 7bfc09
  # bindPort: 9999
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Use this option to force the appservice to listen on another hostname for transactions.
Stasiek Michalski 7bfc09
  # This is NOT your synapse hostname. E.g. use 127.0.0.1 to only listen locally. Optional.
Stasiek Michalski 7bfc09
  # bindHostname: 0.0.0.0
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
# Configuration specific to the IRC service
Stasiek Michalski 7bfc09
ircService:
Stasiek Michalski 7bfc09
  servers:
Stasiek Michalski 7bfc09
    # The address of the server to connect to.
Stasiek Michalski 7bfc09
    chat.freenode.net:
Stasiek Michalski 7bfc09
      # A human-readable short name. This is used to label IRC status rooms
Stasiek Michalski 7bfc09
      # where matrix users control their connections.
Stasiek Michalski 7bfc09
      # E.g. 'ExampleNet IRC Bridge status'.
Stasiek Michalski 7bfc09
      # It is also used in the Third Party Lookup API as the instance `desc`
Stasiek Michalski 7bfc09
      # property, where each server is an instance.
Stasiek Michalski 7bfc09
      name: "Freenode"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # additionalAddresses: [ "irc2.example.com" ]
Stasiek Michalski 7bfc09
      #
Stasiek Michalski 7bfc09
      # [DEPRECATED] Use `name`, above, instead.
Stasiek Michalski 7bfc09
      # A human-readable description string
Stasiek Michalski d2d06c
      # description: "Example.com IRC network"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # An ID for uniquely identifying this server amongst other servers being bridged.
Stasiek Michalski 7bfc09
      # networkId: "example"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # URL to an icon used as the network icon whenever this network appear in
Stasiek Michalski 7bfc09
      # a network list. (Like in the riot room directory, for instance.)
Stasiek Michalski d2d06c
      # icon: https://example.com/images/hash.png
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # The port to connect to. Optional.
Stasiek Michalski 7bfc09
      port: 6697
Stasiek Michalski 7bfc09
      # Whether to use SSL or not. Default: false.
Stasiek Michalski 7bfc09
      ssl: true
Stasiek Michalski 7bfc09
      # Whether or not IRC server is using a self-signed cert or not providing CA Chain
Stasiek Michalski 7bfc09
      sslselfsign: false
Stasiek Michalski 7bfc09
      # Should the connection attempt to identify via SASL (if a server or user password is given)
Stasiek Michalski 7bfc09
      # If false, this will use PASS instead. If SASL fails, we do not fallback to PASS.
Stasiek Michalski 7bfc09
      sasl: false
Stasiek Michalski 7bfc09
      # Whether to allow expired certs when connecting to the IRC server.
Stasiek Michalski 7bfc09
      # Usually this should be off. Default: false.
Stasiek Michalski 7bfc09
      allowExpiredCerts: false
Stasiek Michalski 7bfc09
      # A specific CA to trust instead of the default CAs. Optional.
Stasiek Michalski 7bfc09
      #ca: |
Stasiek Michalski 7bfc09
      #  -----BEGIN CERTIFICATE-----
Stasiek Michalski 7bfc09
      #  ...
Stasiek Michalski 7bfc09
      #  -----END CERTIFICATE-----
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      #
Stasiek Michalski 7bfc09
      # The connection password to send for all clients as a PASS (or SASL, if enabled above) command. Optional.
Stasiek Michalski 7bfc09
      # password: 'pa$$w0rd'
Stasiek Michalski 7bfc09
      #
Stasiek Michalski 7bfc09
      # Whether or not to send connection/error notices to real Matrix users. Default: true.
Stasiek Michalski 7bfc09
      sendConnectionMessages: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      quitDebounce:
Stasiek Michalski 7bfc09
        # Whether parts due to net-splits are debounced for delayMs, to allow
Stasiek Michalski 7bfc09
        # time for the netsplit to resolve itself. A netsplit is detected as being
Stasiek Michalski 7bfc09
        # a QUIT rate higher than quitsPerSecond. Default: false.
Stasiek Michalski 7bfc09
        enabled: false
Stasiek Michalski 7bfc09
        # The maximum number of quits per second acceptable above which a netsplit is
Stasiek Michalski 7bfc09
        # considered ongoing. Default: 5.
Stasiek Michalski 7bfc09
        quitsPerSecond: 5
Stasiek Michalski 7bfc09
        # The time window in which to wait before bridging a QUIT to Matrix that occurred during
Stasiek Michalski 7bfc09
        # a netsplit. Debouncing is jittered randomly between delayMinMs and delayMaxMs so that the HS
Stasiek Michalski 7bfc09
        # is not sent many requests to leave rooms all at once if a netsplit occurs and many
Stasiek Michalski 7bfc09
        # people to not rejoin.
Stasiek Michalski 7bfc09
        # If the user with the same IRC nick as the one who sent the quit rejoins a channel
Stasiek Michalski 7bfc09
        # they are considered back online and the quit is not bridged, so long as the rejoin
Stasiek Michalski 7bfc09
        # occurs before the randomly-jittered timeout is not reached.
Stasiek Michalski 7bfc09
        # Default: 3600000, = 1h
Stasiek Michalski 7bfc09
        delayMinMs: 3600000 # 1h
Stasiek Michalski 7bfc09
        # Default: 7200000, = 2h
Stasiek Michalski 7bfc09
        delayMaxMs: 7200000 # 2h
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # A map for conversion of IRC user modes to Matrix power levels. This enables bridging
Stasiek Michalski 7bfc09
      # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has
Stasiek Michalski 7bfc09
      # been given multiple modes, the one that maps to the highest power level will be used.
Stasiek Michalski 7bfc09
      modePowerMap:
Stasiek Michalski 7bfc09
        o: 50
Stasiek Michalski 7bfc09
        v: 1
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      botConfig:
Stasiek Michalski 7bfc09
        # Enable the presence of the bot in IRC channels. The bot serves as the entity
Stasiek Michalski 7bfc09
        # which maps from IRC -> Matrix. You can disable the bot entirely which
Stasiek Michalski 7bfc09
        # means IRC -> Matrix chat will be shared by active "M-Nick" connections
Stasiek Michalski 7bfc09
        # in the room. If there are no users in the room (or if there are users
Stasiek Michalski 7bfc09
        # but their connections are not on IRC) then nothing will be bridged to
Stasiek Michalski 7bfc09
        # Matrix. If you're concerned about the bot being treated as a "logger"
Stasiek Michalski 7bfc09
        # entity, then you may want to disable the bot. If you want IRC->Matrix
Stasiek Michalski 7bfc09
        # but don't want to have TCP connections to IRC unless a Matrix user speaks
Stasiek Michalski 7bfc09
        # (because your client connection limit is low), then you may want to keep
Stasiek Michalski 7bfc09
        # the bot enabled. Default: true.
Stasiek Michalski 7bfc09
        # NB: If the bot is disabled, you SHOULD have matrix-to-IRC syncing turned
Stasiek Michalski 7bfc09
        #     on, else there will be no users and no bot in a channel (meaning no
Stasiek Michalski 7bfc09
        #     messages to Matrix!) until a Matrix user speaks which makes a client
Stasiek Michalski 7bfc09
        #     join the target IRC channel.
Stasiek Michalski 7bfc09
        # NBB: The bridge bot IRC client will still join the target IRC network so
Stasiek Michalski 7bfc09
        #      it can service bridge-specific queries from the IRC-side e.g. so
Stasiek Michalski 7bfc09
        #      real IRC clients have a way to change their Matrix display name.
Stasiek Michalski 7bfc09
        #      See https://github.com/matrix-org/matrix-appservice-irc/issues/55
Stasiek Michalski 7bfc09
        enabled: true
Stasiek Michalski 7bfc09
        # The nickname to give the AS bot.
Stasiek Michalski 7bfc09
        nick: "openSUSEBot"
Stasiek Michalski 7bfc09
        # The password to give to NickServ or IRC Server for this nick. Optional.
Stasiek Michalski 7bfc09
        password: "{{ pillar['profile']['matrix']['appservices']['irc']['bot_password'] }}"
Stasiek Michalski 7bfc09
        #
Stasiek Michalski 7bfc09
        # Join channels even if there are no Matrix users on the other side of
Stasiek Michalski 7bfc09
        # the bridge. Set to false to prevent the bot from joining channels which have no
Stasiek Michalski 7bfc09
        # real matrix users in them, even if there is a mapping for the channel.
Stasiek Michalski 7bfc09
        # Default: true
Stasiek Michalski 7bfc09
        joinChannelsIfNoUsers: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # Configuration for PMs / private 1:1 communications between users.
Stasiek Michalski 7bfc09
      privateMessages:
Stasiek Michalski 7bfc09
        # Enable the ability for PMs to be sent to/from IRC/Matrix.
Stasiek Michalski 7bfc09
        # Default: true.
Stasiek Michalski 7bfc09
        enabled: true
Stasiek Michalski 7bfc09
        # Prevent Matrix users from sending PMs to the following IRC nicks.
Stasiek Michalski 7bfc09
        # Optional. Default: [].
Stasiek Michalski 7bfc09
        # exclude: ["Alice", "Bob"] # NOT YET IMPLEMENTED
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
        # Should created Matrix PM rooms be federated? If false, only users on the
Stasiek Michalski 7bfc09
        # HS attached to this AS will be able to interact with this room.
Stasiek Michalski 7bfc09
        # Optional. Default: true.
Stasiek Michalski 7bfc09
        federate: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # Configuration for mappings not explicitly listed in the 'mappings'
Stasiek Michalski 7bfc09
      # section.
Stasiek Michalski 7bfc09
      dynamicChannels:
Stasiek Michalski 7bfc09
        # Enable the ability for Matrix users to join *any* channel on this IRC
Stasiek Michalski 7bfc09
        # network.
Stasiek Michalski 7bfc09
        # Default: false.
Stasiek Michalski 7bfc09
        enabled: false
Stasiek Michalski 7bfc09
        # Should the AS create a room alias for the new Matrix room? The form of
Stasiek Michalski 7bfc09
        # the alias can be modified via 'aliasTemplate'. Default: true.
Stasiek Michalski 7bfc09
        createAlias: true
Stasiek Michalski 7bfc09
        # Should the AS publish the new Matrix room to the public room list so
Stasiek Michalski 7bfc09
        # anyone can see it? Default: true.
Stasiek Michalski 7bfc09
        published: false
Stasiek Michalski 7bfc09
        # What should the join_rule be for the new Matrix room? If 'public',
Stasiek Michalski 7bfc09
        # anyone can join the room. If 'invite', only users with an invite can
Stasiek Michalski 7bfc09
        # join the room. Note that if an IRC channel has +k or +i set on it,
Stasiek Michalski 7bfc09
        # join_rules will be set to 'invite' until these modes are removed.
Stasiek Michalski 7bfc09
        # Default: "public".
Stasiek Michalski 7bfc09
        joinRule: public
Stasiek Michalski 7bfc09
        # This will set the m.room.related_groups state event in newly created rooms
Stasiek Michalski 7bfc09
        # with the given groupId. This means flares will show up on IRC users in those rooms.
Stasiek Michalski 7bfc09
        # This should be set to the same thing as namespaces.users.group_id in irc_registration.
Stasiek Michalski 7bfc09
        # This does not alter existing rooms.
Stasiek Michalski 7bfc09
        # Leaving this option empty will not set the event.
Stasiek Michalski 7bfc09
        groupId: +freenode:opensuse.org
Stasiek Michalski 7bfc09
        # Should created Matrix rooms be federated? If false, only users on the
Stasiek Michalski 7bfc09
        # HS attached to this AS will be able to interact with this room.
Stasiek Michalski 7bfc09
        # Default: true.
Stasiek Michalski 7bfc09
        federate: true
Stasiek Michalski 7bfc09
        # Force this room version when creating IRC channels. Beware if the homeserver doesn't
Stasiek Michalski 7bfc09
        # support the room version then the request will fail. By default, no version is requested.
Stasiek Michalski 7bfc09
        # roomVersion: "1"
Stasiek Michalski 7bfc09
        # The room alias template to apply when creating new aliases. This only
Stasiek Michalski 7bfc09
        # applies if createAlias is 'true'. The following variables are exposed:
Stasiek Michalski 7bfc09
        # $SERVER => The IRC server address (e.g. "irc.example.com")
Stasiek Michalski 7bfc09
        # $CHANNEL => The IRC channel (e.g. "#python")
Stasiek Michalski 7bfc09
        # This MUST have $CHANNEL somewhere in it.
Stasiek Michalski 7bfc09
        # Default: '#irc_$SERVER_$CHANNEL'
Stasiek Michalski 7bfc09
        aliasTemplate: "#freenode_$CHANNEL"
Stasiek Michalski 7bfc09
        # A list of user IDs which the AS bot will send invites to in response
Stasiek Michalski 7bfc09
        # to a !join. Only applies if joinRule is 'invite'. Default: []
Stasiek Michalski 7bfc09
        # whitelist:
Stasiek Michalski 7bfc09
        #   - "@foo:example.com"
Stasiek Michalski 7bfc09
        #   - "@bar:example.com"
Stasiek Michalski 7bfc09
        #
Stasiek Michalski 7bfc09
        # Prevent the given list of channels from being mapped under any
Stasiek Michalski 7bfc09
        # circumstances.
Stasiek Michalski 7bfc09
        # exclude: ["#foo", "#bar"]
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # excludedUsers:
Stasiek Michalski 7bfc09
      #   - regex: "@.*:evilcorp.com"
Stasiek Michalski 7bfc09
      #     kickReason: "We don't like Evilcorp"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # Configuration for controlling how Matrix and IRC membership lists are
Stasiek Michalski 7bfc09
      # synced.
Stasiek Michalski 7bfc09
      membershipLists:
Stasiek Michalski 7bfc09
        # Enable the syncing of membership lists between IRC and Matrix. This
Stasiek Michalski 7bfc09
        # can have a significant effect on performance on startup as the lists are
Stasiek Michalski 7bfc09
        # synced. This must be enabled for anything else in this section to take
Stasiek Michalski 7bfc09
        # effect. Default: false.
Stasiek Michalski 7bfc09
        enabled: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
        # Syncing membership lists at startup can result in hundreds of members to
Stasiek Michalski 7bfc09
        # process all at once. This timer drip feeds membership entries at the
Stasiek Michalski 7bfc09
        # specified rate. Default: 10000. (10s)
Stasiek Michalski 7bfc09
        floodDelayMs: 10000
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
        global:
Stasiek Michalski 7bfc09
          ircToMatrix:
Stasiek Michalski 7bfc09
            # Get a snapshot of all real IRC users on a channel (via NAMES) and
Stasiek Michalski 7bfc09
            # join their virtual matrix clients to the room.
Stasiek Michalski 7bfc09
            initial: true
Stasiek Michalski 7bfc09
            # Make virtual matrix clients join and leave rooms as their real IRC
Stasiek Michalski 7bfc09
            # counterparts join/part channels. Default: false.
Stasiek Michalski 7bfc09
            incremental: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
          matrixToIrc:
Stasiek Michalski 7bfc09
            # Get a snapshot of all real Matrix users in the room and join all of
Stasiek Michalski 7bfc09
            # them to the mapped IRC channel on startup. Default: false.
Stasiek Michalski 7bfc09
            initial: true
Stasiek Michalski 7bfc09
            # Make virtual IRC clients join and leave channels as their real Matrix
Stasiek Michalski 7bfc09
            # counterparts join/leave rooms. Make sure your 'maxClients' value is
Stasiek Michalski 7bfc09
            # high enough! Default: false.
Stasiek Michalski 7bfc09
            incremental: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
        # Apply specific rules to Matrix rooms. Only matrix-to-IRC takes effect.
Stasiek Michalski 7bfc09
        # rooms:
Stasiek Michalski 7bfc09
          # - room: "!fuasirouddJoxtwfge:localhost"
Stasiek Michalski 7bfc09
            # matrixToIrc:
Stasiek Michalski 7bfc09
              # initial: false
Stasiek Michalski 7bfc09
              # incremental: false
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
        # Apply specific rules to IRC channels. Only IRC-to-matrix takes effect.
Stasiek Michalski 7bfc09
        # channels:
Stasiek Michalski 7bfc09
          # - channel: "#foo"
Stasiek Michalski 7bfc09
            # ircToMatrix:
Stasiek Michalski 7bfc09
              # initial: false
Stasiek Michalski 7bfc09
              # incremental: false
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # mappings:
Stasiek Michalski 7bfc09
        # 1:many mappings from IRC channels to room IDs on this IRC server.
Stasiek Michalski 7bfc09
        # The matrix room must already exist. Your matrix client should expose
Stasiek Michalski 7bfc09
        # the room ID in a "settings" page for the room.
Stasiek Michalski 7bfc09
        # "#thepub":
Stasiek Michalski 7bfc09
          # roomIds: ["!kieouiJuedJoxtVdaG:localhost"]
Stasiek Michalski 7bfc09
          # Channel key/password to use. Optional. If provided, matrix users do
Stasiek Michalski 7bfc09
          # not need to know the channel key in order to join the channel.
Stasiek Michalski 7bfc09
          # key: "secret"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # Configuration for virtual matrix users. The following variables are
Stasiek Michalski 7bfc09
      # exposed:
Stasiek Michalski 7bfc09
      # $NICK => The IRC nick
Stasiek Michalski 7bfc09
      # $SERVER => The IRC server address (e.g. "irc.example.com")
Stasiek Michalski 7bfc09
      matrixClients:
Stasiek Michalski 7bfc09
        # The user ID template to use when creating virtual matrix users. This
Stasiek Michalski 7bfc09
        # MUST have $NICK somewhere in it.
Stasiek Michalski 7bfc09
        # Optional. Default: "@$SERVER_$NICK".
Stasiek Michalski 7bfc09
        # Example: "@irc.example.com_Alice:example.com"
Stasiek Michalski 7bfc09
        userTemplate: "@freenode_$NICK"
Stasiek Michalski 7bfc09
        # The display name to use for created matrix clients. This should have
Stasiek Michalski 7bfc09
        # $NICK somewhere in it if it is specified. Can also use $SERVER to
Stasiek Michalski 7bfc09
        # insert the IRC domain.
Stasiek Michalski 7bfc09
        # Optional. Default: "$NICK (IRC)". Example: "Alice (IRC)"
Stasiek Michalski 7bfc09
        displayName: "$NICK [Freenode]"
Stasiek Michalski 7bfc09
        # Number of tries a client can attempt to join a room before the request
Stasiek Michalski 7bfc09
        # is discarded. You can also use -1 to never retry or 0 to never give up.
Stasiek Michalski 7bfc09
        # Optional. Default: -1
Stasiek Michalski 7bfc09
        joinAttempts: -1
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
      # Configuration for virtual IRC users. The following variables are exposed:
Stasiek Michalski 7bfc09
      # $LOCALPART => The user ID localpart ("alice" in @alice:localhost)
Stasiek Michalski 7bfc09
      # $USERID => The user ID
Stasiek Michalski 7bfc09
      # $DISPLAY => The display name of this user, with excluded characters
Stasiek Michalski 7bfc09
      #             (e.g. space) removed. If the user has no display name, this
Stasiek Michalski 7bfc09
      #             falls back to $LOCALPART.
Stasiek Michalski 7bfc09
      ircClients:
Stasiek Michalski 7bfc09
        # The template to apply to every IRC client nick. This MUST have either
Stasiek Michalski 7bfc09
        # $DISPLAY or $USERID or $LOCALPART somewhere in it.
Stasiek Michalski 7bfc09
        # Optional. Default: "M-$DISPLAY". Example: "M-Alice".
Stasiek Michalski 7bfc09
        nickTemplate: "$DISPLAY[m]"
Stasiek Michalski 7bfc09
        # True to allow virtual IRC clients to change their nick on this server
Stasiek Michalski 7bfc09
        # by issuing !nick <server> <nick> commands to the IRC AS bot.
Stasiek Michalski 7bfc09
        # This is completely freeform: it will NOT follow the nickTemplate.
Stasiek Michalski 7bfc09
        allowNickChanges: true
Stasiek Michalski 7bfc09
        # The max number of IRC clients that will connect. If the limit is
Stasiek Michalski 7bfc09
        # reached, the client that spoke the longest time ago will be
Stasiek Michalski 7bfc09
        # disconnected and replaced.
Stasiek Michalski 7bfc09
        # Optional. Default: 30.
Stasiek Michalski 7bfc09
        maxClients: 30
Stasiek Michalski 7bfc09
        # IPv6 configuration.
Stasiek Michalski 7bfc09
        ipv6:
Stasiek Michalski 7bfc09
          # Optional. Set to true to force IPv6 for outgoing connections.
Stasiek Michalski 7bfc09
          only: false
Stasiek Michalski 7bfc09
          # Optional. The IPv6 prefix to use for generating unique addresses for each
Stasiek Michalski 7bfc09
          # connected user. If not specified, all users will connect from the same
Stasiek Michalski 7bfc09
          # (default) address. This may require additional OS-specific work to allow
Stasiek Michalski 7bfc09
          # for the node process to bind to multiple different source addresses
Stasiek Michalski 7bfc09
          # Linux kernels 4.3+ support sysctl net.ipv6.ip_nonlocal_bind=1
Stasiek Michalski 7bfc09
          # Older kernels will need IP_FREEBIND, which requires an LD_PRELOAD with the library
Stasiek Michalski 7bfc09
          # https://github.com/matrix-org/freebindfree as Node does not expose setsockopt.
Stasiek Michalski 7bfc09
          # prefix: "2001:0db8:85a3::"  # modify appropriately
Stasiek Michalski 7bfc09
        #
Stasiek Michalski 7bfc09
        # The maximum amount of time in seconds that the client can exist
Stasiek Michalski 7bfc09
        # without sending another message before being disconnected. Use 0 to
Stasiek Michalski 7bfc09
        # not apply an idle timeout. This value is ignored if this IRC server is
Stasiek Michalski 7bfc09
        # mirroring matrix membership lists to IRC. Default: 172800 (48 hours)
Stasiek Michalski 7bfc09
        idleTimeout: 10800
Stasiek Michalski 7bfc09
        # The number of millseconds to wait between consecutive reconnections if a
Stasiek Michalski 7bfc09
        # client gets disconnected. Setting to 0 will cause the scheduling to be
Stasiek Michalski 7bfc09
        # disabled, i.e. it will be scheduled immediately (with jitter.
Stasiek Michalski 7bfc09
        # Otherwise, the scheduling interval will be used such that one client
Stasiek Michalski 7bfc09
        # reconnect for this server will be handled every reconnectIntervalMs ms using
Stasiek Michalski 7bfc09
        # a FIFO queue.
Stasiek Michalski 7bfc09
        # Default: 5000 (5 seconds)
Stasiek Michalski 7bfc09
        reconnectIntervalMs: 5000
Stasiek Michalski 7bfc09
        # The number of concurrent reconnects if a user has been disconnected unexpectedly
Stasiek Michalski 7bfc09
        # (e.g. a netsplit). You should set this to a reasonably high number so that
Stasiek Michalski 7bfc09
        # bridges are not waiting an eternity to reconnect all its clients if
Stasiek Michalski 7bfc09
        # we see a massive number of disconnect. This is unrelated to the reconnectIntervalMs
Stasiek Michalski 7bfc09
        # setting above which is for connecting on restart of the bridge. Set to 0 to
Stasiek Michalski 7bfc09
        # immediately try to reconnect all users.
Stasiek Michalski 7bfc09
        # Default: 50
Stasiek Michalski 7bfc09
        concurrentReconnectLimit: 50
Stasiek Michalski 7bfc09
        # The number of lines to allow being sent by the IRC client that has received
Stasiek Michalski 7bfc09
        # a large block of text to send from matrix. If the number of lines that would
Stasiek Michalski 7bfc09
        # be sent is > lineLimit, the text will instead be uploaded to matrix and the
Stasiek Michalski 7bfc09
        # resulting URI is treated as a file. As such, a link will be sent to the IRC
Stasiek Michalski 7bfc09
        # side instead of potentially spamming IRC and getting the IRC client kicked.
Stasiek Michalski 7bfc09
        # Default: 3.
Stasiek Michalski 7bfc09
        lineLimit: 3
Stasiek Michalski 7bfc09
        # A list of user modes to set on every IRC client. For example, "RiG" would set
Stasiek Michalski 7bfc09
        # +R, +i and +G on every IRC connection when they have successfully connected.
Stasiek Michalski 7bfc09
        # User modes vary wildly depending on the IRC network you're connecting to,
Stasiek Michalski 7bfc09
        # so check before setting this value. Some modes may not work as intended
Stasiek Michalski 7bfc09
        # through the bridge e.g. caller ID as there is no way to /ACCEPT.
Stasiek Michalski 7bfc09
        # Default: "" (no user modes)
Stasiek Michalski 7bfc09
        # userModes: "R"
Stasiek Michalski 7bfc09
  # Set information about the bridged channel in the room state, so that client's may
Stasiek Michalski 7bfc09
  # present relevant UI to the user. MSC2346
Stasiek Michalski 7bfc09
  bridgeInfoState:
Stasiek Michalski 7bfc09
    enabled: true
Stasiek Michalski 7bfc09
    initial: true
Stasiek Michalski 7bfc09
  # Configuration for an ident server. If you are running a public bridge it is
Stasiek Michalski 7bfc09
  # advised you setup an ident server so IRC mods can ban specific matrix users
Stasiek Michalski 7bfc09
  # rather than the application service itself.
Stasiek Michalski 7bfc09
  ident:
Stasiek Michalski 7bfc09
    # True to listen for Ident requests and respond with the
Stasiek Michalski 7bfc09
    # matrix user's user_id (converted to ASCII, respecting RFC 1413).
Stasiek Michalski 7bfc09
    # Default: false.
Stasiek Michalski 7bfc09
    enabled: false
Stasiek Michalski 7bfc09
    # The port to listen on for incoming ident requests.
Stasiek Michalski 7bfc09
    # Ports below 1024 require root to listen on, and you may not want this to
Stasiek Michalski 7bfc09
    # run as root. Instead, you can get something like an Apache to yank up
Stasiek Michalski 7bfc09
    # incoming requests to 113 to a high numbered port. Set the port to listen
Stasiek Michalski 7bfc09
    # on instead of 113 here.
Stasiek Michalski 7bfc09
    # Default: 113.
Stasiek Michalski 7bfc09
    port: 1113
Stasiek Michalski 7bfc09
    # The address to listen on for incoming ident requests.
Stasiek Michalski 7bfc09
    # Default: 0.0.0.0
Stasiek Michalski 7bfc09
    address: "::"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Configuration for logging. Optional. Default: console debug level logging
Stasiek Michalski 7bfc09
  # only.
Stasiek Michalski 7bfc09
  logging:
Stasiek Michalski 7bfc09
    # Level to log on console/logfile. One of error|warn|info|debug
Stasiek Michalski 7bfc09
    level: "debug"
Stasiek Michalski 7bfc09
    # The file location to log to. This is relative to the project directory.
Stasiek Michalski 7bfc09
    logfile: "debug.log"
Stasiek Michalski 7bfc09
    # The file location to log errors to. This is relative to the project
Stasiek Michalski 7bfc09
    # directory.
Stasiek Michalski 7bfc09
    errfile: "errors.log"
Stasiek Michalski 7bfc09
    # Whether to log to the console or not.
Stasiek Michalski 7bfc09
    toConsole: true
Stasiek Michalski 7bfc09
    # The max number of files to keep. Files will be overwritten eventually due
Stasiek Michalski 7bfc09
    # to rotations.
Stasiek Michalski 7bfc09
    maxFiles: 5
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Metrics will then be available via GET /metrics on the bridge listening port (-p).
Stasiek Michalski 7bfc09
  metrics:
Stasiek Michalski 7bfc09
    # Whether to actually enable the metric endpoint. Default: false
Stasiek Michalski 7bfc09
    enabled: true
Stasiek Michalski 7bfc09
    # When collecting remote user active times, which "buckets" should be used. Defaults are given below.
Stasiek Michalski 7bfc09
    # The bucket name is formed of a duration and a period. (h=hours,d=days,w=weeks).
Stasiek Michalski 7bfc09
    remoteUserAgeBuckets:
Stasiek Michalski 7bfc09
      - "1h"
Stasiek Michalski 7bfc09
      - "1d"
Stasiek Michalski 7bfc09
      - "1w"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Configuration options for the debug HTTP API. To access this API, you must
Stasiek Michalski 7bfc09
  # append ?access_token=$APPSERVICE_TOKEN (from the registration file) to the requests.
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # The debug API exposes the following endpoints:
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  #   GET /irc/$domain/user/$user_id => Return internal state for the IRC client for this user ID.
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  #   POST /irc/$domain/user/$user_id => Issue a raw IRC command down this connection.
Stasiek Michalski 7bfc09
  #                                      Format: new line delimited commands as per IRC protocol.
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  debugApi:
Stasiek Michalski 7bfc09
    # True to enable the HTTP API endpoint. Default: false.
Stasiek Michalski 7bfc09
    enabled: false
Stasiek Michalski 7bfc09
    # The port to host the HTTP API.
Stasiek Michalski 7bfc09
    port: 11100
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Configuration for the provisioning API.
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # GET /_matrix/provision/link
Stasiek Michalski 7bfc09
  # GET /_matrix/provision/unlink
Stasiek Michalski 7bfc09
  # GET /_matrix/provision/listlinks
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # provisioning:
Stasiek Michalski 7bfc09
    # True to enable the provisioning HTTP endpoint. Default: false.
Stasiek Michalski 7bfc09
    # enabled: false
Stasiek Michalski 7bfc09
    # The number of seconds to wait before giving up on getting a response from
Stasiek Michalski 7bfc09
    # an IRC channel operator. If the channel operator does not respond within the
Stasiek Michalski 7bfc09
    # allotted time period, the provisioning request will fail.
Stasiek Michalski 7bfc09
    # Default: 300 seconds (5 mins)
Stasiek Michalski 7bfc09
    # requestTimeoutSeconds: 300
Stasiek Michalski 7bfc09
    # A file defining the provisioning rules for rooms. Format is documented
Stasiek Michalski 7bfc09
    # in rules.sample.yaml. Leave undefined to not specify any rules.
Stasiek Michalski 7bfc09
    # ruleFile: "./provisioning.rules.yaml"
Stasiek Michalski 7bfc09
    # Watch the file for changes, and apply the rules. Default: false
Stasiek Michalski 7bfc09
    # enableReload: true
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # WARNING: The bridge needs to send plaintext passwords to the IRC server, it cannot
Stasiek Michalski 7bfc09
  # send a password hash. As a result, passwords (NOT hashes) are stored encrypted in
Stasiek Michalski 7bfc09
  # the database.
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # To generate a .pem file:
Stasiek Michalski 7bfc09
  # $ openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048
Stasiek Michalski 7bfc09
  #
Stasiek Michalski 7bfc09
  # The path to the RSA PEM-formatted private key to use when encrypting IRC passwords
Stasiek Michalski 7bfc09
  # for storage in the database. Passwords are stored by using the admin room command
Stasiek Michalski 7bfc09
  # `!storepass server.name passw0rd. When a connection is made to IRC on behalf of
Stasiek Michalski 7bfc09
  # the Matrix user, this password will be sent as the server password (PASS command).
Stasiek Michalski 7bfc09
  passwordEncryptionKeyPath: "/etc/matrix-synapse/irc_password.pem"
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  # Config for Matrix -> IRC bridging
Stasiek Michalski 7bfc09
  matrixHandler:
Stasiek Michalski 7bfc09
    # Cache this many matrix events in memory to be used for m.relates_to messages (usually replies).
Stasiek Michalski 7bfc09
    eventCacheSize: 4096
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
  ircHandler:
Stasiek Michalski 7bfc09
    # How many /leave requests can be ongoing at a time.
Stasiek Michalski 7bfc09
    # This is used to stem the flow of requests in case of a mass quit/leave, which might
Stasiek Michalski 7bfc09
    # slow down the homeserver.
Stasiek Michalski 7bfc09
    leaveConcurrency: 10
Stasiek Michalski 7bfc09
    # Should we attempt to match an IRC side mention (nickaname match)
Stasiek Michalski 7bfc09
    # with the nickname's owner's matrixId, if we are bridging them?
Stasiek Michalski 7bfc09
    # "on" - Defaults to enabled, users can choose to disable.
Stasiek Michalski 7bfc09
    # "off" - Defaults to disabled, users can choose to enable.
Stasiek Michalski 7bfc09
    # "force-off" - Disabled, cannot be enabled.
Stasiek Michalski 7bfc09
    mapIrcMentionsToMatrix: "on" # This can be "on", "off", "force-off".
Stasiek Michalski 7bfc09
# Options here are generally only applicable to large-scale bridges and may have
Stasiek Michalski 7bfc09
# consequences greater than other options in this configuration file.
Stasiek Michalski 7bfc09
advanced:
Stasiek Michalski 7bfc09
  # The maximum number of HTTP(S) sockets to maintain. Usually this is unlimited
Stasiek Michalski 7bfc09
  # however for large bridges it is important to rate limit the bridge to avoid
Stasiek Michalski 7bfc09
  # accidentally overloading the homeserver. Defaults to 1000, which should be
Stasiek Michalski 7bfc09
  # enough for the vast majority of use cases.
Stasiek Michalski 7bfc09
  maxHttpSockets: 1000
Stasiek Michalski 7bfc09
  # Max size of an appservice transaction payload, in bytes. Defaults to 10Mb
Stasiek Michalski 7bfc09
  maxTxnSize: 10000000
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
# Capture information to a sentry.io instance
Stasiek Michalski 7bfc09
# sentry:
Stasiek Michalski 7bfc09
  # enabled: false
Stasiek Michalski 7bfc09
  # dsn: "https://<key>@sentry.io/<project>"
Stasiek Michalski 7bfc09
  # Optional. A tag to specify the production environment. Not set by default
Stasiek Michalski 7bfc09
  # environment: ""
Stasiek Michalski 7bfc09
  # Optional. A tag to specify the server name. Not set by default
Stasiek Michalski 7bfc09
  # serverName: ""
Stasiek Michalski 7bfc09
Stasiek Michalski 7bfc09
# Use an external database to store bridge state.
Stasiek Michalski 7bfc09
database:
Stasiek Michalski 7bfc09
  # database engine (must be 'postgres' or 'nedb'). Default: nedb
Stasiek Michalski 7bfc09
  engine: "postgres"
Stasiek Michalski 7bfc09
   # Either a PostgreSQL connection string, or a path to the NeDB storage directory.
Stasiek Michalski 7bfc09
   # For postgres, it must start with postgres://
Stasiek Michalski 7bfc09
   # For NeDB, it must start with nedb://. The path is relative to the project directory.
Stasiek Michalski 7bfc09
  connectionString: "postgresql://{{ pillar['profile']['matrix']['database_user'] }}:{{ pillar['postgres']['users']['matrix']['password'] }}@{{ pillar['profile']['matrix']['database_host'] }}/irc_bridge"