Guides / Host a website
Host a website with nginx and free HTTPS
Ports 80 and 443 on our shared IPv4 address are used by many servers, so we send each visitor to the right one by domain name. You link the domain once in the client area; after that, a normal web server and certbot work as usual.
1. Link your domain
- Open your server in the client area and go to Domains. Add
example.com, andwww.example.comas a second domain if you use it. - At your DNS provider add an A record for each name pointing to
5.189.155.145, and the TXT record the tab shows (_natboxand_natbox.www). Remove any other A records for those names. - Add an AAAA record pointing to your server's
::1address (shown in the Domains and Connect tabs), so IPv6 visitors reach you directly. - Press Verify. New records can take a few minutes to appear.
2. Install nginx
# Debian or Ubuntu
apt update && apt install -y nginx
# Alpine
apk add nginx && rc-update add nginx && rc-service nginx start
# AlmaLinux
dnf install -y nginx && systemctl enable --now nginx
Put your site in /var/www/html (Debian, Ubuntu) or /usr/share/nginx/html (AlmaLinux), then open http://example.com.
3. Get a free HTTPS certificate
# Debian or Ubuntu
apt install -y certbot python3-certbot-nginx
certbot --nginx -d example.com -d www.example.com
List every name you linked. certbot proves the domain over port 80, which reaches your server, and renews the certificate automatically. Your HTTPS traffic is passed through untouched: we never see it or hold your keys.
Visitor IP addresses
IPv6 visitors always arrive with their real address. Over IPv4, plain HTTP requests carry the visitor's address in the X-Forwarded-For header, and HTTPS connections arrive from our router (10.66.0.1). HTTP/3 (QUIC, UDP 443) only works for IPv6 visitors.
If it does not work
- 404 page from natbox: the name is not linked yet. Add it on the Domains tab (each name separately) and press Verify.
- Works on some devices only: check the AAAA record points to an address your server really has (
ip -6 addr show eth0). - certbot fails: make sure nginx is running and the A record shows only
5.189.155.145(dig +short example.com).
Still stuck? Open a ticket, we reply within 24 hours.