Publish on the Internet


  • Configure Let’s Encrypt or another certificate provider
  • Set the right certificate and private key paths
  • Generate .htpasswd or configure another way of authentication

Example /etc/nginx/nginx.conf

events { }

http {
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;

        ssl_certificate /etc/letsencrypt/live/;
        ssl_certificate_key /etc/letsencrypt/live/;

        gzip on;

        auth_basic "My IoT";
        auth_basic_user_file /etc/.htpasswd;

        location / {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Real-IP $remote_addr;