Running emoncms with https

I have emoncms running nicely and I want to embed a dashboard into a wordpress blog.
I have tried to use an iframe and can embed pages from most websites, but not the dashboard.

I suspect that this is because the vanilla emoncms runs http, rather than https, which brings me to how do I run emoncms through https, which would be the better practise anyway.

I know little about configuring apache, but it must be a common procedure.

Strangely, I realised that on moving my setup, I had not redone this so did it the other day.

This is presumably an external facing emoncms system (i.e. you can reach it from the internet and not just your own LAN)?

Yes, it is a digital ocean droplet. I specially chose it so that I can make my dashboards public.

There is a bit in their (Digital Ocean) help about setting it up (I used it for my local setup). How To Secure Apache with Let's Encrypt on Ubuntu 22.04 | DigitalOcean

This does assume you have the certificates installed. How you create them depends on who hosts the domain name to be used. For me, I have a Domain specifically for internal SSL bought from Google domains, DNS hosted with Cloudflare so I can do the certificates by DNS Challenge using certbot.

Thank you. That gives me the right direction to work from.

Would be useful to know what you did. I went round in circles a few times (creating the certs was easy).

I think I needed to;

Create a new Virtual host for SSL with a name matching the domain name of the certificate and enable it


Enable SSL module as I had not done that in the standard install

a2enmod ssl

Tell certbot about using the certs with Apache

certbot --apache

And restart Apache.

I used Duckdns for this, very easy to set up and your url is then duckdns/


On a Digital Ocean Droplet?

Sorry for the long delay on this thread. I had to put the project on the back burner for a while and I just picked it up this morning, bracing myself for some tricky work.
I followed borpin’s link to the digital ocean documentation, which uses certbot to automatically install a certificate and was done in a couple of minutes. Piece of cake. Thank-you very much for the link.

1 Like