Reconfiguring existing jails
After creating a jail, its parameters can be modified using the jconfig, jget, and jset commands. jconfig provides an interactive TUI configurator (jsetup-tui), while jget/jset allow managing parameters from the command line.
Built-in help and examples are available for each command:
cbsd jconfig --help
cbsd jget --help
cbsd jset --help
jconfig — Interactive Configurator
Syntax
cbsd jconfig [jname=<jailname>]
Operation Modes
Without arguments — interactive jail selector:
cbsd jconfig
Opens a list of all existing jails for selection. After selecting, the jsetup-tui TUI configurator will launch with the current parameters of the selected jail.
With specifying a jail — direct launch of the configurator:
cbsd jconfig jname=myjail
Immediately opens the TUI configurator for the specified jail.
What can be changed via jconfig
jsetup-tui provides interactive forms to modify the same parameters as during jail creation:
- Network settings (
ip4_addr,interface,vnet,ci_*) - Permissions (
allow_*) - Mount parameters (
mount_*) - Lifecycle scripts (
exec_*) - System parameters (
persist,enforce_statfs,devfs_ruleset, etc.) - Package lists, cloud-init, environment variables
- Base system and clone parameters
After saving changes, the configuration is applied automatically.
jget — reading jail parameters
Syntax
cbsd jget jname=<jailname> [param=<name>]
Operating modes
All parameters:
cbsd jget jname=myjail
Returns the full current configuration of jail myjail.
Specific parameter:
cbsd jget jname=myjail param=vnet
Returns only the value of the specified parameter.
Bulk retrieval:
cbsd jget jname='prod-*' param=status
Returns the status of all jails whose name starts with prod-.
jset — setting jail parameters
Syntax
cbsd jset jname=<jailname> key=value [key=value ...]
Examples
Change a single parameter:
cbsd jset jname=myjail astart=0
Disables autostart for myjail.
Change multiple parameters:
cbsd jset jname=myjail ip4_addr="10.0.0.50" interface="em1"
Enable VNET:
cbsd jset jname=myjail vnet=1 ci_ip4_addr="10.0.1.5" ci_gw4="10.0.1.254"
Bulk update:
cbsd jset jname='test*' astart=0
Disables autostart for all jails starting with test.
Bulk update via name list:
cbsd jset web1 web2 web3 devfs_ruleset=5
Practical scenarios
Quick diagnostics
Check which jails have autostart enabled:
cbsd jget jname='*' param=astart
Check IP addresses of all VNET jails:
cbsd jget jname='*' param=ip4_addr
Pre-migration preparation
Save full jail configuration before migration:
bash
cbsd get =legacy > legacy-config.txt
### Mass disable autostart for maintenance
bash
cbsd set ='*' astar t= 0
After maintenance, restore:
bash
cbsd set ='*' astar t= 1
Fixing the network interface
If the host interface was renamed (e.g., em0 → igb0):
cbsd jset jname='*' interface="igb0"
Interactive configuration via jconfig
When you need to change multiple parameters of a single jail, it's convenient to use the TUI:
cbsd jconfig jname=myjail
This will open jsetup-tui with grouped parameter sections, validation, and the ability to undo changes.