The guide: Installing the Reach server on Rocky Linux 9 (RPM)
Reach is in development. Its packages are not published.
For the IT person setting up the Reach server for an evaluation.
Read this first
- Unsigned evaluation build. The RPM is not signed. Use it to evaluate Reach, not for production.
- Loopback first. The server starts on the machine itself (
127.0.0.1). You reach the console through an SSH tunnel for the first sign-in. To let agents and browsers on other machines reach it, follow "Open the server to other machines" below. From other machines, only people who have set up two-step sign-in can sign in. - Two-step sign-in. Every user signs in with a password and a code from an authenticator app (any standard TOTP app). Have one ready on your phone for step 5.
- SQLite. The database is a SQLite file, fine for evaluation and small sites. PostgreSQL is available; what was tested with it is in "Use PostgreSQL" below.
What was tested#
Everything below was run in a Rocky Linux 9.8 virtual machine (aarch64) with the RPMs built from this repository: install both packages, init, start the service, set up the owner and sign in, mint a token, enrol the agent, send a report, see the machine in the console, then remove both packages. In a Rocky Linux 9.8 x86_64 virtual machine in our own lab (16 November 2026), SELinux enforcing, builds 0.1.0 and then 0.1.1 were installed and followed through this guide. What passed, as written here: installing the packages, init (self-signed, loopback), the owners and modes in the table, listening on loopback only, the sandbox score of systemd-analyze security (1.5 for the server, 1.7 for the agent), the first owner through the setup link with two-step sign-in, audit verify (one chain), no secret words in the journal, the agent RPM, enrol --machine (the token file was removed), the first report about 30 seconds after enrolling, and no SELinux denials naming Reach. The reboot was on build 0.1.0, and brought both services back by themselves; PostgreSQL by this guide and the proof scripts have not been run there yet. RHEL 9 and Rocky or RHEL 10 have not been tested. The SSH tunnel step has not been exercised: in the test the sign-in script ran on the server machine itself and talked to the loopback address directly.
Requirements#
- Rocky Linux 9 with systemd,
sudoanddnf. This is the only distribution tested. It should work on compatible distributions such as RHEL 9, but that is not tested. - Root access (for
dnfandsystemctl). - SSH access to the machine from your own computer, for the tunnel.
1. Get the RPMs#
The packages are not published. To evaluate Reach before release, ask Sys-Ki through the contact page on sys-ki.com and choose "Evaluation build". Evaluation builds are internal and not yet proven on real hardware. When one is ready it is handed over with its SHA256SUMS file; if none is ready, you are told so plainly. Building the packages from the source applies only to people with access to the private source.
With either option below you end up with two files per CPU type: reach-server-<version>-<build>.<arch>.rpm and reach-agent-<version>-<build>.<arch>.rpm, where <arch> is aarch64 or x86_64.
Option A: an evaluation build handed over by Sys-Ki. You receive the RPMs together with a file called SHA256SUMS. Put them all in one folder (below, <folder>) and check them before you install anything. Run the check from inside that folder: sha256sum looks for each file in the folder you are in, not next to the SHA256SUMS file, so from anywhere else it reports "no file was verified":
cd <folder>
sha256sum --check SHA256SUMSEvery line must end in OK. If the folder holds only the files for your CPU type, add --ignore-missing so the other CPU type's files are skipped instead of reported:
sha256sum -c --ignore-missing SHA256SUMSRead the messages carefully: FAILED open or read means a file is absent (without --ignore-missing, expected for the other CPU type); FAILED on its own means the file is damaged or was changed: do not install it, and ask Sys-Ki for a fresh copy. The check proves the file is the one the sums file lists; it does not prove who made the sums file, so take that file from Sys-Ki directly and not from the same place as an unverified download.
Option B (only with access to the private source): build them yourself. You need, on any Linux or macOS computer (not the server itself):
gitand a copy of the Reach source.- Go, at the version in the
goline ofgo.mod(1.27, toolchain 1.27.4, when tested). Check withgo version. nfpm(the RPM packager, nfpm.goreleaser.com). The build was tested with nfpm 2.49.0. Check withnfpm --version.
On a clean checkout (<source> is the folder you cloned; the script moves into it itself, so you can run it from any folder) (the script refuses to build with uncommitted changes unless you add --allow-dirty):
<source>/packaging/build.shThe script takes the version from internal/version/VERSION; the file names below show 0.1.1. It refuses a shallow clone, because the build number is the number of commits. The script builds both packages for both CPU types and writes everything to the dist/ folder:
dist/reach-server-0.1.1-<build>.aarch64.rpm
dist/reach-server-0.1.1-<build>.x86_64.rpm
dist/reach-agent-0.1.1-<build>.aarch64.rpm
dist/reach-agent-0.1.1-<build>.x86_64.rpm
dist/SHA256SUMSdist/SHA256SUMS lists the four RPMs. Check them (or check copies after you move them to the server) from inside that folder: cd <source>/dist && sha256sum -c SHA256SUMS (on macOS: cd <source>/dist && shasum -a 256 -c SHA256SUMS). Copy the two RPMs for the server's CPU type to the server, for example with scp.
2. Install#
With the RPMs from step 1 on the machine:
sudo dnf install <folder>/reach-server-<version>-<build>.<arch>.rpm<arch> is aarch64 or x86_64 (uname -m). dnf may warn that the package is not signed; that is expected for this build.
The package creates a reach-server system user (no login shell), the folders below, and a systemd unit. It does not enable or start the service.
| Path | What | Owner and mode |
|---|---|---|
/usr/bin/reach-server | the server | root, 0755 |
/etc/reach-server/ | configuration folder, empty until you place server.toml in step 3; the service account cannot write here | root:reach-server, 0750 |
/var/lib/reach-server/ | data: database, encryption key, certificate | reach-server, 0700 |
/usr/lib/systemd/system/reach-server.service | the service unit | root, 0644 |
3. Initialise#
Run init once, as the reach-server user, so that the data files belong to that user, then move the configuration into /etc where the service account cannot change it:
cd /
sudo -u reach-server /usr/bin/reach-server init \
--dir /var/lib/reach-server \
--public-url https://localhost:8443 \
--listen 127.0.0.1:8443 \
--tls self-signed
sudo install -o root -g reach-server -m 0640 /var/lib/reach-server/server.toml /etc/reach-server/server.toml
sudo rm /var/lib/reach-server/server.toml--public-url must match what your browser will show. With the SSH tunnel below, that is https://localhost:8443: keep the port the same on both ends of the tunnel. Keep --listen on 127.0.0.1:8443 for now; see "Open the server to other machines" for changing it.
init creates a local evaluation CA and a server certificate signed by it, the database, the encryption key (the "KEK") and the configuration file. It prints the CA file's path (/var/lib/reach-server/tls/reach-ca.pem), the SHA-256 fingerprints of the CA and of the server certificate, a setup link, and reminders to back up the KEK and to keep the CA's private key private. Write the two fingerprints down: the console's sign-in page shows the server certificate's fingerprint so you can compare. (This CA paragraph comes from the repository's automated tests and was not re-run in the Rocky VM described above.) The setup link is valid for 60 minutes and works once. Treat it like a password: do not paste it into tickets or chat.
Resulting files (checked in the test): /var/lib/reach-server/kek, /var/lib/reach-server/reach.db and /var/lib/reach-server/tls/server.key are owned by reach-server with mode 0600; /etc/reach-server/server.toml is root:reach-server 0640, which the service account can read but not write.
Running init again refuses and changes nothing.
If the setup link is lost or has expired#
The link printed by init works once and expires after 60 minutes. If you lost it, used it by mistake in the wrong place or waited too long (the page then says it cannot be used), issue a new one. Run this on the server, as the reach-server user:
cd /
sudo -u reach-server /usr/bin/reach-server setup-link --config /etc/reach-server/server.tomlIt prints a new setup link, valid for 60 minutes and usable once. A new link replaces the earlier unused one, which then stops working.
It works only while the server has no owner yet. Once someone has completed the setup, the command refuses, prints no link and exits with an error. It does not reset a forgotten password; for that see Users and sign-in. The command needs the configuration file from step 3 to be in place, so run it after init and the install of server.toml, and the database must exist. (-config with one dash is accepted too.)
4. Start#
sudo systemctl enable --now reach-server
systemctl is-active reach-serverThe second command should print active. The server then listens on 127.0.0.1:8443 only. Logs: sudo journalctl -u reach-server.
On Rocky 9.8, systemd-analyze security reach-server.service gave an exposure score of 1.5 (OK) for the unit as shipped.
5. Sign in (SSH tunnel)#
On your own computer, open a tunnel to the server machine:
ssh -L 8443:127.0.0.1:8443 <your-user>@<server-address>Leave it running, then open https://localhost:8443 in your browser. The browser warns about the certificate until it trusts the evaluation CA. Either install /var/lib/reach-server/tls/reach-ca.pem on the machine with the browser (commands for macOS, Windows and Rocky are in Certificates and TLS), or accept the warning once after comparing the fingerprint on the sign-in page with the one init printed.
Paste the setup link from init into the browser address bar (it should start with https://localhost:8443/setup/). Enter your name, email address and a password. The setup link then takes you straight on to setting up two-step sign-in (the link is the proof it needs, so do this in the same visit): scan the QR code with an authenticator app (or type the setup key), type the six digits the app shows, and save the ten recovery codes the next page shows, once, in your password manager. You then land signed in on the Overview page (machines reporting and silent, AI tools, findings and changes in one place); Machines is the next tab. From now on every sign-in is the password and a code. (A person with a password but no second step needs an enrolment code from an owner or from reach-server user reset <email> --totp; see Users and sign-in.)
6. Mint an enrolment token#
An enrolment token is a secret that lets one or more machines join this server (enrolment and tokens). In the console open Add machines, give the token a label, a lifetime in days, a maximum number of uses and a rate limit, and create it. The token is shown on screen when created. Copy it into a file that only you can read, for example:
umask 077
cat > ~/reach-token # paste the token, press Enter, then Ctrl-D7. Install the agent and enrol it#
On the same machine, install the Reach agent (the read-only program that reports from each machine) and enrol its service with the token file from step 6. The commands, and what to do when the server's certificate changes, are in one place: Install the agent (Rocky). Do not run reach-agent enrol or scan --send as an ordinary user for this: that makes a second, per-user identity and the console lists the same computer twice. If enrol says the machine is already enrolled, or the clock is refused, see Look after agents. Running the server day to day (users, backups, logs, firewall): Run the server.
8. See the machine#
In the console open Machines: one machine is listed. Open it: the page includes a What we could not see section.
Open the server to other machines#
The server starts on 127.0.0.1. Agents and browsers on other machines can reach it only after you change the listen address. From other machines, only people who have set up two-step sign-in can sign in (step 5 does that for the owner); anyone else signs in on the server or through the tunnel with an enrolment code. The full explanation, including a separate agents-only address, is in Users and sign-in.
- In
/etc/reach-server/server.tomlsetpublic_urlto the name or address people and agents will use (it must match the certificate: with--tls self-signed, re-runreach-server tls renewafter changing it so the certificate covers the new name), and setlisten = "0.0.0.0:8443". - Open the port:
sudo firewall-cmd --permanent --add-port=8443/tcp && sudo firewall-cmd --reload(limit the source with a zone or rich rule if you can). If the command is not found, firewalld is not installed (the stock Rocky cloud image has none): open the port in your cloud provider's firewall or security group instead. sudo systemctl restart reach-server. If a user has not set up two-step sign-in, the server still starts andsudo journalctl -u reach-servershows aserver.users_without_second_stepwarning naming them: they cannot sign in from another machine until they set it up through the tunnel with an enrolment code. A browser through the tunnel athttps://localhost:8443is accepted whateverpublic_urlsays; a script orcurlthrough the tunnel is refused with "the request did not come from this site" oncepublic_urlis the network address, and the message says how to recover.
New tokens carry public_url, so tokens made after the change point agents at the new address.
Upgrade#
Get the newer RPMs as in step 1. Stop the server, install both over the old ones, migrate, and start it:
sudo systemctl stop reach-server
sudo dnf upgrade <folder>/reach-server-<new-version>-<build>.<arch>.rpm <folder>/reach-agent-<new-version>-<build>.<arch>.rpm
sudo -u reach-server /usr/bin/reach-server migrate
sudo systemctl start reach-serverEach build has its own build number, so a newer build is an upgrade even when the version is the same. On PostgreSQL, take a backup first and add --backup-done to migrate (Upgrade and migrate). Your data, configuration, KEK and enrolled machines are kept. This build adds two-step sign-in: the first time each person signs in after the upgrade they set up an authenticator and receive ten recovery codes, and sessions open before the upgrade end. The database migrates to this release's schema (its number is on the upgrade page) with reach-server migrate. If you upgrade while the server is running, the package restarts it onto the new version when the database needs no migration, and stops it, saying what to run, when it does; if the service is not running, the upgrade does not start it. Check what is actually running:
sudo curl --cacert /var/lib/reach-server/tls/reach-ca.pem https://localhost:8443/versionIt should show the new version. (sudo because the certificate folder is private to the service account; --cacert checks the server certificate instead of switching the check off. reach-server version only reports the file on disk, not the running process.)
Upgrading from a build that predates this behaviour. The restart is done by the package script that is already installed, and during an upgrade the old package's script runs. An installed build that does not have the restart does not restart itself when you upgrade from it. After that one upgrade, run sudo systemctl restart reach-server yourself; later upgrades restart on their own.
This was checked with the upgrade proof script, on two builds of the same source labelled 0.1.0 and 0.1.1: the running process changed to the new program, /version reported the new label, the KEK was unchanged and the console still listed the machine. It proves the upgrade mechanics. The server and agent were also upgraded from 0.1.0 to 0.1.1-263 in the Rocky Linux 9.8 x86_64 virtual machine (16 November 2026): the old agent was refused as too old, then the upgraded one reported again (0.1.1 notes).
Use PostgreSQL#
What was tested, and what was not.
| Tested | |
|---|---|
| PostgreSQL 17.12 | the project's automated tests (CI, a container), and by hand on a Mac |
| PostgreSQL 16.15 from the Rocky 9 AppStream module, on the same machine as the server | the steps on this page, end to end, in a Rocky 9.8 virtual machine with the RPM's service account: create the role and database, init, start, /version, then start over (packaging/tests/test-postgres-in-vm.sh) |
| PostgreSQL 17.12 from the PostgreSQL project's repository, on the same machine as the server | a separate tester on our team in a Rocky 9 virtual machine on an earlier development build (before version numbering was fixed), not repeated on the current build: init, owner setup, sign-in, token, agent enrolment, a report, reboot, and migrate-store from SQLite. That run found a blocker in this page's init step, fixed since and re-proved with 16.15 above; the fixed steps have not been rerun with 17 |
| PostgreSQL 15 and 18 (AppStream), PostgreSQL on another machine, RHEL, Rocky 10, PostgreSQL on x86_64 | not tested |
Rocky 9 does not ship PostgreSQL 17. Its AppStream has the module postgresql with streams 15 (the default), 16 and 18 (check with dnf module list postgresql). Any version not in the table is untested here; use 17 if you want what CI runs.
1. Install PostgreSQL on the server machine (skip if you already have one)#
From AppStream (tested with stream 16):
sudo dnf module enable -y postgresql:16
sudo dnf install -y postgresql-server
sudo postgresql-setup --initdb
sudo systemctl enable --now postgresqlOr version 17 from the PostgreSQL project's own repository (run by a separate tester on our team on an earlier development build and not repeated on the current one, see the table; use x86_64 or aarch64 in the address to match uname -m; dnf asks you to accept the repository's key):
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf module disable -y postgresql
sudo dnf install -y postgresql17-server
sudo /usr/pgsql-17/bin/postgresql-17-setup initdb
sudo systemctl enable --now postgresql-17(With the project's packages the service is called postgresql-17, not postgresql. The server's unit orders itself after postgresql.service only, so on that setup make sure PostgreSQL is up before the server after a reboot, or add your own After=postgresql-17.service with sudo systemctl edit reach-server.)
2. Create the role and the database#
Reach needs one empty database and a role that owns it. For a database on the same machine, the simplest and safest way is the local socket: the role is named after the service account, PostgreSQL's default peer rule then lets that account in, and no password exists to keep or leak.
sudo -u postgres psql -v ON_ERROR_STOP=1 \
-c 'CREATE ROLE "reach-server" LOGIN' \
-c 'CREATE DATABASE reach OWNER "reach-server"'3. The address file#
The address of the database lives in a file only the service account can read (Reach refuses a file that others can read, and never prints the address). For the socket:
sudo install -m 0600 -o reach-server -g reach-server /dev/null /etc/reach-server/pg-url
echo 'postgres://reach-server@localhost/reach?host=/var/run/postgresql' | sudo tee /etc/reach-server/pg-url >/dev/nulllocalhost only satisfies the address format; the host= setting makes the connection go through the socket, so sslmode does not apply. This socket address is the one tested.
For a database on another machine, create a role with a password (here reach) instead of the socket role above; the address is postgres://reach:PASSWORD@db.example.co.za:5432/reach?sslmode=verify-full. Use verify-full (encrypted, and the database server's name is checked against a certificate you trust); never sslmode=disable across a network. Use a password made of letters and digits so it needs no escaping, set it with \password reach inside psql rather than on a command line, and put the address in the file with sudoedit /etc/reach-server/pg-url so it never enters your shell history. The remote form was tested on a Mac only, not in the Rocky VM.
4. init, and install the configuration#
init runs as the reach-server user, which cannot write to /etc/reach-server, so it writes the configuration into the data folder and you then move it, exactly as for SQLite in step 3 above:
cd /
sudo -u reach-server /usr/bin/reach-server init \
--dir /var/lib/reach-server \
--config-out /var/lib/reach-server/server.toml \
--public-url https://localhost:8443 \
--listen 127.0.0.1:8443 \
--tls self-signed \
--postgres-url-file /etc/reach-server/pg-url
sudo install -o root -g reach-server -m 0640 /var/lib/reach-server/server.toml /etc/reach-server/server.toml
sudo rm /var/lib/reach-server/server.tomlThe public URL and listen address are the same ones as in step 3. init makes the schema, the encryption key (KEK), the certificates and the setup link, and writes driver = "postgres" and url_file into the configuration. It refuses a database that already holds a Reach schema. If it fails half way, drop the database and create it again (step 2) before running it again.
5. Start it#
sudo systemctl enable --now reach-server
systemctl is-active reach-server
sudo curl --cacert /var/lib/reach-server/tls/reach-ca.pem https://localhost:8443/version(sudo because the certificate folder is private to the service account.) Carry on with step 5, Sign in. The unit orders itself after postgresql.service (ordering only, not a requirement, because the database may be on another machine).
Move an evaluation from SQLite to PostgreSQL#
See Upgrade and migrate.
Upgrades on PostgreSQL#
reach-server migrate does not back PostgreSQL up for you. Take a pg_dump first, then run sudo -u reach-server /usr/bin/reach-server migrate --backup-done. Run it with sudo: the configuration file is readable only by the service account, so the bare command fails for an ordinary user.
More than one server process#
It is designed to work on PostgreSQL and the agent-row lock that makes it safe is tested, but it has not been run as two real processes.
Back up the KEK separately#
/var/lib/reach-server/kek is the key that protects the secrets in the database. Copy it to a different, safe place than the database and any database backups. Without it, every agent must enrol again and the server cannot sign Statements, the signed snapshots of its figures described in Statements (a backup is the database and this file together; the database alone cannot sign). sudo cp it somewhere root-only and then to your password manager or vault; do not leave copies in your home folder.
Remove#
sudo dnf remove reach-server reach-agentThis stops and disables the service and removes the binaries and units. It keeps your data: /var/lib/reach-server (database, KEK, certificate), /etc/reach-server and the reach-server user stay, so a mistaken removal or a remove-then-reinstall does not destroy anything. The test confirmed this: after removal the data and config were still there, and after reinstalling the RPM and running sudo systemctl enable --now reach-server the server started on the same data and the console still listed the machine. The reach-agent user is removed. If someone ran a per-user enrol, its state in that user's ~/.local/state/reach-agent/ is not touched by the package: delete it yourself.
Delete all Reach data (purge)#
Warning: this permanently deletes the Reach database, the KEK and the configuration. It cannot be undone, and enrolled agents will have to enrol again on a new server. Back up /var/lib/reach-server first if there is any chance you need it.
After dnf remove:
sudo rm -rf /var/lib/reach-server /etc/reach-server
sudo userdel reach-serverThe test ran exactly these commands and then found no folder, user, unit, binary or open port left.
Start over while the package stays installed#
If you delete the data and the reach-server user but keep the package (to run init again without reinstalling), init fails because the user and the folders are gone: the package creates them only when it is installed. Put them back first:
sudo systemd-sysusers /usr/lib/sysusers.d/reach-server.conf
sudo systemd-tmpfiles --create /usr/lib/tmpfiles.d/reach-server.conf(The first recreates the user, the second the two folders with their owners and modes.) With PostgreSQL, also drop and create the database again, because init refuses one that already holds a Reach schema. The steps, including a control that shows init failing without these two commands, ran on a Rocky 9 test server (packaging/tests/test-postgres-in-vm.sh; see Proof scripts).
Test it yourself#
The proof scripts that run this guide's steps on a throwaway test server, for people with the private source, are described in Proof scripts.