example-config.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Homeserver details.
  2. homeserver:
  3. # The address that this appservice can use to connect to the homeserver.
  4. address: https://matrix.org
  5. # The domain of the homeserver (for MXIDs, etc).
  6. domain: matrix.org
  7. # Application service host/registration related details.
  8. # Changing these values requires regeneration of the registration.
  9. appservice:
  10. # The address that the homeserver can use to connect to this appservice.
  11. address: http://localhost:8080
  12. # The hostname and port where this appservice should listen.
  13. hostname: 0.0.0.0
  14. port: 8080
  15. # Database config.
  16. database:
  17. # The database type. Only "sqlite3" is supported.
  18. type: sqlite3
  19. # The database URI. Usually file name. https://github.com/mattn/go-sqlite3#connection-string
  20. uri: mautrix-whatsapp.db
  21. # Path to the Matrix room state store.
  22. state_store_path: ./mx-state.json
  23. # The unique ID of this appservice.
  24. id: whatsapp
  25. # Appservice bot details.
  26. bot:
  27. # Username of the appservice bot.
  28. username: whatsappbot
  29. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  30. # to leave display name/avatar as-is.
  31. displayname: WhatsApp bridge bot
  32. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  33. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  34. as_token: "This value is generated when generating the registration"
  35. hs_token: "This value is generated when generating the registration"
  36. # Bridge config. Currently unused.
  37. bridge:
  38. # Localpart template of MXIDs for WhatsApp users.
  39. # {{.}} is replaced with the phone number of the WhatsApp user.
  40. username_template: whatsapp_{{.}}
  41. # Displayname template for WhatsApp users.
  42. # {{.Notify}} - nickname set by the WhatsApp user
  43. # {{.Jid}} - phone number (international format)
  44. # The following variables are also available, but will cause problems on multi-user instances:
  45. # {{.Name}} - display name from contact list
  46. # {{.Short}} - short display name from contact list
  47. displayname_template: "{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)"
  48. # The prefix for commands. Only required in non-management rooms.
  49. command_prefix: "!wa"
  50. # Permissions for using the bridge.
  51. # Permitted values:
  52. # user - Access to use the bridge to chat with a WhatsApp account.
  53. # admin - User level and some additional administration tools
  54. # Permitted keys:
  55. # * - All Matrix users
  56. # domain - All users on that homeserver
  57. # mxid - Specific user
  58. permissions:
  59. "example.com": user
  60. "@admin:example.com": admin
  61. # Logging config.
  62. logging:
  63. # The directory for log files. Will be created if not found.
  64. directory: ./logs
  65. # Available variables: .Date for the file date and .Index for different log files on the same day.
  66. file_name_format: "{{.Date}}-{{.Index}}.log"
  67. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  68. file_date_format: 2006-01-02
  69. # Log file permissions.
  70. file_mode: 0600
  71. # Timestamp format for log entries in the Go time format.
  72. timestamp_format: Jan _2, 2006 15:04:05
  73. # Minimum severity for log messages.
  74. # Options: debug, info, warn, error, fatal
  75. print_level: debug