Sitemap
Candide U

Candide U

Grad student // FOSS Enthusiast // Multimedia Content Creator. Read more at www.thesis.candide.xyz

Press enter or click to view image in full size

Deploy Commento++ to Railway.app | Open source alternatives to Disqus and Heroku

4 min readSep 1, 2022

--

In light of Heroku announcing the end of their free product plans starting November 28, 2022, many (including me) are scrambling to find an alternative to the platform as a service (PaaS). As many have noted, it’s the end of an era:

Luckily, a variety of Heroku alternatives exist. One in particular, Railway.app, has been on my radar for the past year. I’ve used it to deploy nocodb, cal.com, Umami Analytics, Authorizer, cusdis, and so much more!

However, I still had some important projects on Heroku — namely, Commento++, a fork of the (seemingly abandoned) open-source, comment platform Commento.

Why Commento(++)

As someone who dabbles in static site design and hosting, I’ve spent a lot of time looking for the perfect comment system to move away from Disqus (and their ads). Cusdis is a great lightweight option, but lacks some of the more complex configurations of other options. GraphComments is great, but has limited theme choices. Everything else is either out of my budget, or is too complicated for me to install.

Enter Commento.

Commento is a full-featured, privacy-focused alternative to Disqus that is perfect for static websites. The official version boasts a paid cloud version as well as options to self-host. However, the maintainer has stated that they are “not interested in merging service provider-specific code” when presented with a Heroku deployment option.

As someone who could not figure out Docker for the life of me, a one-click deploy is essential for any app I intend on self-hosting. It’s what’s allowed me to experiment with all the open-source apps I’ve mentioned earlier.

Commento has always been a solid contender/Disqus alternative, but the barriers in self-hosting have prevented me from trying it out. On top of this, a number of people have noted issues with the paid cloud version and concerns about the status of the development.

Enter Commento++, an active fork of Commento

Through some perusing, I discovered Commento++, the maintained fork of Commento with a number of fixes. Best of all: Commento++ has a Heroku deployment button!! 🎉🎉 I deploy the platform and get started on setting up Commento on my websites.

Get Candide U’s stories in your inbox

Join Medium for free to get updates from this writer.

Fast-forward to August 2022: Heroku announces the end of the free dynos. Now what?

Luckily, Railway swooped in just in time to offer guides and features to facilitate the migration from Heroku. Thanks to these resources and the help of the Railway support team, I was able to migrate my Commento++ instance from Heroku to Railway.

Commento++ Starter Template for Railway.app

This is the part you’re probably waiting for! To save anyone the trouble of setting up Commento++ on Railway manually, I’m sharing a template starter to easily deploy your own version of Commento++ on Railway:

The template adds most of the env values you’ll need out of the box. Make sure to register for an SMTP (like Mailersend, Sendpulse, Sendinblue, Mailgun, etc.) and add those credentials if you want features such as email notifications, reset password, and data exports turned on.

Also, for some reason, the COMMENTO_SMTP_HOST variable is hidden in Pre-configured Environment Variables. Make sure to expand that toggle to add that value. You can read more about these environment variables in the Commento Backend documentation.

Press enter or click to view image in full size
Commento++ deployment template on Railway

Migrating comments from one Commento++ instance to another

Luckily, I didn’t have any comments to deal with, but if you have to migrate your comments and don’t know how to get the whole pg_dump/restore stuff working, there’s an easy way to export your domain-specific data from within the application. In your dashboard, select your domain, click on the General tab, and select the Export Data option to initiate a data export. Make sure your SMTP variables have been added in the Heroku backend.

Press enter or click to view image in full size
How to export your Commento domain data and comments

Once that’s downloaded, upload the export somewhere, and paste the link in the Import Comments > Commento section of your new Commento++ instance.

Press enter or click to view image in full size
Restoring and importing your comments to your new Commento instance

Happy coding!

--

--

Candide U
Candide U