Creating FreeBSD jail containers

Supported platforms

Jail creation commands work only on: - FreeBSD - DragonFlyBSD

On other operating systems, these commands are unavailable.

Creation methods

CBSD supports three ways to create jails:

# Method Command Purpose Complexity
1 TUI (dialog) cbsd jconstruct-tui Beginners, interactive creation via ncurses menu Low
2 Command line cbsd jcreate param=value Automation, scripts, CI/CD Medium
3 CBSDfile cbsd jcreate (reads CBSDfile in cwd) Recommended method for regular use cases Medium

Brief description of methods

  1. TUI (jconstruct-tui) — an interactive ncurses dialog. The main advantage: no need to memorize exact parameter names and formats — all options are visually displayed in the menu. Step-by-step input of parameters: jail name, IP address, FreeBSD version, network, options. Generates configuration and creates the jail. Does not work if a CBSDfile is present in the current directory.

  2. CLI (jcreate) — creation via command-line arguments in key=value format. Required parameters: jname, host_hostname, ip4_addr, ver, arch. Suitable for scripts and automation.

  3. CBSDfile — a declarative configuration file in the current working directory. The command cbsd jcreate automatically reads CBSDfile and creates a jail with the specified parameters. Ideal for distributing configurations via SCM systems (git), as CBSDfile is a text file that is easy to version control, transfer between servers, and distribute as part of repositories.