Skip to content
Reviactyl v26 has been released!
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating SSL Certificates

This tutorial covers creating SSL certificates for your panel and Wings.

Install Certbot and the plugin for your web server. These commands are for Ubuntu.

sudo apt update
sudo apt install -y certbot
# Run this if you use Nginx
sudo apt install -y python3-certbot-nginx
# Run this if you use Apache
sudo apt install -y python3-certbot-apache

Create a certificate

Replace example.com with your domain. Add another -d flag for each additional domain.

Use the web-server plugin where possible. For Wings-only machines, use the standalone or DNS method.

If your web server already uses SSL, Certbot applies the certificate without a restart. Follow the web server configuration first.

HTTP challenge

The HTTP challenge requires port 80 to be accessible.

# Nginx
certbot certonly --nginx -d example.com
# Apache
certbot certonly --apache -d example.com
# Standalone — stop your web server first
certbot certonly --standalone -d example.com

DNS challenge

The DNS challenge verifies ownership with a TXT record. It does not require port 80.

Auto-renewal

Open root's crontab with sudo crontab -e. This job checks for renewal every day at 23:00.

Change nginx to apache or wings when required.

Troubleshooting

An Insecure Connection or SSL/TLS error can indicate an expired certificate. If renewal fails because port 80 is in use, use the Nginx or Apache plugin. Alternatively, stop the relevant service, renew the certificate, then start it again.

1

Stop Nginx

Replace nginx with your web server or wings where appropriate.

2

Renew the certificate

3

Restart Nginx

4

Restart Wings

Some services require a restart before they use the renewed certificate.

Use this method when the server cannot access port 80. These commands use Ubuntu and Cloudflare DNS.

Create the certificate directory

The panel configuration expects Certbot-compatible paths.

Configure Cloudflare credentials

Create a Cloudflare API token that can edit DNS records in the target zone. Export the token before issuing the certificate:

For a legacy Global API Key, use:

Issue the certificate

Replace example.com with your domain.

Auto-renewal

acme.sh creates a renewal job after its first run. Review or adjust its schedule with:

Use this method when Cloudflare proxy mode is enabled or port 80 is unavailable.

Install Caddy with the Cloudflare DNS plugin

Caddy does not include the Cloudflare DNS plugin by default. Choose one installation method:

  1. Build Caddy with xcaddy.

  2. Download a custom build from Caddy's download page.

Create a Cloudflare API token

Use Cloudflare's Edit zone DNS template. Restrict Zone Resources to the target DNS zone. Ensure an A or CNAME record points to the target server.

Store the token securely

Create /etc/caddy/.secrets.env:

Restrict the file to the caddy user:

Load the environment file

Update the Caddy systemd service, usually at /etc/systemd/system/caddy.service. Add --envfile /etc/caddy/.secrets.env to ExecStart.

Configure Caddy

Add a tls block under your domain in /etc/caddy/Caddyfile:

Last updated

Was this helpful?