Skip to main content
This page applies when you host Earnie yourself, in the self-hosted Earnie or fully on-premises option. If SCANOSS hosts Earnie for you, you don’t need any of it. See Deployment options. Earnie runs on one Linux server with Docker Compose. A PostgreSQL database holds its data. You can run the database as a container on the same server, or use a PostgreSQL server you already have. In the fully on-premises option you also run the SCANOSS API and knowledge base. They have their own, much larger, hardware requirements. Run them on a separate server.

Before You Start

Check these with your SCANOSS contact and your infrastructure team before you install:
  • Which scanners your organisation has: open source, cryptography, or both. This decides the server size in CPU and memory.
  • A Linux server that meets the Hardware and Software requirements.
  • A PostgreSQL 16 database, or room on the server to run one. See Database.
  • A DNS name for Earnie, and either inbound internet access for a Let’s Encrypt certificate or a certificate of your own. See Inbound.
  • Outbound access to the destinations in Outbound.
  • From SCANOSS: a SCANOSS API key. The server downloads the release itself. See Installing Earnie.

Hardware

CPU and Memory

The scanners your organisation has decide how much CPU and memory Earnie needs. Open-source matching runs inside the Earnie API and adds nothing to the base. Cryptography detection resolves your dependencies in a sandbox and needs the most CPU and memory. Because open-source matching adds nothing, a server with cryptography needs the same size with or without open source. How the figures add up: the Earnie API and web app need 2 vCPU and 4 GB. Cryptography adds 26 GB: 8 GB for its worker, 12 GB for the dependency sandbox, and headroom. With cryptography enabled, the installer stops when the server has less memory than the sandbox and the cryptography worker together, 20 GB by default.
AI provenance is available only when SCANOSS hosts Earnie. See Deployment options.
These figures are for Earnie alone. If you run the database on the same server, add the database’s CPU and memory from Database. Cryptography scans take most dependency findings from the SCANOSS API, so the dependency step takes seconds once your build tool has resolved the dependency list. A dependency version SCANOSS hasn’t analysed yet is analysed in the sandbox, which takes longer and uses up to three quarters of the sandbox’s memory; give the sandbox more memory, not more cores, for projects with many such dependencies. Many scans at once fit in the same size. In a real installation, 11 repositories scanned at the same time, with open source and cryptography, finished in 9 minutes. Host memory peaked at 5.4 GB. The dependency sandboxes burst to 12 to 14 cores and up to 3.2 GB each. On 8 vCPU the same burst takes longer. It doesn’t fail. The 32 GB figure stays, because the installer enforces the memory budget above, not because a typical scan uses it.

Disk

Use SSD storage, preferably NVMe. The data volume holds the scan archives, scan results, dependency caches for cryptography, and the TLS certificates. Earnie mounts it at /var/lib/earnie by default. You can change the path with the EARNIE_DATA_DIR setting. If you run the database as a container, its data is on this volume too. Back up the data volume along with the database. See Upgrading and backing up.

More than one Earnie server

You can run more than one Earnie server behind a load balancer. The load balancer doesn’t need sticky sessions: any server can answer any request, including the next step of a CLI or browser upload another server started. Every server needs:
  • The same PostgreSQL database.
  • The same scan storage directory, SCANS_STORAGE_DIR in tenant.env (/var/lib/earnie/scans by default), mounted read-write at the same path on every server. Use a shared filesystem whose file locks work across hosts, such as NFSv4. If the servers don’t share it, uploads fail when Earnie seals the scan, with an error that names SCANS_STORAGE_DIR.
Each server can keep its own /tmp.

Database

Earnie needs PostgreSQL 16. It doesn’t need any PostgreSQL extensions, and it doesn’t need any other data store, message broker, or object storage. Earnie’s job queue runs in the same database. The Earnie API and each scanner worker open their own connections, up to 25 each by default. With the cryptography worker, that’s up to 50 connections. The DB_MAX_CONNS setting changes the limit for each one. If you use a managed database, check that its plan allows enough connections.

Software

  • Operating system: a 64-bit Linux distribution on x86-64 (amd64). Earnie’s server images aren’t available for ARM. SCANOSS runs Earnie on Ubuntu 24.04.
  • Docker: Docker Engine 29 or later with the Docker Compose v2 plugin, version 2.20 or later. Install both from Docker’s own repository, because your distribution’s packages are too old. The installer refuses an older engine: the cryptography sandbox doesn’t work on it.
  • Docker’s firewall: for cryptography scans, Docker must manage the host’s iptables rules, which it does by default. Earnie adds its sandbox rules to Docker’s DOCKER-USER chain. If Docker runs without its iptables firewall, the cryptography worker doesn’t start.
  • curl, tar, and sha256sum (coreutils): for the installer command.

Network Access

Inbound

Earnie needs a DNS name, such as earnie.example.com, that your users, CI pipelines, and Git provider can reach. It listens on these ports: If you use a name under earnie.dev, give it its own A record that points at your server. *.earnie.dev is a wildcard that points at the service SCANOSS hosts, so without its own record the name doesn’t reach your server.
Docker publishes ports past ufw. Once Earnie starts, ports 80 and 443 are open on every address of the server, even when ufw or another host firewall denies them. Docker adds its own rules ahead of the host firewall’s. To limit who can reach Earnie, use a firewall in front of the server, such as your cloud provider’s security group, or add your rules to Docker’s DOCKER-USER chain.
Earnie gets its TLS certificate from Let’s Encrypt by default. This needs the DNS name to be publicly resolvable, and ports 80 and 443 to be reachable from the internet. If that isn’t possible, for example for an internal name, provide your own certificate instead. See TLS certificate. You can put a load balancer in front of Earnie. It must pass TLS through to port 443, or re-encrypt to Earnie on port 443. Earnie redirects plain HTTP to HTTPS, so a load balancer can’t send it plain HTTP. See Using a load balancer.

Outbound

For what each call sends and how to turn it off, see Outbound network calls. Earnie doesn’t support air-gapped networks. It needs outbound access to the destinations above, and to api.scanoss.com, or your own SCANOSS API in the fully on-premises option, on every scan. Even in that option, it needs to reach api.scanoss.com for file content, get.earnie.dev and the registries to install and upgrade, the CISA feed, and, for cryptography scans, your dependencies’ package registries or your mirrors of them. A cryptography scan takes its dependency findings from the SCANOSS API: with your own SCANOSS API, SCANOSS supplies the analysed dependency data it serves, and Earnie analyses in the sandbox only the dependency versions that data doesn’t cover, which needs the registries or your mirrors.

The Cryptography Sandbox

Cryptography scans build your dependencies in a sandbox, a separate container with its own firewall rules. The sandbox can reach:
  • Public package registries, such as Maven Central, Gradle, npm, Yarn, PyPI, crates.io, and the Go module proxy, on ports 80 and 443.
  • Your private registry mirrors, if you add their address ranges, as comma-separated CIDRs, to the SCANS_SANDBOX_MIRROR_CIDRS setting. Mirrors are reachable on any port.
  • One internal Earnie endpoint that the sandbox needs to do its work.
It can’t reach the rest of your network, the Earnie server’s other services, or anything else. Nothing is installed in the sandbox. JavaScript, Python, Go, Rust, Ruby, and C# dependencies are read from the project’s lock files (for example package-lock.json, yarn.lock, pnpm-lock.yaml, poetry.lock, uv.lock, requirements.txt, Cargo.lock, Gemfile.lock, packages.lock.json), and Java dependencies from Maven or Gradle. A project without a lock file has no pinned dependency list, and the scan shows the dependencies step as skipped. The allowlist works on IP address ranges, not host names. The registries sit behind large content delivery networks (Cloudflare, Fastly, GitHub, and Google), so the sandbox can reach any site hosted on those networks on ports 80 and 443. DNS lookups aren’t filtered.

What’s Next