# SSL Configuration
PanelAlpha platform can operate based either on a domain or an IP address. If you are using a domain, you can configure hosts to use the appropriate SSL certificate.
# Free Let's Encrypt certificate
Steps to install a free SSL certificate:
Log in to your server via SSH with root access.
Make sure that your domain is correctly resolving DNS to your server's IP address.
Make sure ports 80 and 443 on your server are not blocked by a firewall.
Temporarily turn off the PanelAlpha application.
docker compose -f /opt/panelalpha/app/docker-compose.yml down
Use certbot docker image to request free Let's Encrypt certificate for your server. Remember to replace YOUR_DOMAIN with correct domain.
docker run -it --rm --name certbot \ -v "/etc/letsencrypt:/etc/letsencrypt" \ -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ -p 80:80 \ certbot/certbot certonly --standalone \ --cert-name panelalpha-app \ -d YOUR_DOMAIN
Follow the instructions in the terminal. You need to enter your email address and accept "Terms of Service".
Use following commands to point the certificate files to PanelAlpha application:
sed -i~ '/^SSL_CERT_FULLCHAIN=/s#=.*#=/etc/letsencrypt/live/panelalpha-app/fullchain.pem#' /opt/panelalpha/app/.env
sed -i~ '/^SSL_CERT_PRIVKEY=/s#=.*#=/etc/letsencrypt/live/panelalpha-app/privkey.pem#' /opt/panelalpha/app/.env
Turn PanelAlpha application on again, using the below command:
docker compose -f /opt/panelalpha/app/docker-compose.yml up -d
# Renew Let's Encrypt certificate
In order to renew your Let's Encrypt certificate, you need to execute the following command:
bash /opt/panelalpha/app/letsencrypt-renew.sh
Wait until you receive a confirmation message in the terminal to ensure the certificate has been renewed successfully.
# Custom certificate
Log in to your server via SSH as root.
Make sure you know the full paths of your certificate files: full chain file and private key file.
Temporarily turn off PanelAlpha application using the below command:
docker compose -f /opt/panelalpha/app/docker-compose.yml down
Use following commands to point the certificate files to PanelAlpha application.
Remember to replace: /path/to/fullchain and /path/to/privatekey with correct paths.sed -i~ '/^SSL_CERT_FULLCHAIN=/s#=.*#=/path/to/fullchain#' /opt/panelalpha/app/.env
sed -i~ '/^SSL_CERT_PRIVKEY=/s#=.*#=/path/to/privatekey#' /opt/panelalpha/app/.env
Turn PanelAlpha application on again, using the below command:
docker compose -f /opt/panelalpha/app/docker-compose.yml up -d
# Domain configuration in PanelAlpha
Update the 'Application URL' and the 'Admin URL' by using the Change Domain option as documented here.