TrueNAS CORE Version DocumentationThis content follows the TrueNAS CORE 13.0 releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.
Creating Jails
7 minute read.
This feature is generally available in TrueNAS CORE and supported by the TrueNAS Community. iXsystems customers with TrueNAS Enterprise hardware and an iXsystems Support contract can contact Support about accessing these features.
Jails are a lightweight, operating-system-level virtualization. One or multiple services can run in a jail, isolating those services from the host TrueNAS system. TrueNAS uses iocage for jail and plugin management. The main differences between a user-created jail and a plugin are that plugins are preconfigured and usually provide only a single service.
It is important to understand that users, groups, installed software, and configurations within a jail are isolated from both the TrueNAS host operating system and any other jails running on that system.
The ability to create multiple jails offers flexibility regarding software management. For example, an administrator can choose to provide application separation by installing different applications in each jail, to create one jail for all installed applications, or to mix and match how software is installed into each jail.
You must create a data storage pool before using jails. Make sure the pool has enough storage for all the intended jails. The Jails screen displays a message and button to CREATE POOL if a pool doesn’t exist on the TrueNAS system.
If pools exist, but not chosen to use with jails or plugins, a dialog displays prompting you to choose a pool. Select a pool and click CHOOSE.
To select a different pool for jail and plugin storage, click the settings icon. You can select a different pool from the dropdown list.
Jails and downloaded FreeBSD release files are stored in a dataset named iocage/.
TrueNAS has two options to create a jail. The Jail Wizard makes it easy to create a jail or the ADVANCED JAIL CREATION alternate method, where every possible jail option is configurable. See [Jails Screen](/uireference/jailspluginsvms/jails/jailsscreens/ for more information on the Jails screens and configuration settings.
To add a new jail, click Jails > ADD. The wizard provides the simplest process to create and configure a new jail. The advanced configuration method is recommended for only advanced users with very specific use applications.
Enter a name for the jail. Names can contain letters, numbers, periods (.), dashes (-), and underscores (_).
Select the jail type. Default (Clone Jail) or Basejail. Clone jails are clones of the specified FreeBSD release. They are linked to that release, even if they are upgraded. Basejails mount the specified release directories as nullfs mounts over the jail directories. Basejails are not linked to the original release when upgraded.
Specify the release to use. Jails can run FreeBSD versions up to the same version as the host TrueNAS system. Newer releases are not shown. Versions of FreeBSD are downloaded the first time they are used in a jail. Additional jails created with the same version of FreeBSD are created faster because the download has already been completed.
Click Next to display the second Wizard screen with a simplified list of networking options.
Click NEXT to view a summary screen of the chosen jail options. Click SUBMIT to create the new jail. After a few moments, the new jail is added to the primary jails list.
Click Jails > ADD, then ADVANCED JAIL CREATION to open the advanced jail creation form.