Database
Netronome keeps its data in SQLite by default. It also supports PostgreSQL. At each start, Netronome applies the database migrations that it has not applied yet. A migration is a step that creates or changes the tables.
database.type(defaultsqlite): The database type. The value issqliteorpostgres.
Each key also has an environment variable. See Environment variables.
SQLite
Section titled “SQLite”SQLite needs no setup. Netronome creates the database file and its directory at the first start.
database.path(defaultnetronome.db): The path of the database file. A relativepathin the configuration file starts from the directory of that file. With the default configuration file, the database is at~/.config/netronome/netronome.db. A relative path inNETRONOME__DB_PATHstarts from the working directory.
PostgreSQL
Section titled “PostgreSQL”Create an empty database and a user for Netronome first. Then set type to postgres and give the connection details:
database.host(defaultlocalhost): The host name or IP address of the PostgreSQL server.database.port(default5432): The port of the PostgreSQL server.database.user(defaultpostgres): The PostgreSQL user.database.password(default empty): The password of the PostgreSQL user.database.dbname(defaultnetronome): The name of the database.database.sslmode(defaultdisable): The PostgreSQL SSL mode, for exampledisable,require, orverify-full.
In config.toml:
[database]type = "postgres"host = "localhost"port = 5432user = "netronome"password = "your-password"dbname = "netronome"sslmode = "disable"With environment variables:
export NETRONOME__DB_TYPE=postgresexport NETRONOME__DB_HOST=localhostexport NETRONOME__DB_PORT=5432export NETRONOME__DB_USER=netronomeexport NETRONOME__DB_PASSWORD=your-passwordexport NETRONOME__DB_NAME=netronomeThe repository has a Docker Compose file that starts Netronome with PostgreSQL 17: distrib/docker/docker-compose.postgres.yml. For Docker setup, see Installation.
Delete old results
Section titled “Delete old results”To make the database smaller, delete old results in the web interface:
- Open Settings, then Data.
- Under Purge History, select the age of the records to delete: older than 7 days, 30 days, 90 days, 1 year, or everything.
- Select Purge, then confirm.
The purge deletes speed test results, packet loss results, and DNS results. You cannot undo it. On SQLite, Netronome then runs VACUUM, so that the file on disk becomes smaller.
