Theming and or differentiating multiple opnsense instances.

Started by katamadone [CH], May 09, 2025, 05:47:40 PM

Previous topic - Next topic
Hello everyone,

I would like to give you some inputs. Maybe it will help others, maybe you could even include it as a feature/extension.
We have several instances of OPNsense. First we normally differentiated them with light and dark themes (especially HA).
But of course this is only partially sufficient later on - if you have more :).
In the past, I copied the themes and then edited
assets/stylesheets/main.scss
build/css/main.css
with vi replace command in both
:%s/#3C3C3B/#67b577/g
Now it's even easier.. although depending on the colours ugly 🙃
#change to themes dir
cd /usr/local/opnsense/www/themes/
#move old copy
mv cp_fw cp_fwold
#recopy original theme
cp -R opnsense cp_fw
cd cp_fw
vi build/css/main.css

#change background login-modal-head to
.login-modal-head {
  background: #67b577;

#and background navbar-default to
.navbar-default {
  background-color: #67b577;

Then you only have to select the new theme under System, Settings, General
It could also be integraded in theme customization. Altough I do know that's a super simple approach. It can help a lot.
Result is then:
You cannot view this attachment.
You cannot view this attachment.

I use the picture widget on the dashboard a lot so I see immediately which customer's firewall it is I am logged in to.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Yes, nice idea, too. I like it a little more permanent. Especially when configurate multiple opnsense at the same time for whatever reason. Thanks for mentioning.