How to get dockered Portainer running with EE proxy?

Hi folks!

I want to get Portainer running, but I can’t access it from outside

I’ve set up a docker-compose, as stated on their website: https://portainer.io/install.html I simply added this to the service:

- ports
  - 9000:9000

Now I want to ee site create portainer.domain.com --proxy=127.0.0.1:9000, but when I then go to portainer.domain.com it says the domain is not available

If I visit http://my.server.ip:9000, Portainer shows up correctly

What else did I miss to get it running?

According to the Portainer documentation , Nginx require a particular configuration to act as a reverse-proxy for portainer. An example of nginx vhost is available here : https://github.com/portainer/portainer-docs/blob/master/docs/source/faq.rst

I already tried this, but still I can’t get it to run

It doesn’t matter if I use location /portainer/ as stated in the example or / as I like to have it, because I have my own subdomain

Can you check what I miss?

upstream portainer {
    server 127.0.0.1:9000;
}

server {
  listen 80;
  server_name portainer.domain.com www.portainer.domain.com

  location / {
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      proxy_pass http://portainer/;
  }
  location /api/websocket/ {
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_http_version 1.1;
      proxy_pass http://portainer/api/websocket/;
  }
}

Do you use ipv6 on your server ? Because you may have to add a directive to listen on ipv6, and not only on ipv4.

listen [::]:80;

Otherwise, if you want to make sure there is no issue related to the port 9000 and php-fpm process, you can expose another port than 9000. for example :

- ports
  - 9005:9000