Home Assistant Community Add-on: Portainer

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

Because of


I was searching and found this note:

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.

I was wondering how I could miss that. I’m pretty sure there was no last update noticing users about this. The last one was only complaining bout the removal of sso authentication Release v2.0.0 · hassio-addons/addon-portainer · GitHub.

I was wondering what will happen with my installation. Portainer is not in the add-on store anymore, but it is still installed on my system.

  • Will this put my HA OS system at security risks?
  • Other things to keep in mind?

Somehow I really don’t like things getting killed/removed silently - even I can understand the linked lines, looking at this topic and what people did or tried to do with Portainer… looking at Portainer hasn't made any 3rd Party Auth-Methods "Business Only" · Discussion #135 · hassio-addons/addon-portainer · GitHub makes me think: maybe the actual reason was the removal of the authentication thing.

Too bad, anyway :frowning:

1 Like

I wanted to migrate mi InfluxDB data from inside HA and export it to an external server. The only way of doing is exporting the influx data using influxd backup command inside the docker shell and today I wanted to do it but I discovered I can’t install this add-on so I can’t export my data. The InfluxDB backups are not usable because they contain a copy of the data folter in the influxDB installation. I need an alternative way to shell to the influxDB docker :frowning:

Migration jobs are temporary by nature. So you could try Alex’s fork at #152 and #176 above. To get yourself a working Portainer.

And then do your thing…

And then disable / remove the portainer at the end of the day.

(Obviously, step 0 is to backup everything first, before you try anything.)

3 Likes

A big thank you!

Thanks for your work.

I was wondering if using one of those addons (or in general: any custom/non-official repository addon) renders a HA OS installation to “unsupported” state?

I don’t think so as the “supported” flag is still set to “true” and the addon details look pretty good too (level 8 of 8).
grafik

Hi, it all depends how it is used :slight_smile: running an external container with portainer gives an unsupported state I think. But not running the addons itself

That switch was fairly easy.

  1. Add new portainer addon repository to addon store repositories list
  2. Stop old portainer addon
  3. Install new portainer addon
  4. Set configuration of new portainer addon (only password in my case)
  5. Start new portainer addon
  6. Do some basic configurations like
  • disable anonymous collection of statistics
  • rename endpoint from “primary” to “Home Assistant”
  1. Uninstall old portainer addon
  2. Optional: change URLs etc. if used in lovelace dashboards (a0d7b954_portainerdb21ed7f_portainer), change SAMBA backup settings (exclusion lists), rename Supervisor integration entities (remove “_2” due to having the old addon still available when installing the new one) and other custom stuff

Please note that hassio-addons/portainer at master · alexbelgium/hassio-addons · GitHub did not work: because the creation of an unencrypted (no password protection) backup did not work (only a file with 0 KB of size created). So I had to redo the few minor settings changes (step 6).

Summary:
What an easy “migration”. But to be honest - I don’t really use Portainer (anymore, for months). It was nice to see some container statistics or accessing one container (which can be done on the CLI quite easily too). I only switched because running an old outdated version might introduce security risks sooner or later. Maybe I’m going to remove Portainer once and for all soon. But for now: many many thanks for providing a working, up-to-date alternative @alexbelgium ! :+1:

2 Likes

@alexbelgium

Any idea how i can backup data from a container or volume?
Some data is /mnt/data/docker/volumes/JBA/_data

i want to backup JBA how can i do that?

The normal portainer has a filebrowser when pressing volume,.

regards