config.yaml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. lang: "zh-CN"
  2. app:
  3. web-client: 1 # 1:启用 0:禁用
  4. register: false #是否开启注册
  5. register-status: 1 # 注册用户默认状态 1:启用 2:禁用
  6. captcha-threshold: 3 # <0:disabled, 0 always, >0:enabled
  7. ban-threshold: 0 # 0:disabled, >0:enabled
  8. show-swagger: 0 # 1:启用 0:禁用
  9. token-expire: 168h
  10. web-sso: true #web auth sso
  11. disable-pwd-login: false #禁用密码登录
  12. admin:
  13. title: "RustDesk API Admin"
  14. hello-file: "./conf/admin/hello.html" #优先使用file
  15. hello: ""
  16. # ID Server and Relay Server ports https://github.com/lejianwen/rustdesk-api/issues/257
  17. id-server-port: 21116 # ID Server port (for server cmd)
  18. relay-server-port: 21117 # ID Server port (for server cmd)
  19. gin:
  20. api-addr: "0.0.0.0:21114"
  21. mode: "release" #release,debug,test
  22. resources-path: 'resources' #对外静态文件目录
  23. trust-proxy: ""
  24. gorm:
  25. type: "sqlite"
  26. max-idle-conns: 10
  27. max-open-conns: 100
  28. mysql:
  29. username: ""
  30. password: ""
  31. addr: ""
  32. dbname: ""
  33. tls: "false" # true / false / skip-verify / custom
  34. postgresql:
  35. host: "127.0.0.1"
  36. port: "5432"
  37. user: ""
  38. password: ""
  39. dbname: "postgres"
  40. sslmode: "disable" # disable, require, verify-ca, verify-full
  41. time-zone: "Asia/Shanghai" # Time zone for PostgreSQL connection
  42. rustdesk:
  43. id-server: "192.168.1.66:21116"
  44. relay-server: "192.168.1.66:21117"
  45. api-server: "http://127.0.0.1:21114"
  46. key: ""
  47. key-file: "/data/id_ed25519.pub"
  48. personal: 1
  49. webclient-magic-queryonline: 0
  50. ws-host: "" #eg: wss://192.168.1.3:4443
  51. logger:
  52. path: "./runtime/log.txt"
  53. level: "info" #trace,debug,info,warn,error,fatal
  54. report-caller: true
  55. proxy:
  56. enable: false
  57. host: "http://127.0.0.1:1080"
  58. jwt:
  59. key: ""
  60. expire-duration: 168h
  61. ldap:
  62. enable: false
  63. url: "ldap://ldap.example.com:389"
  64. tls-ca-file: ""
  65. tls-verify: false
  66. base-dn: "dc=example,dc=com"
  67. bind-dn: "cn=admin,dc=example,dc=com"
  68. bind-password: "password"
  69. user:
  70. base-dn: "ou=users,dc=example,dc=com"
  71. enable-attr: "" #The attribute name of the user for enabling, in AD it is "userAccountControl", empty means no enable attribute, all users are enabled
  72. enable-attr-value: "" # The value of the enable attribute when the user is enabled. If you are using AD, just set random value, it will be ignored.
  73. filter: "(cn=*)"
  74. username: "uid" # The attribute name of the user for usernamem if you are using AD, it should be "sAMAccountName"
  75. email: "mail"
  76. first-name: "givenName"
  77. last-name: "sn"
  78. sync: false # If true, the user will be synchronized to the database when the user logs in. If false, the user will be synchronized to the database when the user be created.
  79. admin-group: "cn=admin,dc=example,dc=com" # The group name of the admin group, if the user is in this group, the user will be an admin.
  80. allow-group: "cn=users,dc=example,dc=com" # The group name of the users group, if the user is in this group, the user will be an login.