Skip to content

Server

trivy server

Server mode

trivy server [flags]

Examples

  # Run a server
  $ trivy server

  # Listen on 0.0.0.0:10000
  $ trivy server --listen 0.0.0.0:10000

Options

      --cache-backend string            [EXPERIMENTAL] cache backend (e.g. redis://localhost:6379) (default "fs")
      --cache-ttl duration              cache TTL when using Redis as cache backend
      --db-repository strings           OCI repository(ies) to retrieve trivy-db in order of priority (default [mirror.gcr.io/aquasec/trivy-db:2,ghcr.io/aquasecurity/trivy-db:2])
      --download-db-only[=true|false]   download/update vulnerability database but don't run a scan
      --enable-modules strings          [EXPERIMENTAL] module names to enable
  -h, --help[=true|false]               help for server
      --listen string                   listen address in server mode (default "localhost:4954")
      --module-dir string               specify the directory of the WASM modules to load (default "$HOME/.trivy/modules")
      --no-progress[=true|false]        suppress progress bar
      --password strings                password. Comma-separated passwords allowed. TRIVY_PASSWORD should be used for security reasons.
      --password-stdin[=true|false]     password from stdin. Comma-separated passwords are not supported.
      --redis-ca string                 Redis CA file location, if using Redis as cache backend
      --redis-cert string               Redis certificate file location, if using Redis as cache backend
      --redis-key string                Redis key file location, if using Redis as cache backend
      --redis-tls[=true|false]          enable Redis TLS with public certificates, if using Redis as cache backend
      --registry-token string           registry token
      --skip-db-update[=true|false]     skip updating vulnerability database
      --token string                    for authentication in client/server mode
      --token-header string             specify a header name for token in client/server mode (default "Trivy-Token")
      --username strings                username. Comma-separated usernames allowed.

Options inherited from parent commands

      --cacert string                          Path to PEM-encoded CA certificate file
      --cache-dir string                       cache directory (default "/path/to/cache")
  -c, --config string                          config path (empty string disables loading) (default "trivy.yaml")
  -d, --debug[=true|false]                     debug mode
      --generate-default-config[=true|false]   write the default config to trivy-default.yaml
      --insecure[=true|false]                  allow insecure server connections
  -q, --quiet[=true|false]                     suppress progress bar and log output
      --timeout duration                       timeout (default 5m0s)
  -v, --version[=true|false]                   show version

SEE ALSO

  • trivy - Unified security scanner