credential.toml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Put this file to one of the location, with descending priority
  2. # ./credential.toml
  3. # $HOME/.seaweedfs/credential.toml
  4. # /etc/seaweedfs/credential.toml
  5. # this file is read by S3 API and IAM API servers
  6. # Choose one of the credential stores below
  7. # Only one store can be enabled at a time
  8. # Filer-based credential store (default, uses existing filer storage)
  9. [credential.filer_etc]
  10. enabled = true
  11. # filer address and grpc_dial_option will be automatically configured by the server
  12. # PostgreSQL credential store (recommended for multi-node deployments)
  13. [credential.postgres]
  14. enabled = false
  15. hostname = "localhost"
  16. port = 5432
  17. username = "seaweedfs"
  18. password = "your_password"
  19. database = "seaweedfs"
  20. schema = "public"
  21. sslmode = "disable"
  22. # Optional: table name prefix (default: "sw_")
  23. table_prefix = "sw_"
  24. # Connection pool settings
  25. connection_max_idle = 10
  26. connection_max_open = 100
  27. connection_max_lifetime_seconds = 3600
  28. # Memory credential store (for testing only, data is lost on restart)
  29. [credential.memory]
  30. enabled = false
  31. # Environment variable overrides:
  32. # Any configuration value can be overridden by environment variables
  33. # Rules:
  34. # * Prefix with "WEED_CREDENTIAL_"
  35. # * Convert to uppercase
  36. # * Replace '.' with '_'
  37. #
  38. # Examples:
  39. # export WEED_CREDENTIAL_POSTGRES_PASSWORD=secret
  40. # export WEED_CREDENTIAL_POSTGRES_HOSTNAME=db.example.com
  41. # export WEED_CREDENTIAL_FILER_ETC_ENABLED=true