Deploy Comentario

Privacy-friendly comments for blogs and sites. Comentario v3.19 + Postgres

Deploy Comentario

/var/lib/postgresql/data

Deploy and Host Comentario on Railway

Comentario is an open-source comment engine for websites and blogs, and the maintained successor of Commento. You add two lines of HTML to a page and get threaded comments with moderation, voting, Markdown, live updates, social and SSO login and spam checks. It has no ads or tracking, and the comments stay in your database.

About Hosting Comentario

This template runs Comentario v3.19.0 from the official image, pinned by version and digest and built from a public GitHub repo, with Railway's Postgres on the private network. Comentario keeps everything in Postgres, which sits on a volume, so comments and accounts survive redeploys. You enter one value, ADMIN_EMAIL. On first boot the wrapper creates that account as the superuser, with a generated password, before the public port opens, so nobody else can claim the instance. A signing key is generated too. The public URL works on the first deploy, with a health check on /api/config. Email (SMTP) and social login are optional variables you can add later.

Common Use Cases

  • Comments on a static site or blog (Hugo, Jekyll, Astro, Ghost, WordPress) without Disqus's ads and tracking
  • Moderated discussions under documentation pages or product changelogs
  • One self-hosted comment server for several websites, each registered as its own domain

Dependencies for Comentario Hosting

  • PostgreSQL (Railway's Postgres, included)
  • A public HTTPS domain (Railway's domain, included; a custom domain is optional)

Deployment Dependencies

Implementation Details

After the deploy turns green:

  1. Open the Comentario domain and log in with your ADMIN_EMAIL and the ADMIN_PASSWORD from the Comentario service's Variables tab.
  2. Go to Domains → New domain, enter your website's host (for example blog.example.com) and save.
  3. Copy the two-line snippet from the domain's Installation tab into your pages where comments should appear: a script tag that loads https://YOUR-COMENTARIO-DOMAIN/comentario.js, and a comentario-comments element.

To send email (notifications, password resets), add COMENTARIO_SMTP_HOST, COMENTARIO_SMTP_PORT, COMENTARIO_SMTP_USERNAME, COMENTARIO_SMTP_PASSWORD and COMENTARIO_SMTP_EMAIL_FROM to the Comentario service. For social login, add the identity provider keys from Comentario's docs, for example COMENTARIO_IDP_GITHUB_KEY and COMENTARIO_IDP_GITHUB_SECRET. If you add a custom domain, set BASE_URL to it.

Updates: the service builds from the template's GitHub repo. When we publish a new Comentario version there, Railway shows you an update notice and you choose when to apply it. Comentario runs its database migrations on start. Read the repo's CHANGELOG.md, and back up the Postgres volume before a major upgrade.

Why Deploy Comentario on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Comentario on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Pixelfed
Explore + Share beautiful photos and videos on the Fediverse

Evan Boehs
30
View Template
Hexo
Hexo — fast static blog framework with admin editor and S3 media storage

INAPP
2
View Template
Castopod
Self-hosted podcast hosting with Fediverse support

INAPP
1