config.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. postgresql:
  34. host: "127.0.0.1"
  35. port: "5432"
  36. user: ""
  37. password: ""
  38. dbname: "postgres"
  39. sslmode: "disable" # disable, require, verify-ca, verify-full
  40. time-zone: "Asia/Shanghai" # Time zone for PostgreSQL connection
  41. rustdesk:
  42. id-server: "192.168.1.66:21116"
  43. relay-server: "192.168.1.66:21117"
  44. api-server: "http://127.0.0.1:21114"
  45. key: ""
  46. key-file: "/data/id_ed25519.pub"
  47. personal: 1
  48. webclient-magic-queryonline: 0
  49. ws-host: "" #eg: wss://192.168.1.3:4443
  50. logger:
  51. path: "./runtime/log.txt"
  52. level: "info" #trace,debug,info,warn,error,fatal
  53. report-caller: true
  54. proxy:
  55. enable: false
  56. host: "http://127.0.0.1:1080"
  57. jwt:
  58. key: ""
  59. expire-duration: 168h
  60. ldap:
  61. enable: false
  62. url: "ldap://ldap.example.com:389"
  63. tls-ca-file: ""
  64. tls-verify: false
  65. base-dn: "dc=example,dc=com"
  66. bind-dn: "cn=admin,dc=example,dc=com"
  67. bind-password: "password"
  68. user:
  69. base-dn: "ou=users,dc=example,dc=com"
  70. enable-attr: "" #The attribute name of the user for enabling, in AD it is "userAccountControl", empty means no enable attribute, all users are enabled
  71. 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.
  72. filter: "(cn=*)"
  73. username: "uid" # The attribute name of the user for usernamem if you are using AD, it should be "sAMAccountName"
  74. email: "mail"
  75. first-name: "givenName"
  76. last-name: "sn"
  77. 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.
  78. 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.