Home Assistant Community Add-on: Portainer

I have got it working…

For Clarity and to all whom may require the info…

I removed Community Portainer addon;
added GitHub - alexbelgium/hassio-addons: My homeassistant addons repo to HA;
Installed Alex’s Modified Portainer Addon;
Hop over to newly installed portainer addon’s configuration page and ensure Port 9000 / 8000 are populated to allow WebUI/Edge ports to reach outside host;

NOTE: Password for this addon is in Configuration tab under SSL options (Default pw: default)

Start addon;

Then follow edge-agent setup guide - https://downloads.portainer.io/edge_agent_guide.pdf
(New interface instructions: Add a new endpoint - Portainer Documentation)

NOTE: If you connect from HomeAssistant on port 8123 ensure that you change this port to 9000 to allow the api to resolve correctly. If accessing from HA;IP:9000 this will automatically populate correctly

Enjoy!

Glad I took notes… Struggling with the new interface now :roll_eyes:

Im sure it works still but to assist anyone else in the same boat this link is more updated then the former… :wink: Add a new endpoint - Portainer Documentation

3 Likes

Guys, I get this when I push to isntall. Any suggestions how to get Portainer from Alex working pls?

The command '/bin/bash -o pipefail -c apk add --no-cache nginx && if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi && if [ "${BUILD_ARCH}" = "armhf" ]; then ARCH="arm"; fi && if [ "${BUILD_ARCH}" = "armv7" ]; then ARCH="arm"; fi && if [ "${BUILD_ARCH}" = "amd64" ]; then ARCH="amd64"; fi && curl -L -s "https://github.com/portainer/portainer/releases/download/${BUILD_UPSTREAM}/portainer-${BUILD_UPSTREAM}-linux-${ARCH}.tar.gz" | tar zxvf - -C /opt/' returned a non-zero code: 1

Hi, pushed a v2.9.3-4 that should solve your issue. Could you please test ? Thanks

hi

Why is the official portainer discontinued?.

Read all about it below…

The developers added this note in the Readme documentation:

This add-on is no longer available.

It has been used quite a lot for unsupported porposes, causing many issues, support questions and other problems.

If you run Home Assistant, please be aware that running additional containers is not a supported use-case and will trigger your system to be flagged as unsupported as well.

If you need to install other software with Home Assistant, your best bet is to run home assistant container, or install Home assistant in a VM so you can run other software outside the vm

ah ok, thnx for info

is there an easy way then now to use a macvlan network? i want to run a specific local addon, but it needs to get an IP address of my router instead of the host network

What is the addon you want to run on a macvlan? Is it one you install through the supervisor (Ie an “official” or community Home Assistant addon), or something you are installing outside Home Assistant through Portainer?

Also, what is your current install method and hardware you are running Home Assistant on?

This portainer addon probably made it fairly simple to add a MACVLAN network, but without it, it’s going to be more difficult to create one unfortunately. I’m assuming you will have to install the full Home Assistant (Hassio) in a VM, and then docker (with or without portainer) outside of the VM to create a docker MACVLAN network. The other option is install docker with or without portainer, and use Home Assistant container, but you will lose the addon store and need to install the equivalent docker addons yourself. I actually run Home Assistant container and I can continue using the docker version of Portainer just fine - see my post here -

One of the reasons I run Home Assistant container is because it gives me more control over the install, lets me install anything else I want on the same machine, and I’m not impacted by the developers decisions to change or pull an addon just like they did here. If you can manage docker almost every addon has an equivalent full version you can install in docker yourself, without the supervisor (ie Node Red Installing Node Red in Docker for Home Assistant | by Jordan Rounds | Medium Zwavejs2mqtt https://zwave-js.github.io/zwavejs2mqtt/#/getting-started/docker , and zigbee2mqtt Getting started | Zigbee2MQTT). More control over the system means more work though.

hi, thnx for feedback
I have created some local addons, based on this tut:

but now i want a PBX - Asterisk add-on, its quite complitated with nat and port settings, therefore i would give this local add-on an ip of my router, makes it more easier

I run an esxi server, with HassOS … i could make an seperate vm offcourse, but prefer to use an add-on… easier to manage and nicer :slight_smile:

For making your own addon, I only see options to specify a bridge network with named/mapped ports or host network in the documentation

It might be possible to specify a macvlan some other way, but it’s definitely getting beyond anything I’ve tried doing myself. Hopefully someone else can chime in with an idea, but it might be better to ask on the discord channel - a lot of the developers are on there.

ok, thnx for feedback
appreciated

I arrived here while deploying Portainer on an external docker host, but I’d still like the ability to use it to manage/monitor the containers on Home Assistant Operating System. Posting here in case someone has the same goal.

From the console of the Home Assistant Operating System:

  • login to open local root shell
  • Paste the following to deploy the edge agent:
docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
1 Like

I should note: running the command above will result in the message “You are running an unsupported installation” so keep that in mind. Apparently, installing an unapproved container will mean that you can no longer call Nabu Casa for your support contract :smiley:

1 Like

Hi, I’m also considering to put portainer-agent on my HA node, but does it make sense? What Portainer can be used for? I assume, HA supervised covers all imaginable needs in 2022.

In my case, I have docker running in a half-dozen different places for different use cases, so Portainer makes it easy to have a unified interface to all those instances.

If you’re just running Home Assistant and the official add-ons on your Home Assistant OS, I don’t see a very compelling use case for Portainer.

1 Like

Once I ran this script, I realized someone created an actual add on for this :slight_smile: . Is there a command that will uninstall this as well? I want to keep my HomeAssistant instance from being unsupported.

I am using it to run PhotoPrism. It’s not available as a HA Addon. But I guess it would be wiser to run it on other (virtual) hardware as to keep HA in a supported state.

1 Like

Sure! Just run these two commands:

docker stop portainer_agent
docker rm portainer_agent

Sure, it is better to use HA node only for HA-related things (and mostly officially supported). But if you know what you are doing and take all responsibility - why not.

Hi Luma,

I also have an existing Portainer setup on another host, and wanted to just run the agent on the Hass OS machine. The agent deployed fine, and seems to connect, but I dont see any valid data on the Portainer Environment:
0 stacks 0 containers 0 volumes 0 images
Do I need to do anything else, like open ports, Docker networks, or somehow authorise the agent to “see” the Hass OS containers?
I can see all the containers fine when running docker... commands on the Hass Terminal.
Thanks