Reverse proxy for SSL and push notifications

Hi there,

I’m trying to get push notifications to my iOS device activated and I’m kind of stuck. My setup:

  • Official home-assistant Docker image (v0.100.3)
  • nginx reverse proxy with port forwarding on port 443 with letsencrypt certificates
  • traffic gets redirected from nginx to the home-assistant instance on port 8123 with proxy_pass (unencrypted HTTP traffic)

The advantage of the reverse proxy method is (from my perspective), that I don’t have to modify the Docker container (which is a no-go). Also on this way I can have only one port forwarding to nginx, but several services (besides home assistant) exposed.

Here my nginx site configuration:

upstream ha {
    server homeassistant-container.local:8123;
}

server {

    listen 443;
    server_name my.example.com;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/my.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/my.example.com/privkey.pem;
    ssl_session_cache builtin:1000 shared:SSL:10m;

    location / {

        proxy_pass http://ha;
        proxy_set_header Host $host;

        # re-write redirects to http as to https, example: /home
        proxy_redirect http:// https://;

        # WebSocket support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

I activated the ios: integration manually and the .ios.conf file looks good (as far as I can say) and the pushId also shows up within the app.

Is there a way to get push notifications working with my setup? Did I miss a step or did I do something wrong?

Thanks in advance!
Philipp

Nevermind, now it’s working. I noticed that the “iOS component loaded” message changed within the app and now has a tick, so maybe this was the issue.