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
-
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 aCBSDfileis present in the current directory. -
CLI (
jcreate) — creation via command-line arguments inkey=valueformat. Required parameters:jname,host_hostname,ip4_addr,ver,arch. Suitable for scripts and automation. -
CBSDfile — a declarative configuration file in the current working directory. The command
cbsd jcreateautomatically readsCBSDfileand creates a jail with the specified parameters. Ideal for distributing configurations via SCM systems (git), asCBSDfileis a text file that is easy to version control, transfer between servers, and distribute as part of repositories.