Automatic HTTPS and SSL for your app
You do not set up SSL inside your container. A reverse proxy in front of your container handles HTTPS, and your app receives plain HTTP requests, for example on http://localhost:3000. An SSL certificate lets browsers verify your domain and encrypt the connection. (SSL here technically means TLS, the protocol behind HTTPS.)
What you need to do
- Run your app on any port, for example
3000. - Make sure it listens on
0.0.0.0, not only on127.0.0.1. - Add a route in Domain Routing, as described in Publish an app on a free subdomain or Point your own domain at your VPS.
What is handled for you
- SSL certificates are issued and renewed with Let's Encrypt.
- One wildcard certificate (a certificate for all subdomains of a domain) for
*.vps.nasiadka.plcovers every free subdomain. - Each of your own domains gets its own certificate. It covers the domain and its first-level subdomains (
yourdomain.comand*.yourdomain.com;a.b.yourdomain.comis not covered) and is issued automatically once the domain is activated. - The proxy forwards traffic to your container as plain HTTP.
- Requests over HTTP are redirected to HTTPS.