Using FastNetMon Advanced with FerretDB and SQLite backend instead of MongoDB

We have an experimental version of our installer, which installs FastNetMon Advanced with FerretDB automatically:

wget https://install.fastnetmon.com/installer -Oinstaller
sudo chmod +x installer
sudo ./installer -ferretdb

This guide is an improved version of this guide with the goal to eliminate dependency on PostgreSQL and using SQLite instead.

FerretDB offers complete ARM64 support; you can use FastNetMon Advanced ARM64 edition with FerretDB.

wget https://install.fastnetmon.com/installer_arm64 -Oinstaller
sudo chmod +x installer
sudo ./installer -developer_version -ferretdb

Please follow all steps as in the referenced guide until you reach the section about /lib/systemd/system/ferretdb.service. You will need to use a slightly different version of it:

[Unit]
Description=FerretDB database
After=network.target remote-fs.target
 
[Service]
Type=simple
ExecStart=/usr/bin/ferretdb --debug-addr="127.0.0.1:8089" --handler="sqlite" --sqlite-url "file:/var/lib/ferretdb/"
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target

After this, you will need to create a folder for SQLite database:

sudo mkdir /var/lib/ferretdb

After this, follow all steps from the original guide, skipping all sections about PostgreSQL.

After successful creation of a database, you will see a new file in /var/lib/ferretdb/ which will carry all FastNetMon configuration:

ls -al /var/lib/ferretdb/
-rw-r--r--  1 root root 49152 Jul  5 14:49 fastnetmon.sqlite

Then we need to explicitly disable authentication using the following option, as SQLite-backed does not support auth:

echo '{"mongodb_username": ""}' | sudo tee /etc/fastnetmon/fastnetmon.conf