Package Port Directory Structure¶
The directory structure of a package for pfSense® software is similar to that of a traditional FreeBSD port.
or more information on working with FreeBSD Ports, see bsd.port.mk.
This page uses the simple Cron package as an example, many other packages are similar. See FreeBSD Ports Used for Packages for links to existing packages to copy/clone from.
First is the category, which roughly lines up with the category for the package with the caveat that if a pfSense package is based on a FreeBSD port, it should be in the same location (e.g.
In the case of Cron this is
- Main package directory
Inside of the category directory, it is always prefixed with
From here on, the
FreeBSD-portsprefix will be omitted for brevity.
Includes version information, information about binaries, dependencies, install procedures, where to copy files, and so on. Copy an existing one for a similar package and adjust as needed (but do so carefully):
- pfSense standard package
These are the same for all packages. Copy the contents from another existing package.
A brief text description of the package:
- Packing List
A list of files installed by the package, for specifics on the format, see the links above:
- Files Directory
The directory where custom files are placed which will be copied to the firewall:
The structure under the
files/directory should follow the same conventions as files on the pfSense installation, which typically follows hier(7) from FreeBSD. For example, executable scripts would go under
An optional file containing privilege information:
- Package Code and Configuration
The include files and XML files for the package:
- GUI-Accessible Files
Files that go into the main directory of the web server:
The Cron package uses a directory under /usr/local/www for its files – this is optional.
sysutils/pfSense-pkg-Cron/files/usr/local/www/packages/cron/cron.php sysutils/pfSense-pkg-Cron/files/usr/local/www/packages/cron/cron_edit.php sysutils/pfSense-pkg-Cron/files/usr/local/www/packages/cron/index.php