This example gives full control of the Nginx, Telego, and certificate configuration.
Use the managed gateway for a new VPS with no existing website configuration.
When you add Telego to an existing Nginx site or a custom Docker network, use this example.
The example keeps Telego on public port 443. Nginx uses private ports for TLS and website traffic.
| Path | Purpose |
|---|---|
docker-compose.yml |
Defines the Nginx, Telego, and Certbot services |
telego.toml |
Contains the Telego configuration |
nginx/nginx.conf |
Contains the complete Nginx configuration |
renew-certificate.sh |
Renews the certificate and reloads Nginx |
systemd/ |
Runs the renewal script two times each day |
Read the Docker procedure in the complete WEB proxy guide.
Replace all example hostnames and secrets before you start the services.
The example omits backend. WEB streams enter the shared MTProxy core directly on gnet, without an internal socket connection. Nginx terminates real TLS.
The Compose file stores certificates in these host directories:
certbot/confcertbot/libcertbot/www
Back up these directories with telego.toml and nginx/nginx.conf.
Install the included systemd timer after the first certificate is available.
The renewal script reloads Nginx only after Certbot renews a certificate.