Railway

Deploy Artalk — Self-Hosted Comment System for Blogs

Self-host Artalk — a fast, private Disqus alternative for blogs

Deploy Artalk — Self-Hosted Comment System for Blogs

Just deployed

/data

Deploy and Host Artalk on Railway

Artalk is a lightweight, open-source, self-hosted comment system — a fast, privacy-respecting alternative to Disqus for blogs, documentation sites, and personal websites. Written in Go, it's tiny and quick, with email notifications, social login, captcha, spam moderation, Markdown, emoji packs, and multi-site support built in. This template deploys it in one click with a persistent volume, so your comments, uploads, and configuration are safe across redeploys.


What This Template Deploys

ServicePurpose
ArtalkThe comment server with embedded frontend, admin dashboard, and API on port 23366

A single lightweight service — no separate database needed. A persistent volume at /data holds the SQLite database, uploaded images, and logs, so everything survives restarts and redeploys.


About Hosting

Artalk is refreshingly simple to run, and the one thing that matters most on a container platform is persistence.

The /data volume is everything — and it's the one thing you must not skip. Artalk stores the SQLite database (all your comments), uploaded images, and logs under /data. Without a persistent volume mounted there, a container restart or redeploy wipes every comment and your configuration. This template mounts it, so your data is durable. SQLite is a great fit here — comment systems are read-heavy and low-write — which is why Artalk needs no separate database service and stays cheap and simple.

Two settings make the widget actually appear on your site. ATK_SITE_URL must be set to your site's URL, and ATK_TRUSTED_DOMAINS must list the domains allowed to load comments — if these are wrong, browsers block the widget on cross-origin grounds and comments silently fail to render. Set both to your blog's real domain.

The admin password is a bcrypt hash, not plain text. Artalk expects the admin password as a bcrypt hash (prefixed (bcrypt)), not a plaintext string. Generate a hash and set it, or complete the initial setup in the dashboard on first run. The first user matching the configured admin email becomes the administrator.

Point your blog at it in two lines. Once deployed, add Artalk's small JS snippet to your site with your Railway URL as the server and a pageKey per page. It works with any static site, blog engine, or framework — Hugo, Hexo, Astro, WordPress, or hand-rolled HTML.

Typical cost: ~$5/month on Railway for the single lightweight service — the Go binary and SQLite keep resource use minimal. Artalk is MIT-licensed and free.


How It Compares

Artalk (self-hosted)DisqusCommentoGiscus
Cost modelFlat ~$5/mo infraFree (with ads) / paidSelf-host / paidFree
Data ownershipFull — your volumeVendorFullGitHub
Ads & trackingNoneYes (free tier)NoneNone
Storage backendSQLite (or Postgres)VendorPostgresGitHub issues
Multi-siteYesYesYesPer-repo
Self-hostableYesNoYesN/A

Disqus is easy but shows ads and tracks your readers on the free tier. Giscus is free but ties comments to GitHub accounts, limiting who'll comment. Commento is a close self-hosted peer but needs Postgres. Artalk's edge is being genuinely lightweight — a single tiny Go service on SQLite — with a rich feature set and full data ownership, at the lowest possible hosting cost.


Deploy in Under 5 Minutes

  1. Click Deploy on Railway — Artalk builds automatically (~2 minutes)
  2. Confirm the volume is mounted at /data
  3. Set ATK_SITE_URL and ATK_TRUSTED_DOMAINS to your blog's domain(s)
  4. Set the admin email and a bcrypt-hashed password (or finish setup in the dashboard)
  5. Open your Railway domain, log into the dashboard, then add the Artalk snippet to your site

Add the JS snippet with your Railway URL as the server value, and comments appear on your pages.


Common Use Cases

  • Disqus replacement — self-hosted comments with no ads, no tracking, and full ownership of your readers' data
  • Blog comment system — drop comments onto a Hugo, Hexo, Astro, or WordPress blog with a small snippet
  • Documentation feedback — let readers comment on docs pages, with Markdown and moderation built in
  • Multi-site comments — manage comments for several websites from one Artalk instance with isolated data per site
  • Privacy-first publishing — keep your audience's comments on infrastructure you control, with no third-party trackers
  • Lightweight static-site comments — add dynamic comments to a static site without a heavy backend or database server

Configuration

VariableRequiredDescription
ATK_SITE_URLRequiredYour site's URL — comments and links build from it
ATK_TRUSTED_DOMAINSRequiredSpace-separated domains allowed to load comments (avoids CORS blocking)
ATK_SITE_DEFAULTRecommendedDefault site name, e.g. My Blog
ATK_ADMIN_USERS_0_NAMERequiredAdmin display name
ATK_ADMIN_USERS_0_EMAILRequiredAdmin email — the first user matching it becomes admin
ATK_ADMIN_USERS_0_PASSWORDRequiredAdmin password as a bcrypt hash, prefixed (bcrypt)
ATK_LOCALEOptionalInterface language, e.g. en
TZOptionalTimezone, e.g. Asia/Kolkata

The /data volume is mandatory. It holds the SQLite database, uploaded images, and logs. Without it, all comments and configuration are lost on restart or redeploy — the single most important setting.

Set ATK_SITE_URL and ATK_TRUSTED_DOMAINS correctly. If they don't match your blog's real domain, browsers block the comment widget on cross-origin grounds and comments won't render. The admin password must be a bcrypt hash, not plaintext.


Dependencies for Artalk Hosting

  • Railway account — Hobby plan (~$5/month) runs it comfortably
  • A persistent Railway volume mounted at /data (included)
  • A website or blog to embed the Artalk comment widget
  • Optional: SMTP credentials for email notifications

Deployment Dependencies

Implementation Details

The template runs the official artalk/artalk-go image on its internal port 23366 — a single Go binary with the frontend client embedded, so there's no separate frontend to build or serve. All configuration uses environment variables prefixed with ATK_, which map to the underlying config file and take precedence over it, and array values (like admin users or trusted domains) use indexed or space-separated forms.

A persistent volume at /data holds the SQLite database, uploaded images, and logs. SQLite suits a comment workload — predominantly reads with modest writes — so no external database is required, though Artalk also supports PostgreSQL or MySQL if you later outgrow single-file storage. The admin account is provisioned through ATK_ADMIN_USERS_0_* variables with a bcrypt-hashed password, and the first user matching the admin email is granted administrator rights.

Integration is a small JavaScript snippet on your site that points its server at the Railway domain and sets a pageKey per page; ATK_SITE_URL and ATK_TRUSTED_DOMAINS govern which origins may load the widget, which is essential for the comments to render cross-origin.


Frequently Asked Questions

Why is the /data volume so important? It stores every comment (in SQLite), uploaded images, and logs. Without a persistent volume mounted at /data, a redeploy or restart erases all of it. It's the one setting you can't skip.

Do I need a separate database? No. Artalk uses SQLite in the /data volume by default, which is ideal for a comment system's read-heavy load — so it's a single lightweight service. PostgreSQL and MySQL are supported if you want them later.

Why won't the comment widget show on my site? Almost always because ATK_SITE_URL or ATK_TRUSTED_DOMAINS don't match your site's domain, so the browser blocks it cross-origin. Set both to your real blog domain.

How do I add it to my blog? Include Artalk's JS snippet with your Railway URL as the server and a pageKey per page. It works with Hugo, Hexo, Astro, WordPress, and any static or dynamic site.

How is this better than Disqus? No ads, no third-party tracking, and full ownership of your readers' data — everything stays on your infrastructure. Artalk is also far lighter than most alternatives.

How do I set the admin password? As a bcrypt hash prefixed with (bcrypt) in the admin password variable, or complete the initial setup in the dashboard on first run. Plaintext won't work.

Does it support notifications and moderation? Yes — email notifications, spam moderation, captcha, social login, Markdown, and emoji packs are all built in and configurable from the dashboard.


Why Deploy Artalk 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 Artalk on Railway you get a fast, private, self-hosted comment system in one click — a single lightweight Go service, a persistent volume that keeps every comment safe, and automatic HTTPS. Own your readers' conversations, drop ads and trackers, and add comments to any site, on infrastructure you control.


Template Content

More templates in this category

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

Evan Boehs
29
View Template
NodeBB
Node.js based forum software built for the modern web

Six
64
View Template
WordPress + MySQL
Zero Config | One click | WordPress | Docker | MySQL

YAV.AI
1.4K