Custom Domain and SSL Certificate for Self-Hosted Version

Setting up Custom Domain for Self-Hosted version

You can access your self-hosted version of DronaHQ from your own custom domain. This makes your self-hosted version accessible from anywhere just by searching the domain associated with it. Setting up a custom domain for the self-hosted version is very easy. Make sure that the On-Prem version of DronaHQ is already activated in your system. You can refer to this article for for Activating Self-Hosted DronaHq.

Follow these steps, once the self-hosted version is activated and running in your system.

  1. Open up the terminal and go to the Self-Hosted folder.

    cd dronahq/self-hosted

  2. There will be an nginx.conf file in which we have to make changes.

    nano nginx.conf

  3. The nano text editor will open and replace server_name dronahq with your_custom_domain. Then save the changes.

    NOTE: Do not include HTTP or HTTPS.

  4. Next, we have to restart the webserver.

    sudo docker-composer restart webserver

    NOTE: Make sure that the custom domain you are adding has been mapped to your machine IP address from the domain service provider itself, in order to get requests on the self-hosted version’s domain.

  5. Now we have to edit the dronahq.ev file where we have to edit the domain name from localhost:8080 to your_custom_domain.

  6. Finally, you just have to restart the web app.

    sudo docker-compose restart webapp

After completing these steps, your self-hosted version of DronaHQ has been set up to be accessed by the provided custom domain.

Adding SSL to the Domain of Self-Hosted Version

Adding SSL to your domain makes it more secure to transfer files as well as prevents online attacks and for your domain of the Self-Hosted version of DronaHQ, you can add an SSL certificate very easily by following a few steps.
Docker makes it very easy to generate certificates and while activating the On-Prem version, all the necessary Docker files are already been downloaded into your system.

  1. Open up the terminal and go to the dronahq/self_hosted directory and run the following code.

    sudo docker-compose -f certbot.yml run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ --force-renewal --email <your_email_id> -d <your_custom_domain> --agree-tos --non-interactive

    After running the above code, it will generate an SSL certificate in your system.

  2. Next you have to copy the content of the downloaded certificate that is nginx-ssl-default.conf to nginx.conf.

    cp init/nginx-ssl-default.conf nginx.conf

  3. Now make changes in nginx.conf file.

    nano nginx.conf

    We have to provide the custom domain and uncomment two lines and then save it.

    After edit

  4. Next, we have to restart the webserver.

    sudo docker-composer restart webserver

  5. Now we have to edit the dronahq.ev file where we have to edit http to https. It will already have your custom domain.

  6. Finallweb app just have to restart the web app.

    sudo docker-compose restart webapp

After completing these steps, your domain of the self-hosted version of DronaHQ will have an SSL certificate installed.

In the above image, you can see that we have provided a custom domain for the self-hosted version of DronaHQ along with an SSL certificate installed for the domain.