Hello. This guide is for installing Safing Portmaster v2. Do not upgrade Safing Portmaster v1 to new version - it makes more troubles than one wants. Safing Portmaster v1 was installed as normal, hand run program and its auto start was controlled by .desktop files. Now it runs as service and cleaning up upgrade is not wort it. So if someone have Safing Portmaster v1 installed I encourage you to completely uninstall and clean after it.

--

Now for installing. Again, there's no repository to add so we need to download .rpm package. But first decide template in which you install it. Every appVM based on this template will run portmaster.service automatically. I've installed it in my multipurpose/multimedia template but for the sake of this guide I will assume new template.

  1. Clone default fedora-xfce4 template and name it tmpl-portmaster. Easiest way is from GUI at Qube Manager.

portmaster-01-clone|690x350

  1. Download .rpm package by disposable qube from Safing site

https://safing.io/

  1. Move downloaded file to 'tmpl-portmaster`

portmaster-02-move-file-01|690x492

portmaster-02-move-file-02|411x264

  1. Install .rpm file in tmpl-portmaster

portmaster-03-install|690x414

  1. Restart tmpl-portmaster template and you will see notification from portmaster and its icon in system tray - open the app

portmaster-04-tray|527x221

portmaster-04-tray-02|278x296

  1. After opening portmaster app do Quick Setup - either leave everything default or change for example DNS to something more secure (I'm using Quad9 with Cloudflare as Fallback)

portmaster-05-quickconfig|690x414

  1. Close app UI and shutdown tmpl-portmaster

--

Now you in every appVM you base on tmpl-portmaster, portmaster will start as service in background minimized to tray. In order to be able to configure it per VM basis you need to make its configuration directory persistent as it's located in /var/lib/portmaster/ this time.

  1. Open appVM Xfce Terminal from Q menu
  2. Go to /rw/
    $ cd /rw
    
  3. Check if bind-dirs directory is here
    $ ll
    total 32
    drwxr-xr-x.  3 root root  4096 Aug 29  2024 bind-dirs
    drwxr-xr-x.  2 root root  4096 Aug 29  2024 config
    drwxr-xr-x.  3 root root  4096 Aug 29  2024 home
    drwx------.  2 root root 16384 Aug 29  2024 lost+found
    drwxr-xr-x. 12 root root  4096 Jun 25  2024 usrlocal
    
  4. if not, make it
    $ sudo mkdir bind-dirs
    
  5. Go to bind-dirs directory and make var/lib and go inside
    $ cd bind-dirs
    $ sudo mkdir -p var/lib
    $ cd var/lib
    
  6. Copy /var/lib/portmaster to /rw/bind-dirs/
    $ cp -r /var/lib/portmaster/ ./
    
  7. Check if it copied
    $ ll portmaster/
    total 28
    -rw-------. 1 root root  703 Sep 22 00:40 config.json
    drwx------. 5 root root 4096 Sep 22 00:40 databases
    drwxr-xr-x. 2 root root 4096 Sep 22 00:40 download_binaries
    drwxr-xr-x. 2 root root 4096 Sep 22 00:40 download_intel
    drwxr-xr-x. 2 root root 4096 Sep 22 00:40 exec
    drwxr-xr-x. 2 root root 4096 Sep 22 00:40 intel
    drwx------. 2 root root 4096 Sep 22 00:40 log
    
  8. Go to /rw/config/ and make sure that qubes-bind-dirs.d is there
    $ cd /rw/config
    $ sudo mkdir qubes-bind-dirs.d
    $ cd qubes-bind-dirs.d
    
  9. Make/edit 50-user.conf file
    sudo nano 50-user.conf
    
  10. inside file, type
    binds+=('/var/lib/portmaster')
    
  11. Restart appVM

--

That's it. Now you can change settings of portmaster in appVM (or disposable template - same routine)

PS: I don't have any debian but if it uses systemd then procedure is the same except you download .deb file and install it by sudo apt install file.deb