OPNsense Forum

English Forums => General Discussion => Topic started by: katamadone [CH] on May 09, 2025, 05:47:40 PM

Title: Theming and or differentiating multiple opnsense instances.
Post by: katamadone [CH] on May 09, 2025, 05:47:40 PM
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:
2025-05-09 17_44_16.png
2025-05-09 17_44_44.png
Title: Re: Theming and or differentiating multiple opnsense instances.
Post by: Patrick M. Hausen on May 09, 2025, 06:11:54 PM
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.
Title: Re: Theming and or differentiating multiple opnsense instances.
Post by: katamadone [CH] on May 09, 2025, 09:21:22 PM
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.