Skip to content
FreeCORE

From 15.1, FreeCORE includes Bastille alongside the existing iocage jail manager. The two engines keep separate releases, configuration and lifecycle, and existing iocage jails are not converted. See Plugins, Jails and Applications when choosing where a workload should run.

The web interface is a console over Bastille rather than a second jail manager. It configures the Bastille service and shows every jail with its state and resource use. The jails themselves are created and managed on the console with the bastille command. Go to Jails, click the Settings icon, and select Bastille Jails. The Settings icon on that screen leads to Bastille Settings and back to iocage Jails.

  1. Click the Settings icon, select Bastille Settings, and choose a healthy, online, unlocked Data Pool. Bastille keeps its releases, jails, templates and logs below /mnt/<pool>/bastille.
  2. Review Startup Delay (seconds) and Parallel Start Limit, which control automatic startup, then click Save.
  3. To start jails after a host boot, go to Services, select Start Automatically for Bastille, and mark each jail for startup as shown below. The configured pool must be available when startup runs.
Bastille Settings dialog with the data pool, startup delay and parallel start limit
FIG 1 Bastille Settings

Shown with Bastille already configured on the pool tank.

Once a pool is configured, bastille finds it on its own. No environment variable and no per-shell setup is needed. Open a console as root and use the commands below. Changing the selected pool later is not a jail migration procedure.

A release is the FreeBSD® base a jail runs on. Its version need not match the FreeCORE version. Download it as packages (-p), so that it can be updated later:

bastille bootstrap -p 15.1-RELEASE
bastille list release

FreeCORE does not ship freebsd-update, so a release fetched as a single archive (bastille bootstrap 15.1-RELEASE, without -p) cannot receive security patches on this system. A packaged release is updated through pkg, and this works for FreeBSD 15.0 and later.

bastille update 15.1-RELEASE

Every jail built on the release shares its userland. Restart those jails afterward. bastille update <jail> applies only to thick jails.

A VNET jail has its own network stack and can use DHCP. Bastille attaches it to a bridge on the interface you name, creating the bridge when needed:

bastille create -V web 15.1-RELEASE DHCP vtnet0

For a static address, give the address and prefix instead of DHCP:

bastille create -V web 15.1-RELEASE 192.168.1.50/24 vtnet0

Without -V the jail shares the host’s network stack and needs a static address, which is added as an alias on the interface. DHCP requires a VNET jail, as it does with iocage. Names use 1–11 letters or digits. Bastille’s own command names are reserved.

A host interface belongs to one bridge. -V places the interface you name in a bridge of its own. VNET jails in iocage use bridge0 on the interface they are given. Do not point both at the same interface. Whichever starts second cannot attach. On a host that also runs iocage VNET jails, give Bastille a different interface.

bastille start web
bastille stop web
bastille restart web
bastille list all
bastille console web

To include a jail in automatic startup, set its boot flag. The service’s Start Automatically setting must also be selected:

bastille config web set boot on

The web interface shows the same state. Use Refresh on Bastille Jails after changing a jail on the console.

A Bastille template is a directory with a Bastillefile that installs and configures an application inside a jail. Templates come from git repositories you choose, fetched with the same bootstrap command as a release:

bastille bootstrap https://github.com/tschettervictor/bsd-apps
bastille template web bsd-apps/jellyfin

A template runs commands inside the jail as root, so choose repositories the way you choose packages, and read a template before applying it to a customized jail. A failed template can leave partial changes. Inspect the jail before retrying. FreeCORE reviews none of the templates a repository provides.

Warning

Do not run bastille setup. It configures a plain FreeBSD host. It writes a firewall ruleset that FreeCORE’s Bastille service will not start with, and its other changes land in files FreeCORE regenerates at every boot. The web interface configures the storage. The image provides the rest.

bastille limits needs the loader tunable kern.racct.enable=1. Add it in System › Tunables (type loader) and reboot, as for iocage resource limits.

FreeCORE does not configure PF for Bastille, and Bastille does not allow bastille rdr for VNET jails. A VNET jail has its own address on your network, so services in it are reached directly. Templates that declare RDR lines do not apply here.

bastille destroy web
bastille destroy 15.1-RELEASE

A release cannot be destroyed while a jail still uses it. Datasets mounted into a jail from elsewhere on the pool are not part of the jail and remain.

Bastille Jails lists every jail by name with its JID, State and Release, as the iocage jail list does. Expand a row to see Boot (whether the jail is marked for automatic startup), IPv4 and IPv6 (a running VNET jail shows the address it holds, including a DHCP lease, and a stopped DHCP jail shows DHCP), and to use Console Log, Start, Restart and Stop. Releases lists each downloaded release with its size and the jails using it. Live CPU and Memory use of running jails is shown on the dashboard’s Guests card, which lists running Bastille jails in their own section. Its link opens Bastille Jails. See Bastille Screens for every field.