add this line to the file /etc/fstab
    md99 none swap sw,file=/pagefile.bin 0 0

create a blank file of size 1 GB
    dd if=/dev/zero of=/pagefile.bin bs=4096 count=262144

enable swap (or just reboot as a test):
    /sbin/swapon -a

verify swap is enabled

To add a line to /etc/fstab I used nano for this which is not installed by default. To install this log in with SSH on your Netgate device and run the commands below.

pkg update
pkg install nano