Custom SSL Certificate Guide

  • Updated

Introduction

The following is a guide for setting up Hudu with your own SSL certificate. If you are looking to use a free SSL certificate that auto-renews for you, you may want to read this article for alternative options: Getting Started with Hudu Self-Hosted.

Before Starting

In order to self-host Hudu, you will need:
  1. Server with at least 4GB memory and at least 1 CPU (as long as there is no contention), with Ubuntu (18.04 or 20.04) as the OS.
  2. SMTP server for sending outgoing mail.

Instructions

  1. SSH into the server you are wishing to host Hudu on.
  2. Install Docker CE on the server. Setup instructions can be found here.
  3. Install Docker Compose on the server. Setup instructions can be found here.
  4. Create a blank directory named hudu2 on the home directory. On Ubuntu, you can do this by typing:
  5. mkdir ~/hudu2
  6. Move into the directory. On Ubuntu:
  7. cd ~/hudu2
  8. Place a file named docker-compose.yml in the directory. The contents can be found here.
  9. Place a file named .env in the directory. The contents need to be generated with our config generator: here.
⚠️ It is critical that you store a exact copy of the .env file in a secure location. Your encryption and secure keys are located in this file, and you can lose access to passwords and more if this file is lost.
  1. When both files are residing within the directory, run the command: sudo docker compose up -d to start your Hudu instance.
  2. Now, run: sudo docker-compose down to stop your Hudu instance.
  3. Create a file called: /var/www/hudu2/config/nginx/proxy.conf with the contents of this file: https://self-hosting.usehudu.com/custom_ssl/proxy.conf  
  4. Open the file here: /var/www/hudu2/config/nginx/site-confs/default and replace the contents with this file: https://self-hosting.usehudu.com/custom_ssl/default
  5. Obtain your SSL Certificate and perform the processes highlighted in this document: https://self-hosting.usehudu.com/custom_ssl/Hudu%20SSL%20-%20Comodo.pdf 
  6. Navigate back to the hudu2 folder. On Ubuntu: cd ~/hudu2
  7. Start the instance again: sudo docker compose up -d
  8. Your Hudu should now be up and running! Visit your domain to confirm. If you see a Hudu sign-up screen, it's successful. Reach out to support (support@hudu.com) for a license key.
  9. If you don't see this screen, contact support, and please provide logs: sudo docker compose logs

Still have questions?

Contact us