Skip to content

Remove Portainer BE (Business Edition) branding and advertisements in a non-invasive way using Nginx

License

Notifications You must be signed in to change notification settings

JSH32/portainer-remove-be-branding

Repository files navigation

Remove Portainer BE branding

A while ago Portainer added Business Edition branding all over their Community Edition, urging upgrades and greying out options. It was very annoying for an open source product so I decided to fix it. This is based on portainer-ce-clean-layout but uses an actual script to do this for all users and not just those with a Stylus script.

Screenshots

Regular Portainer Fix Applied
1 2

How to use?

The easiest method is to run Portainer by cloning this repo and using the compose file or the proxy image which serves the script locally.

This works by using Nginx's sub_filter which is able to replace sections of certain pages with preprocessing before sending the page to the user, this means that it will be able to be used in a non-invasive way that will continue to work even if portainer updates.

Nginx Manual Config

Here's an example of how this could be used in an Nginx config.

location / {
  proxy_pass http://localhost:9000;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Host $host;
  proxy_set_header X-Forwarded-Port $server_port;

  proxy_set_header Accept-Encoding "";
  sub_filter_once off;
  sub_filter '<base id="base"/>' '<base id="base"/><script src="https://cdn.jsdelivr.net/gh/JSH32/portainer-remove-be-branding@latest/remove_be.js"></script>';
}

Nginx Proxy Manager

If using Nginx Proxy Manager you can create a custom location with the same settings and paste the relevant configuration into the advanced config section

Advanced Config

proxy_set_header Accept-Encoding "";
sub_filter_once off;
sub_filter '<base id="base"/>' '<base id="base"/><script src="https://cdn.jsdelivr.net/gh/JSH32/portainer-remove-be-branding@latest/remove_be.js"></script>';

Config Screenshot

Custom locations config

About

Remove Portainer BE (Business Edition) branding and advertisements in a non-invasive way using Nginx

Resources

License

Stars

Watchers

Forks

Packages