Portainer CE 2.1 Add-On for Home Assistant

I’ve been using the Portainer add-on from the Home Assistant add-on repository for quite a while now, and using it to manage several docker hosts. I recently went to add a few Kubernetes clusters as endpoints for Portainer only to realise that the add-on was Portainer 1.x instead of 2.x (which doesn’t support Kubernetes). It doesn’t appear that there’s going to be an update to 2.x on the existing Home Assistant add-on, so I’ve created a new one based on the Portainer-CE 2.1 code.

Installation requires an additional repository to be added to Home Assistant. The repository URL is: https://github.com/MikeJMcGuire/HASSAddons. From there, the installation is pretty much the same as the original add-on. You turn off protected mode (as it needs to manipulate the docker host on which it runs), and turn on the sidebar option.

The only real difference I’ve seen so far is that the 2.x version of Portainer doesn’t have a “no authentication” option. The original 1.x add-on used this as the interface to Portainer was protected by the Home Assistant ingress option. Therefore, the 2.x version requires you to login. The default credentials are admin/portainer and you can change that password as soon as you log in the first time. I’ve kept the add-on fairly basic, but if there’s any changes/features needed they’re quite straight forward to add.

If you’re looking for changes to the add-on, call it out here in a comment, or on the repository for the add-on code.

Backlog:

  1. Expose Portainer ports (8000/9000 TCP) outside of the container for those that wish to have an alternative to HA ingress – done.

~ Mike

4 thoughts on “Portainer CE 2.1 Add-On for Home Assistant

  1. Hello Mike, I’m just looking at your post. The use case I’m looking for is the following. Not sure if your work will help. I have multiple docker instances running in my house, mostly on different RPIs which are doing different tasks. On each of these I’ve installed Docker/Docker Compose/Portainer. Ideally I would like to view all of them in Home Assistant. Do you think this is possible ? If so, please advice
    Thank you so much,
    Jens

    1. Hi Jens – you’re best best would be to use a single instance of Portainer (in HA) to manage other docker environments/endpoints. You should be able to find instructions on Portainer’s website about how to add other docker hosts (you basically need to configure your RPis to expose their docker port – or deploy a portainer agent to each of those hosts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s