Self-hosting

Dependency-Track on a VPS: SBOMs and vulnerable dependencies

A modern application ships hundreds of libraries that nobody picked one by one. The day a critical vulnerability hits one of them, the only question that matters is: where did we deploy it? OWASP Dependency-Track answers it continuously. Your CI sends it the SBOM of every build, it matches each component against public vulnerability databases and warns you as soon as a version in production is affected. This guide installs it on a VPS with Docker Compose, replaces the factory password, publishes it over HTTPS behind nginx and connects it to your pipeline.

Deploy on a VPS Cloud →
7 min read5 steps
Contents· What Dependency-Track does1/11
  1. 01What Dependency-Track does
  2. 02What Dependency-Track gives you
  3. 03One-off scanner or Dependency-Track on your VPS
  4. 04Prepare the server
  5. 05Install Dependency-Track with Docker Compose
  6. 06Never publish an instance with admin/admin
  7. 07Publish Dependency-Track over HTTPS behind nginx
  8. 08Upload SBOMs from your CI
  9. 09Policies and notifications
  10. 10Backup and upgrades
  11. 11One-click Dependency-Track on ServOrbit

What Dependency-Track does

Dependency-Track is an OWASP flagship project, released under the Apache-2.0 licence. It does not read your code: it reads the inventory of what your application ships, the SBOM (Software Bill of Materials), in CycloneDX format. Each component in it is identified by its Package URL (pkg:npm/[email protected], pkg:maven/…), which lets it be matched unambiguously against vulnerability databases: NVD, GitHub Advisories, OSV.

The difference from a scanner run in CI is time. The scanner judges today's build; Dependency-Track keeps every version of all your projects and re-evaluates them each time its databases are updated. A vulnerability published three months from now will be flagged on the version you deploy today.

What Dependency-Track gives you

  • A portfolio — every application and every version, with the list of its direct and transitive components.
  • Retroactive alerts — a vulnerability published after deployment surfaces on the versions already in production.
  • Policies — forbidden licences, maximum tolerated severity, banned components, evaluated on every SBOM upload.
  • Vulnerability triage — severity, EPSS exploit probability score, and analysis tracking (“not affected”, “resolved”…).
  • Notifications — Slack, Microsoft Teams, webhook or email, per project and per severity.
  • A complete API — SBOM uploads, result retrieval and administration, with per-team API keys.

One-off scanner or Dependency-Track on your VPS

Scroll the table

Scanner run in CIWith Dependency-Track on your VPS
When the analysis runsAt build time, then nothingOn every build, then continuously
Vulnerability published after deploymentInvisible until the next buildFlagged on the versions in production
OverviewOne report per repositoryThe whole portfolio, searchable by component
LicencesDepends on the toolExplicit licence policies
Where the inventory livesIn CI logsOn your VPS, with its history

Prepare the server

Plan an Ubuntu 24.04 VPS with at least 4 GB of RAM and 2 vCPUs: the API server, written in Java, is capped at 2 GB, and PostgreSQL shares the rest with the system. Beyond a few dozen projects analysed each day, move up to 8 GB. Count on 30 GB of disk.

Install Docker and the Compose plugin, then point a subdomain (for example dtrack.example.com) at the VPS's IP address: your pipelines will upload their SBOMs to this address, and the web interface will open there.

curl -fsSL https://get.docker.com | sh
docker compose version

Install Dependency-Track with Docker Compose

  1. Prepare the directory and the .env file

    The file holds the PostgreSQL database password and the admin account password.

    mkdir -p /opt/dependency-track && cd /opt/dependency-track
    cat > .env <<EOF
    DB_PASSWORD=$(openssl rand -hex 16)
    ADMIN_PASSWORD=$(openssl rand -hex 16)
    EOF
    chmod 600 .env
  2. Write the internal proxy configuration

    The web interface calls the API on its own address. A small nginx therefore routes /api to the API server and everything else to the interface: one port to publish, one domain, no CORS settings.

    server {
      listen 80;
      client_max_body_size 64m;
      location /api/ {
        proxy_pass http://apiserver:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 300s;
      }
      location / {
        proxy_pass http://frontend:8080;
        proxy_set_header Host $host;
      }
    }

    Save this block as /opt/dependency-track/proxy.conf.

  3. Write the docker-compose.yml file

    Four services: PostgreSQL, the API server, the interface and the proxy. The port is published on the loopback interface only: just the VPS's nginx will be exposed to the internet.

    services:
      db:
        image: postgres:18.7-alpine
        restart: unless-stopped
        environment:
          POSTGRES_DB: dtrack
          POSTGRES_USER: dtrack
          POSTGRES_PASSWORD: ${DB_PASSWORD}
        volumes:
          - db:/var/lib/postgresql
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -q -U dtrack -d dtrack"]
          interval: 10s
          retries: 30
    
      apiserver:
        image: ghcr.io/dependencytrack/apiserver:5.2.2
        restart: unless-stopped
        depends_on:
          db:
            condition: service_healthy
        deploy:
          resources:
            limits:
              memory: 2g
        environment:
          DT_DATASOURCE_URL: jdbc:postgresql://db:5432/dtrack
          DT_DATASOURCE_USERNAME: dtrack
          DT_DATASOURCE_PASSWORD: ${DB_PASSWORD}
        volumes:
          - data:/data
    
      frontend:
        image: ghcr.io/dependencytrack/frontend:5.2.2
        restart: unless-stopped
        environment:
          API_BASE_URL: ""
    
      proxy:
        image: nginx:1.27-alpine
        restart: unless-stopped
        depends_on: [apiserver, frontend]
        ports:
          - "127.0.0.1:8127:80"
        volumes:
          - ./proxy.conf:/etc/nginx/conf.d/default.conf:ro
    
    volumes:
      db: {}
      data: {}
  4. Start the stack

    The first start creates the database schema, then the API server downloads the vulnerability databases in the background.

    docker compose up -d
    curl -s http://127.0.0.1:8127/api/version

    The second command returns the server version as soon as the API is ready.

  5. Replace the factory password

    The admin account is created with the password admin. Replace it before publishing anything:

    . ./.env
    curl -fsS http://127.0.0.1:8127/api/v1/user/forceChangePassword \
      --data-urlencode username=admin --data-urlencode password=admin \
      --data-urlencode newPassword="$ADMIN_PASSWORD" \
      --data-urlencode confirmPassword="$ADMIN_PASSWORD"

Never publish an instance with admin/admin

Dependency-Track does force a password change at first login, but between startup and that login, anyone can do it in your place and take over the inventory of your applications — in other words, the list of their vulnerabilities. Replace the password before configuring nginx.

Publish Dependency-Track over HTTPS behind nginx

The VPS's nginx receives the domain and forwards to the local port. Raise the upload size: the SBOM of a sizeable application quickly exceeds the one megabyte nginx accepts by default.

server {
  server_name dtrack.example.com;
  client_max_body_size 64m;
  location / {
    proxy_pass http://127.0.0.1:8127;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}

Then issue the certificate with certbot --nginx -d dtrack.example.com. Open https://dtrack.example.com, log in with admin and your new password, and create your team's accounts under Administration → Access Management.

Upload SBOMs from your CI

In Administration → Access Management → Teams, open the Automation team and generate an API key; store it in your CI secrets. The pipeline then produces the SBOM and uploads it on every build — here with cdxgen, which recognises most ecosystems (npm, Maven, PyPI, Composer, Go…):

# .github/workflows/sbom.yml
name: sbom
on: [push]
jobs:
  sbom:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx --yes @cyclonedx/cdxgen -o bom.json
      - run: |
          curl -fsS -X POST https://dtrack.example.com/api/v1/bom \
            -H "X-Api-Key: ${{ secrets.DT_API_KEY }}" \
            -F autoCreate=true -F projectName=${{ github.event.repository.name }} \
            -F projectVersion=${{ github.ref_name }} -F [email protected]

The project appears in the portfolio with the uploaded version. For a container image, syft <image> -o cyclonedx-json > bom.json produces the equivalent, system packages included.

Policies and notifications

A policy turns a finding into a rule. In Policy Management, create for example a security policy that flags any vulnerability of severity *High* or above, and a licence policy that rejects the licences your contract forbids. Every SBOM upload is evaluated, and violations are shown on the project.

Then, in Administration → Notifications, connect a channel — Slack, Microsoft Teams, webhook or email — to the *New Vulnerability* and *Policy Violation* events, limited to the projects that matter. This alert is what makes the tool worthwhile: it arrives the day the vulnerability is published, not the day of the next build.

Backup and upgrades

All the useful state lives in PostgreSQL: projects, SBOMs, analyses and settings. Back up the database; the /data directory can be rebuilt (it mostly holds the downloaded vulnerability databases).

cd /opt/dependency-track
docker compose exec -T db pg_dump -U dtrack dtrack | gzip > dtrack-$(date +%F).sql.gz

To upgrade, read the release notes, change both image tags (apiserver and frontend, always at the same version), then run docker compose pull && docker compose up -d. The API server migrates the schema on startup. Keep a recent backup before every version upgrade.

One-click Dependency-Track on ServOrbit

On a ServOrbit VPS, Dependency-Track installs from the Marketplace: official images, PostgreSQL and the internal proxy in place, the admin account's factory password replaced with a generated one shown in your client area, and the nginx reverse proxy over HTTPS on your domain or on the VPS's free subdomain. All that is left is to create the CI API key and upload your first SBOM.

Share this articleservorbit.com/ma-en/blog/self-host-dependency-track-vps-sbom

Your dependencies under watch, on your VPS

Prices shown excluding VAT, with their renewal price.