example-config.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. # The unique ID of this appservice.
  22. id: whatsapp
  23. # Appservice bot details.
  24. bot:
  25. # Username of the appservice bot.
  26. username: whatsappbot
  27. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  28. # to leave display name/avatar as-is.
  29. displayname: WhatsApp bridge bot
  30. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  31. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  32. as_token: "This value is generated when generating the registration"
  33. hs_token: "This value is generated when generating the registration"
  34. # Bridge config. Currently unused.
  35. bridge:
  36. # Localpart template of MXIDs for WhatsApp users.
  37. # {{.receiver}} is replaced with the WhatsApp user ID of the Matrix user receiving messages.
  38. # {{.userid}} is replaced with the user ID of the WhatsApp user.
  39. username_template: "whatsapp_{{.Receiver}}_{{.UserID}}"
  40. # Displayname template for WhatsApp users.
  41. # {{.displayname}} is replaced with the display name of the WhatsApp user.
  42. displayname_template: "{{.Displayname}}"
  43. # Path to the Matrix room state store.
  44. state_store_path: ./mx-state.json
  45. # Logging config.
  46. logging:
  47. # The directory for log files. Will be created if not found.
  48. directory: ./logs
  49. # Available variables: .date for the file date and .index for different log files on the same day.
  50. file_name_format: "{{.date}}-{{.index}.log"
  51. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  52. file_date_format: 2006-01-02
  53. # Log file permissions.
  54. file_mode: 0600
  55. # Timestamp format for log entries in the Go time format.
  56. timestamp_format: Jan _2, 2006 15:04:05
  57. # Minimum severity for log messages.
  58. # Options: debug, info, warn, error, fatal
  59. print_level: debug