example-config.yaml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. # postres example: postgres://synapse:changeme@db/whatsapp?sslmode=disable
  21. uri: mautrix-whatsapp.db
  22. # Path to the Matrix room state store.
  23. state_store_path: ./mx-state.json
  24. # The unique ID of this appservice.
  25. id: whatsapp
  26. # Appservice bot details.
  27. bot:
  28. # Username of the appservice bot.
  29. username: whatsappbot
  30. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  31. # to leave display name/avatar as-is.
  32. displayname: WhatsApp bridge bot
  33. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  34. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  35. as_token: "This value is generated when generating the registration"
  36. hs_token: "This value is generated when generating the registration"
  37. # Bridge config. Currently unused.
  38. bridge:
  39. # Localpart template of MXIDs for WhatsApp users.
  40. # {{.}} is replaced with the phone number of the WhatsApp user.
  41. username_template: whatsapp_{{.}}
  42. # Displayname template for WhatsApp users.
  43. # {{.Notify}} - nickname set by the WhatsApp user
  44. # {{.Jid}} - phone number (international format)
  45. # The following variables are also available, but will cause problems on multi-user instances:
  46. # {{.Name}} - display name from contact list
  47. # {{.Short}} - short display name from contact list
  48. displayname_template: "{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)"
  49. # The prefix for commands. Only required in non-management rooms.
  50. command_prefix: "!wa"
  51. # Permissions for using the bridge.
  52. # Permitted values:
  53. # user - Access to use the bridge to chat with a WhatsApp account.
  54. # admin - User level and some additional administration tools
  55. # Permitted keys:
  56. # * - All Matrix users
  57. # domain - All users on that homeserver
  58. # mxid - Specific user
  59. permissions:
  60. "example.com": user
  61. "@admin:example.com": admin
  62. # Logging config.
  63. logging:
  64. # The directory for log files. Will be created if not found.
  65. directory: ./logs
  66. # Available variables: .Date for the file date and .Index for different log files on the same day.
  67. file_name_format: "{{.Date}}-{{.Index}}.log"
  68. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  69. file_date_format: 2006-01-02
  70. # Log file permissions.
  71. file_mode: 0600
  72. # Timestamp format for log entries in the Go time format.
  73. timestamp_format: Jan _2, 2006 15:04:05
  74. # Minimum severity for log messages.
  75. # Options: debug, info, warn, error, fatal
  76. print_level: debug