THE DEPLOYMENT HANDBOOK / Ubuntu Server

Install the Critical Pro relay on Ubuntu Server.

Set up a private HTTPS relay on Ubuntu Server, schedule feed updates and verify downloads from your firewall.

IPV4 ONLY
STANDARD + CRITICAL

Prepare Ubuntu Server 24.04 LTS or 26.04 LTS

Use the distribution NGINX package on a dedicated Ubuntu Server with systemd. Identify the private interface, DNS name and appliance address in the relay network plan. Restrict inbound connections before installation because the package can start the default HTTP site.

If UFW manages the host, run sudo ufw status verbose and check the default incoming policy and existing rules. With a deny-by-default incoming policy, a source-specific rule is sudo ufw allow in on ens18 from 192.0.2.20 to 192.0.2.10 port 443 proto tcp. Replace the interface and both addresses. Review existing broader rules, upstream NAT and management access. If the host uses a different firewall, apply the equivalent private ACL there.

Ubuntu / APT
sudo apt-get update
sudo apt-get install --no-install-recommends python3 nginx ca-certificates curl
python3 --version
getent group www-data

Ubuntu Server NGINX documentation · UFW on Ubuntu Server

Install the updater and its credential

Download the four reference files into a temporary directory and review them. Run these commands from the same directory. The service runs under a dedicated account. Its www-data group allows the NGINX workers to read the published snapshot.

Install the updater and systemd units
getent passwd data-shield-relay >/dev/null ||
  sudo useradd --system --no-create-home --gid www-data --shell /usr/sbin/nologin data-shield-relay
sudo install -d -o root -g root -m 0755 /usr/local/lib/data-shield-relay
sudo install -o root -g root -m 0755 refresh.py /usr/local/lib/data-shield-relay/
sudo install -o root -g root -m 0644 data-shield-relay.service data-shield-relay.timer /etc/systemd/system/
sudo systemctl daemon-reload

In a private root terminal, enter the Device ID and token at the hidden prompts. systemd loads the resulting root-only file when it starts the update service.

Verify the first download and enable the timer

Run the first verified download
sudo systemctl start data-shield-relay.service
systemctl show data-shield-relay.service -p Result -p ExecMainStatus
sudo journalctl -u data-shield-relay.service -n 12 --no-pager
sudo -u www-data test -s /var/lib/data-shield-relay/current/critical.txt &&
  sudo ls -lh /var/lib/data-shield-relay/current/

Continue when the service reports Result=success and ExecMainStatus=0, the complete file is readable by the NGINX worker, and the expected splits are present. The journal records the generation and counts. A successful oneshot service normally returns to the inactive state.

Schedule a verified refresh every two hours
sudo systemctl enable --now data-shield-relay.timer
systemctl list-timers --all data-shield-relay.timer

Check the next activation time in the timer output.

Configure the private NGINX site

Prepare the certificate for your internal DNS name and trust its issuer on the firewall as described in TLS setup. Replace both source paths below. Edit the sample listener address, both occurrences of its DNS name and the permitted client address. Keep deny all immediately after the allowed addresses.

Install the certificate and edit the NGINX site
sudo install -d -o root -g root -m 0700 /etc/nginx/tls
sudo install -o root -g root -m 0644 /path/to/fullchain.pem /etc/nginx/tls/feed-relay.crt
sudo install -o root -g root -m 0600 /path/to/privkey.pem /etc/nginx/tls/feed-relay.key
sudo install -o root -g root -m 0644 nginx.conf.example /etc/nginx/sites-available/data-shield-relay
sudoedit /etc/nginx/sites-available/data-shield-relay

Create the site symlink once. If it already exists, confirm its target. Check for competing listeners and verify that exposed ports match your private network policy.

Enable and validate the private listener
sudo ln -s /etc/nginx/sites-available/data-shield-relay /etc/nginx/sites-enabled/data-shield-relay
sudo nginx -t && sudo systemctl enable --now nginx && sudo systemctl reload nginx
sudo ss -lntp

After certificate renewal, run sudo nginx -t && sudo systemctl reload nginx so NGINX picks up the new chain.

Verify delivery from the firewall

Set the firewall connector to the internal https://feed-relay.example.invalid/critical.txt, replacing the hostname. For equipment using splits, configure the separate URLs matching the files in current/. Test the download from the allowed address and confirm the imported entry count. Check a denied client as well. If a refresh fails, check the logs and rotate the credential if needed.

BETTER DATA. TOGETHER.

Need a correction?

Report a documentation issue or request a review of an address. Keep credentials and private configuration out of public issues.

Report an issue ↗Block request ↗Whitelist request ↗