Uptime Kuma EC2 Application Image: adding HTTPS certificate

0

Hi,

I bought a license for this application: https://aws.amazon.com/marketplace/server/configuration?productId=prod-cymsokvhv4f4w&ref_=psb_cfg_continue

How can I add Let's encrypt HTTPS certificates? It is running Portainer and Uptime Kuma. By default port 443 and Portainer default port are open.

My goal: The Uptime Kuma status page should have HTTPS certificates.

I figured out that I can add https certificates in the settings of Portainer. Does that affect the Uptime Kuma docker instance as well or only Portainer?

These are the docs I could find regarding this Application image: https://decyphertek.readthedocs.io/en/latest/products/aws/uptime-kuma/

Any ideas how I could approach this ideally? I don't want to much hassle when I need to renew the certificates, so it would be best if I could just generate the certificates on the instance itself. The subdomain would be health.xyz.com

EDIT: If this is going to be too complex, my approach would be to set up Uptime Kuma manually on an EC2 instance with nginx as reverse proxy + certbot.

asked 14 days ago56 views
3 Answers
0
Accepted Answer

Can not recommend this AWS Application Image. I will create a regular micro instance and install docker with Uptime Kuma + SSL certs there.

For future reference: https://gist.github.com/qubit999/80d851a2b3e80e1c399bfbe6c131cacb

answered 13 days ago
AWS
EXPERT
reviewed 4 days ago
0

Perhaps reach out to the vendor of the product for support?

AWS
EXPERT
answered 13 days ago
  • Thank you for the response. I just installed Uptime Kuma + SSL certificates manually in under 5 minutes on a free tier EC2 instance. Works fine for me. :-)

0

To add HTTPS certificates for your Uptime Kuma status page running on an EC2 instance, you have a few options:

  1. Using Certbot: Certbot is a popular tool for obtaining and installing Let's Encrypt certificates. You can install Certbot on your EC2 instance and use it to obtain and automatically renew certificates for your domain (health.xyz.com). This method would involve:
  • Installing Certbot on your EC2 instance
  • Using Certbot to obtain a certificate for your domain
  • Configuring your web server (likely Nginx, which is often used with Docker) to use the obtained certificate
  • Setting up automatic renewal of the certificate
  1. Using Portainer: If you've found settings in Portainer to add HTTPS certificates, this would likely only affect Portainer itself and not the Uptime Kuma container. However, you could use Portainer to manage the configuration of your Uptime Kuma container to use the certificates.

  2. Docker-specific solution: Since Uptime Kuma is running in a Docker container, you could use a reverse proxy container like Traefik or Nginx Proxy Manager. These can automatically obtain and renew Let's Encrypt certificates and route traffic to your Uptime Kuma container.

For the easiest ongoing maintenance, the Certbot method or a Docker-based reverse proxy solution would be ideal. They both offer automatic renewal of certificates, which reduces the hassle when certificates need to be renewed.

To implement the Certbot method:

  1. SSH into your EC2 instance
  2. Install Certbot
  3. Use Certbot to obtain a certificate for health.xyz.com
  4. Configure your web server to use the new certificate
  5. Set up a cron job for automatic renewal

Remember to ensure that your EC2 instance's security group allows inbound traffic on port 80 (for the initial certificate request) and port 443 (for HTTPS).

Whichever method you choose, make sure to follow best practices for securing your EC2 instance and properly managing your certificates.
Sources
How to use Certbot to enable HTTPS with Apache or Nginx on EC2 instances running Amazon Linux 2 (AL2) ? | AWS re:Post

profile picture
answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions