BlowfishCMS
A small content management system for OpenBSD
version 0.45.6 · ISC · 2026-12-03 · releases
476 lines · 14.7 KB · download this file
.\" Copyright (c) 2026 Dakota Baldwin
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 17 2026 $
.Dt BLOWFISHCTL 8
.Os
.Sh NAME
.Nm blowfishctl
.Nd install and run a BlowfishCMS site
.Sh SYNOPSIS
.Nm blowfishctl
.Cm install
.Fl -domain Ar host
.Op Fl -alias Ar host
.Fl -admin Ar name
.Op Fl -mail-from Ar address
.Nm blowfishctl
.Cm update
.Op Fl -check
.Op Fl -skip-tests
.Ar release.tar.gz | Cm latest
.Nm blowfishctl
.Cm check-updates
.Nm blowfishctl
.Cm rollback | releases | status | restart
.Nm blowfishctl
.Cm backup
.Op Fl -with-secrets
.Nm blowfishctl
.Cm password
.Op Ar name
.Nm blowfishctl
.Cm unlock
.Nm blowfishctl
.Cm mfa-off Ar name
.Nm blowfishctl
.Cm addon | theme
.Cm list | refresh
.Nm blowfishctl
.Cm addon
.Cm install | update | enable | disable | remove
.Ar name
.Nm blowfishctl
.Cm addon | theme
.Cm add Ar archive.tar.gz
.Nm blowfishctl
.Cm addon | theme
.Cm update Fl \-all
.Nm blowfishctl
.Cm mail-token | certificate | httpd | migrate | files
.Nm blowfishctl
.Cm nightly | requests
.Sh DESCRIPTION
.Nm
installs and runs a BlowfishCMS site: a content management system made of
one Perl application, a SQLite catalogue and
.Xr httpd 8 ,
with each part running as a FastCGI service under its own account.
There is one site per server.
.Nm
must be run as root, normally through
.Xr doas 1 .
Run without a command, it prints a summary of the commands.
.Pp
The commands are as follows:
.Bl -tag -width Ds
.It Xo
.Cm install
.Fl -domain Ar host
.Op Fl -alias Ar host
.Fl -admin Ar name
.Op Fl -mail-from Ar address
.Xc
Set up a new site from an unpacked release, run as root from that release's
folder as
.Ic doas ./bin/blowfishctl install ...
(or, on a new server where
.Xr doas 1
isn't set up yet, as root after
.Ic su - ) .
It checks the release; writes
.Pa /etc/doas.conf
letting the wheel group use
.Xr doas 1
when there is none; adds the xbase set (fetched from cdn.openbsd.org and
checked with
.Xr signify 1 )
when the server lacks it; installs the Perl packages and python3 with
.Xr pkg_add 1 ;
creates the service accounts and folders, writes the settings file,
copies the code to
.Pa /opt/blowfishcms ,
builds the catalogue with the starter pages, starts the services,
configures
.Xr httpd 8 ,
gets a Let's Encrypt certificate with
.Xr acme-client 1 ,
adds the scheduled jobs to root's
.Xr crontab 5
and asks for the admin password.
Running it again after a failure carries on where it stopped.
.Bl -tag -width Ds
.It Fl -domain Ar host
The site's address, without
.Ql https://
or a leading
.Ql www .
.It Fl -alias Ar host
Another name that redirects to the domain.
May be given more than once.
.It Fl -admin Ar name
The first owner's sign-in name for the admin.
It is not a system account.
.It Fl -mail-from Ar address
The address the contact form sends from; the default is
.Ql site@ Ns Ar domain .
.El
.It Xo
.Cm update
.Op Fl -check
.Op Fl -skip-tests
.Ar release.tar.gz | Cm latest
.Xc
Install a new release.
With
.Cm latest ,
the newest release is fetched from where updates come from (see
.Cm updates-from )
and checked against its published
.Pa .sha256
first.
The release is checked (layout, no symbolic links, Unix line endings,
code that compiles) and its tests are run with python3 (added first if the server lacks it): first
against a migrated copy of the site's own catalogue,
then against catalogues of their own.
Nothing changes if a test fails.
The catalogue is then snapshotted, migrated, and the new code swapped in;
the services are restarted and a few addresses fetched, and the previous
code is put back if any of that fails.
Finally the new release rewrites the
.Xr httpd 8
configuration and the scheduled jobs.
The last five releases are kept.
The add-ons and themes bundled with the release
.Pf ( Pa catalog/addons ,
.Pa catalog/themes )
join the lists, and each installed one with a newer version there is
updated to it.
.Bl -tag -width Ds
.It Fl -check
Stop after the tests; change nothing.
.It Fl -skip-tests
Do not run the tests.
.El
.It Cm updates-from Op Ar url | Cm none
Where updates come from: the address of a Repositories add-on, such as
.Lk https://example.org/x/repos/ .
The newest release is its
.Pa blowfishcms
repository's
.Pa releases/latest ,
and the add-ons and themes its
.Pa blowfishcms-addons
and
.Pa blowfishcms-themes
repositories'
.Pa archive/latest.tar.gz .
Without an argument, show it;
.Cm none
stops looking for updates.
Owners can set it on the admin's System screen too.
It is kept in
.Pa /etc/blowfishcms-updates-from .
.It Cm check-updates
Look for a new BlowfishCMS release where updates come from, fetch the add-ons
and themes from there where the server has an address, and look for newer versions
of the installed add-ons and themes, for the admin's notifications, and
email the alerts address set on the Mail screen about anything it has not
been told.
The nightly job does this.
.It Cm places
Fetch the city database Analytics looks visitors' places up in: DB-IP's
free IP to City Lite (CC BY 4.0) from
.Lk https://download.db-ip.com ,
or the address in
.Pa /etc/blowfishcms-places-url ,
where MONTH stands for the month, such as 2026-11.
It replaces the old one only once the comments account has read it.
Only the place is kept from a visit, never the address.
The nightly job does this once a month.
.It Cm rollback
Put back the code from before the last update, and the
.Xr httpd.conf 5
locations that release writes.
The catalogue is left as it is.
.It Cm releases
List the live release and the kept ones.
.It Cm status
Show the site's address, the release, whether each service and
.Xr httpd 8
is running, when the certificate expires, the free disk space, memory and
swap, how long the server has been up and any crash dumps in
.Pa /var/crash ,
and whether the mail token and the admin password are set.
.It Cm restart
Restart the site's services.
.It Cm backup Op Fl -with-secrets
Write a backup archive of the media, the catalogue and comments (copied
with SQLite's backup feature), the settings, the code, the add-ons' data and
the site's own files to
.Pa /var/backups/blowfishcms ,
with a
.Pa .sha256
file beside it.
Each archive holds
.Pa _backup/RESTORE.txt
with the steps to restore it.
.Bl -tag -width Ds
.It Fl -with-secrets
Also write a separate archive, readable only by root, of the mail token,
the session and form keys and the add-ons' keys.
.El
.It Cm password Op Ar name
Set an admin user's password, at least 12 characters, asked for twice and
not echoed, and end that user's sessions.
A
.Ar name
that is not a user yet becomes a new owner.
Without
.Ar name ,
the account the site was installed with.
.It Cm unlock
Clear the record of failed sign-ins after a lockout.
.It Cm mfa-off Ar name
Turn off two-step sign-in for a user who has lost their authenticator and
recovery codes.
.It Cm addon list
List the installed add-ons, whether each is on, whether it runs as its own
service, and any problem with it.
.It Cm addon add Ar archive.tar.gz
Put the add-ons in an archive in the list the admin's Add-ons screen
offers, as an upload there does.
The archive holds one add-on's folder, or several (such as a whole add-ons
repository's archive); one older than the list's copy is left out.
Add-ons run with the site's rights: only add code you trust.
.It Cm addon refresh
Fetch the add-ons' archive from where updates come from (or the address in
.Pa /etc/blowfishcms-addons-url )
and add what is in it to the list.
Without either there is nothing to fetch.
.It Cm addon install Ar name
Install the add-on
.Ar name
from the list into
.Pa /opt/blowfishcms-addons ,
fetching the list first where there is an address.
An add-on that does not suit this release is not installed.
.It Cm addon update Ar name
Replace an installed add-on with the list's version, keeping the
replaced copy beside it.
An update that does not suit this release leaves the old version in place.
.It Cm addon update Fl \-all
Update every installed add-on that has a newer version in the list,
one at a time.
One that fails, or needs a newer BlowfishCMS, keeps the version it had and
the rest carry on; the last line says what was updated, skipped and failed.
The Add-ons screen's
.Sy update all
does the same for the versions it showed.
.It Cm addon enable Ar name
Switch an add-on on.
An add-on with its own service also gets an account, private folders, an
.Xr rc.d 8
service and
.Xr httpd 8
addresses.
.It Cm addon disable Ar name
Switch an add-on off.
Its data is kept.
.It Cm addon remove Ar name
Remove an add-on that is switched off.
Its files are kept beside the add-ons folder, renamed, and its data where
it was.
.It Cm theme list
List the theme folders: the release's own and those installed in
.Pa /opt/blowfishcms-themes ,
with their versions and anything that stops one being used.
.It Cm theme add Ar archive.tar.gz
Put the themes in an archive in the list the admin's Themes tab offers, as
.Cm addon add
does for add-ons.
.It Cm theme refresh
Fetch the archive at the address in
.Pa /etc/blowfishcms-themes-url
and add what is in it to the list.
.It Cm theme install Ar name
Install a theme from the list into
.Pa /opt/blowfishcms-themes .
Its variants appear on the Themes tab, hidden until shown.
.It Cm theme update Ar name
Replace an installed theme with the list's version.
Its variants keep their colours and fonts;
each variant's editor on the Themes tab can give it the new version's.
.It Cm theme update Fl \-all
The same for themes.
.It Cm theme remove Ar name
Delete a theme's variants and take its folder away, renamed beside the
themes folder.
Refused while one of its variants is the default.
.It Cm mail-token
Set the Postmark server token used by the contact form, asked for and not
echoed.
The admin's Mail screen does the same.
.It Cm certificate
Get or renew the TLS certificate, then switch
.Xr httpd 8
to HTTPS.
Root's crontab runs it daily.
.It Cm httpd
Rewrite the site's
.Xr httpd 8
configuration, root's scheduled jobs, the System screen's folders, this
command and its manual, and write out any theme the site uses that is not
installed from the catalogue into
.Pa /opt/blowfishcms-themes .
Updates do this; run it if the System screen says requests are not being
picked up.
.It Cm migrate
Bring the catalogue's tables up to date.
Updates do this.
.It Cm files
Rebuild the web root with the site's own files from
.Pa /opt/blowfishcms-files ,
such as a CV or a search engine's verification file:
.Pa /opt/blowfishcms-files/cv/cv.pdf
is served at
.Pa /cv/cv.pdf .
A file never replaces one of the code's own.
.It Cm nightly
Make the nightly backup and remove the oldest of the nightly backups beyond
the number kept (14 unless an owner changes it on the System screen).
Backups made by hand are never removed.
A night is skipped if the disk is short of space.
Once an owner has checked for add-ons, it also fetches their list again.
Root's crontab runs it between 3 and 4 a.m.
.It Cm requests
Carry out what owners asked for in the admin: updates, rollbacks and backups
on the System screen, and add-on installs, updates and removals on the
Add-ons screen.
It also passes mail that add-ons queued (a new order, a newsletter) from
their outboxes to the contact form's account, which sends it through
Postmark, and videos that add-ons hand to the Videos library (Live's saved
streams) to the admin's account, which adds them; what that does is logged
in
.Pa /var/log/blowfishcms-videos.log .
Changes that add-ons' services hand to their admin side (the Store's
Printful products) are passed to the admin's account the same way, and
logged in
.Pa /var/log/blowfishcms-requests.log .
Root's crontab runs it every minute.
.El
.Sh FILES
.Bl -tag -width Ds -compact
.It Pa /var/www/etc/blowfishcms.conf
The site's settings: domain, aliases, admin name and folders.
.It Pa /opt/blowfishcms
The live release.
.It Pa /opt/blowfishcms-addons
Installed add-ons.
.It Pa /opt/blowfishcms-themes
Installed themes.
.It Pa /opt/blowfishcms-files
The site's own files, served as they are.
.It Pa /var/www/htdocs/blowfishcms
The web root.
.It Pa /var/www/var/db/blowfishcms/catalog.sqlite
The catalogue: pages, uploads, articles, themes and settings.
.It Pa /var/www/media/blowfishcms
Uploaded media.
.It Pa /var/backups/blowfishcms
Backups, and the code of kept releases.
.It Pa /etc/httpd.d/blowfishcms.conf
The site's
.Xr httpd.conf 5
part.
.It Pa /etc/blowfishcms-no-system
If present, the admin's System screen is off and requests are ignored.
.It Pa /etc/blowfishcms-addons-url
If present, the address of a
.Pa .tar.gz
of add-ons to add to the list each night and with
.Cm addon refresh ,
such as a Repositories add-on's
.Pa /x/repos/NAME/archive/latest.tar.gz ,
instead of the one from
.Pa /etc/blowfishcms-updates-from .
Without either, add-ons are only uploaded.
.It Pa /etc/blowfishcms-releases-url
If present, the address to look for the newest release at (in the GitHub
API's form), instead of the one from
.Pa /etc/blowfishcms-updates-from .
.It Pa /etc/blowfishcms-themes-url
If present, the address of a
.Pa .tar.gz
of themes, as for add-ons.
.It Pa /etc/blowfishcms-updates-from
Where updates come from, as
.Cm updates-from
sets it.
Without it (or one of the addresses above) the server looks for no updates.
.It Pa /var/log/blowfishcms-*.log
Logs of the scheduled jobs:
.Pa acme ,
.Pa backup ,
.Pa hourly
and
.Pa requests .
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Check a new release without changing anything, then install it:
.Bd -literal -offset indent
# blowfishctl update --check blowfishcms.tar.gz
# blowfishctl update blowfishcms.tar.gz
.Ed
.Pp
Give an admin user a new password, then let them sign in again after too
many attempts:
.Bd -literal -offset indent
# blowfishctl password alice
# blowfishctl unlock
.Ed
.Pp
Add the Store add-on from its archive, then install it and switch it on:
.Bd -literal -offset indent
# blowfishctl addon add store-1.3.0.tar.gz
# blowfishctl addon install store
# blowfishctl addon enable store
.Ed
.Pp
Make a backup, including the secrets:
.Bd -literal -offset indent
# blowfishctl backup --with-secrets
.Ed
.Sh SEE ALSO
.Xr acme-client 1 ,
.Xr doas 1 ,
.Xr crontab 5 ,
.Xr httpd.conf 5 ,
.Xr httpd 8 ,
.Xr rc.d 8 ,
.Xr rcctl 8
.Pp
The guides in the release's
.Pa docs
folder:
.Pa INSTALL.md ,
.Pa ADMIN-GUIDE.md ,
.Pa OPERATIONS.md
and
.Pa SECURITY.md .
.Sh HISTORY
.Nm
first appeared in BlowfishCMS 0.9.