Skip to content

Portainer

Alexandre edited this page May 31, 2023 · 1 revision

Portainer can be used to execute custom commands in a docker container. It is an open-source lightweight management UI which allows you to easily manage a Docker host(s) or Docker swarm clusters.

Quick start

Installation

  • Add my repository using this link Add repository on my Home Assistant
  • Install the portainer addon from my repo
  • In the configuration panel of the addon, you can change the password
  • In the main page of the addon, disable "Protection mode", then start the addon
  • Login (default name is admin, default password is homeassistant)
  • Click on Primary in the environement (at the center of the page)
  • Click on Containers in the left menu bar
  • Increase the number of items per page to see all your addons

Accessing a console within the container

  • Click on the symbol >_ next to the name of your selected addon to open the console page
  • Either change the username (default root), or more usually just click connect
  • Type your commands, you have full access to the terminal of this specific container (this does not affect other parts of your HA system)
  • Two text editors are included by default, see Tips & Tricks below

Extracting/adding files

  • Once within the container, you can copy files to an exposed HA folder (such as /share) to be able to extract those (for example for backup purposes)

Tips and tricks

Impact on your system

  • There is no impact of installing, or running portainer
  • Installing manually a custom container will modify your HA status to an unsupported/unhealthy state. You will be blocked from upgrading Home Assistant and upgrading any Add-ons you may have. Stopping this custom container will reset the normal status

Reset database

Just change the password in your addon options and the database will be reset

Timeout of 60s

The addon includes a very long timeout. However, if you use another layer of proxy such as the addon nginx proxy manager, it will default to a timeout of 60s. You'll have to adapt the proxy layer to increase timeout. More details here : https://github.com/portainer/portainer/issues/2953#issuecomment-1235795256

Default file editors

Vim

Vim is included by default. Here is a quick guide : https://eastmanreference.com/a-quick-start-guide-for-beginners-to-the-vim-text-editor

Micro

Micro is a simple alternative for people coming from windows : https://github.com/zyedidia/micro/blob/master/runtime/help/help.md

Further reference