example-config.yaml 3.5 KB

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