← Documentation index

SPPCONSULT

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
CONFIGURATION
SIGNALS
FILES
EXIT STATUS
EXAMPLES
SEE ALSO
AUTHOR
COPYRIGHT

NAME

sppconsult - the catalogue of sapupra to read, and nothing else: the pages of the search, put behind a proxy for a reader outside the local network

SYNOPSIS

sppconsult [-c|--config FILE] [-s|--syslog] [-d|--debug |-q|--quiet]
sppconsult -h
|--help
sppconsult -V
|--version

DESCRIPTION

sppconsult serves the pages of the catalogue that sppentry(8) serves, and none of the others: the search, simple and advanced, the page of an item and the CSV file (/catalogue, /catalogue/advanced, /catalogue/item/ID, /catalogue.csv, /catalogue/export), and / which leads to /catalogue. Every other path answers 404, and every method but GET and HEAD answers 405 (a HEAD is answered as a GET is, without the body). The pages have no form that changes anything, no menu but the catalogue, no command of spplabel(1), no link to the copies removed (a removed copy is not found), and not the devices and the times at which an item was scanned.

It does not connect to the broker, has no password and does not read the file of the secrets, so that it can run under an account that may do no more than read the database. It has the limits of a program that answers strangers: a field longer than max_pattern characters is refused, a search that lasts more than search_seconds is cut and says so, a request has at most 4 KiB of headers and 1 KiB of body, at most 32 connections are served at once, and every reply carries the headers Content-Security-Policy, X-Content-Type-Options, Referrer-Policy and X-Frame-Options. The footer of its pages does not give the version.

It has neither TLS nor a password, and listens on 127.0.0.1 by default: it is meant to be put behind a proxy that has both (Caddy, nginx; the manual, section "Reaching the catalogue from outside"). Told to listen on another address, it starts and says in the log that the pages are then open to whoever reaches that address.

It runs in the foreground, and is put in the background by the service manager: systemd on Debian (the unit sppconsult.service, which also shuts the program in), daemon(8) in an rc script on FreeBSD (the script sppconsult). A database that is not there yet is not an error: the pages open it when it is, and tell the reader meanwhile that the catalogue cannot be read.

OPTIONS

-c, --config FILE

The configuration file; by default /usr/local/etc/sapupra.ini (the sysconfdir of the installation).

-s, --syslog

Log to syslog, facility daemon, instead of standard error.

-d, --debug

Log the debugging messages too: each request (method, path, client, status).

-q, --quiet

Log only the warnings and the errors.

-h, --help

Print the usage and exit.

-V, --version

Print the version and exit.

CONFIGURATION

The file is in the INI form, the same as the other programs’; a value left out takes its default.
[consult] listen

The address and the port to listen on: ADDRESS:PORT; by default 127.0.0.1:8082. ADDRESS may be a name that the machine resolves, as for sppgate(8).

[consult] max_pattern

The longest field of a search, in characters; 20 to 2000, by default 200.

[consult] search_seconds

Seconds after which a search that tries patterns is cut; 1 to 60, by default 3.

[consult] log_level

quiet, normal or debug; the options win.

[database] file

The catalogue, the same file as the worker’s; it is opened to read. Left out, the same default as the worker’s (sppwork(8)).

[interface] language

The language of the pages, as for sppentry(8).

SIGNALS

SIGTERM, SIGINT

Stop.

SIGHUP

Ignored: restart the service to read the configuration again.

FILES

/usr/local/etc/sapupra.ini

The configuration, owned by root, mode 0644. The file of the secrets is not read.

/var/db/sapupra/catalogue.db

The catalogue on FreeBSD (/var/lib/sapupra on Debian), read.

EXIT STATUS

0

Stopped by a signal.

1

The configuration cannot be read or holds an invalid value, or the port cannot be listened on.

2

A usage error.

EXAMPLES

Run it by hand, from any account that may read the database:

sppconsult --debug --config ./sapupra.ini

then open http://127.0.0.1:8082/ in a browser.

SEE ALSO

sppentry(8), sppwork(8), Design.org, section "Access from outside the network"; Manual.org, section "Reaching the catalogue from outside".

AUTHOR

Péter Felecan, assisted by Claude Opus 5.5 (Anthropic).

COPYRIGHT

Copyright (C) 2026 Péter Felecan. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.