Portainer app needs a clean install

My YunoHost server

Hardware: VPS
**YunoHost version: 3.6.5.3
I have access to my server : Through SSH & direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

My goal is to use Portainer to install some applications that are not directly supported by Yunohost.

I did an initial install of the Portainer app and the installed my docker. After some configuration I got it working except for the network access. When I tried to map a port I got an error " Cannot set property /tcp of undefined while editing container port mapping". It seems this is a known bug which was fixed on 1.22.0, but the Portainer app actually runs on 1.20.1.

I noticed that Portainer itself runs as a docker and specifically targets 1.20.1. I tried to fix the port mapping issue by updating the Portainer image to a newer version to incorporate the fix.

After I updated the docker image, I could not access Portainer anymore and was getting a Bad Gateway error.

I tried to reset Portainer by uninstalling the Application in Yunohost and then re-install it.

The uninstall and re-install were successful, but it seems the configuration has become corrupted somehow.

When opening Portainer again, I did not get the option to configure which environment to connect Portainer to. On the Portainer Home page I only see:

You do not have access to any environment. Please contact your administrator.

So first, I want to get Portainer working again. Next - I want to understand how I can expose a docker app to a specific URL and/or port - which is the same as this question

Any help would be greatly appreciated!

This may be overkill, but I was able to get the original screen back by running the following commands:

sudo apt-get remove docker docker-engine docker-ce docker.io
sudo apt autoremove
sudo rm -rf /var/lib/docker
sudo rm -r /etc/docker

Now I just need to find out how to update the Portainer version.

I was able to fork the existing repository and just change the version of Portainer it runs. This worked much better than trying to manually change the version of Portainer from within Portainer itself.

I made this fork: https://github.com/Doc-Saintly/portainer_ynh which can be installed manually as an application. I also submitted a pull request to see if the maintainer will include it.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.