How to get Portainer over HTTPS to work?

  • Hey, I have set up OMV6 to work with SSL, I'm using Portainer to run nextcloud, using SSL too.

    I'm now trying to have Portainer running through HTTPS as well, I have obviously added my SSL certificate to OMV6 SSL settings, it works for OMV6 with no issues, when I'm going to the Portainer settings, I just enable SSL and select my certificate, of course opened the matching port on my router, but when trying to reach out I'm getting:


    This site can’t provide a secure connection

    ERR_SSL_PROTOCOL_ERROR


    I tried to search for the nginx config for Portainer, but couldn't really find it.

    Could someone give me some insight on what might be the issue for that since it works on OMV6 itself?


    I assume it might be some nginx configuration perhaps, but can't check it.


    Thanks.

    • Offizieller Beitrag

    Did you remove and reinstall portainer after changing the settings to use the cert? Not having any issues on my dev system with a letsencrypt wildcard cert.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Did you remove and reinstall portainer after changing the settings to use the cert? Not having any issues on my dev system with a letsencrypt wildcard cert.

    Do I need to remove and reinstall portainer after changing the settings? :|

    I already have lots of containers running on Portainer, don't really want to lose all of that.

    • Offizieller Beitrag

    Do I need to remove and reinstall portainer after changing the settings?

    Yes. Otherwise, it won't use the new settings.


    I already have lots of containers running on Portainer, don't really want to lose all of that.

    You won't. portainer is using a volume to store your data. Removing and reinstalling portainer will not remove the volume. That is why there is a separate remove data button and I didn't say click that. Even if you did, it wouldn't remove any of the containers. You might lose your stacks yaml if you are using them though.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Yes. Otherwise, it won't use the new settings.


    You won't. portainer is using a volume to store your data. Removing and reinstalling portainer will not remove the volume. That is why there is a separate remove data button and I didn't say click that. Even if you did, it wouldn't remove any of the containers. You might lose your stacks yaml if you are using them though.

    Find it a bit weird, can't it just stop the services, change the required configs and set it up again? (kinda like everything else does, even adding SSL to OMV itself).
    Anyhow, I do use a stack for some of the containers, just because it was easier setting it all up. What does that mean exactly in this context?

    Can I back it up somehow? Does that mean that my containers would all stay the same, but would just lose the 'connection' to the stack?


    Thanks.

    • Offizieller Beitrag

    Find it a bit weird, can't it just stop the services, change the required configs and set it up again?

    The wording uninstall and install is just deleting the container and recreating it with the new parameters. Not sure what you mean by services but in the docker world, you just recreate the container. The important settings are in the volume and NOT lost. What are you worried about happening?

    (kinda like everything else does, even adding SSL to OMV itself).

    OMV isn't a docker container and that isn't how you do things in docker.

    Anyhow, I do use a stack for some of the containers, just because it was easier setting it all up. What does that mean exactly in this context?

    It is means you will get a new container with your old data. So, you should lose nothing. I wouldn't tell you to do this if you were going to lose things.

    Can I back it up somehow?

    Backup the OS drive.

    Does that mean that my containers would all stay the same, but would just lose the 'connection' to the stack?

    You do know that your containers created with portainer do not live in portainer, right? Getting rid of portainer will not affect your other containers at all. They don't even know portainer or stacks exist and definitely don't "connect" to the stack. stacks are just yaml that are used to spin up one or more containers just like docker-compose files.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The wording uninstall and install is just deleting the container and recreating it with the new parameters. Not sure what you mean by services but in the docker world, you just recreate the container. The important settings are in the volume and NOT lost. What are you worried about happening?

    OMV isn't a docker container and that isn't how you do things in docker.

    It is means you will get a new container with your old data. So, you should lose nothing. I wouldn't tell you to do this if you were going to lose things.

    Backup the OS drive.

    You do know that your containers created with portainer do not live in portainer, right? Getting rid of portainer will not affect your other containers at all. They don't even know portainer or stacks exist and definitely don't "connect" to the stack. stacks are just yaml that are used to spin up one or more containers just like docker-compose files.

    I understand how portainer works, I don't know what OMV did in their implementation and integration, might look obvious to you, but I'm just trying to make sure I'm not losing data.


    Anyhow, removing and installing portainer solved the issue and I didn't lose any data as far as I can see(not even stacks, everything is exactly the same).

    Since it seems like just removing and installing(which as you say is just recreating the container?) works, I'm not really sure why it doesn't happen once you apply the SSL settings on the portainer settings on OMV, but as long as it works I guess.


    Thanks a lot.

    • Offizieller Beitrag

    I don't know what OMV did in their implementation and integration, might look obvious to you, but I'm just trying to make sure I'm not losing data.

    It isn't OMV. It is omv-extras and I wrote it. So, you should feel safe that you wouldn't lose data when I recommend something. It is just a script that does the docker start and stop commands. If you used docker-compose, it would do the exact same thing in the background if you changed the docker-compose file. I'm sure portainer does the same thing when you change a stack. It is just the docker way.

    Since it seems like just removing and installing(which as you say is just recreating the container?) works, I'm not really sure why it doesn't happen once you apply the SSL settings on the portainer settings on OMV

    Because I am lazy and didn't write it that way. It is pretty damn easy to just click uninstall and install instead of me writing (and maintain) all kinds of extra logic for an operation that rarely happens. I recently move the script to saltstack though (in the testing repo). It might actually do what you want. I just haven't tested that scenario.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • It isn't OMV. It is omv-extras and I wrote it. So, you should feel safe that you wouldn't lose data when I recommend something. It is just a script that does the docker start and stop commands. If you used docker-compose, it would do the exact same thing in the background if you changed the docker-compose file. I'm sure portainer does the same thing when you change a stack. It is just the docker way.

    Because I am lazy and didn't write it that way. It is pretty damn easy to just click uninstall and install instead of me writing (and maintain) all kinds of extra logic for an operation that rarely happens. I recently move the script to saltstack though (in the testing repo). It might actually do what you want. I just haven't tested that scenario.

    Mate, we're on the internet, I trust nobody, it's nothing personal :), and still, I shouldn't really know the underlying actions that occur there as a regular end user, I think. At least now I know.


    Clicking uninstall and install is super easy, understanding that these are the required actions...I wouldn't necessarily say so much easy, especially when the OMV SSL settings which are super similar just works after applying the changes. If there was a message or some hint to suggest that then it's a different story(unless I missed it :))


    I tried to get help through multiple sources, and anywhere besides here gave so many advices that aren't really related to the issue, unlike the actual solution you gave me. I'm just lucky to have you here to help me, not sure how many others would know to assist here.

    Again, nothing personal, that's just my feedback as a user, it's not like I'm telling you what to do or anything ^ ^


    Thanks again!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!