---
title: "Deploy Waline"
description: "Self-hosted Waline blog comments on Postgres, admin created at deploy"
category: "Blogs"
url: https://railway.com/deploy/waline
---

# Deploy Waline

Self-hosted Waline blog comments on Postgres, admin created at deploy

**[Deploy Waline on Railway](https://railway.com/template/waline)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/waline/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Blogs
- **Total deploys:** 2

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18.6@sha256:4fc833b43d2aaf6ecc9b18615f5533602b723a32d0e2efe2dae8ca0f7217c863

### Waline https://devicons.railway.app/Waline

- **Image:** lizheming/waline:1.43.6@sha256:86eefebad3e8d24922277878236bb63e81979a31eab6c87ab915da05ad32a237
- **Start command:** `/bin/sh -c 'case "$TZ" in ""|Asia/Shanghai) export TZ=UTC;; esac; export PG_PREFIX="${PG_PREFIX:-wl_}"; if [ -n "$SECURE_DOMAINS" ] && [ -n "$RAILWAY_PUBLIC_DOMAIN" ]; then export SECURE_DOMAINS="$SECURE_DOMAINS,$RAILWAY_PUBLIC_DOMAIN"; fi; echo H4sIAAAAAAACA91YW3PaRhR+51ecejyD1DDElzjNmJKOguWYKcYUiTqZjAcv0gFUCwnvrkyIw3/v2ZUQGKjsafvSPngGnfvl27Nn/fo1dFkQztgcJE6mIZMIQRRIGMYcrlkYRHgKHkdFl2OETizkiKMA4Y1xwoBFvqYPAy4kMH8SRNWSF0f08QiNMMBIwgLqwPE+CTga5emobNZyiQ4TYhZz/4KJ8YbceEq8lSwSc8pjD4WoYvSwJHeIjNXOx36na583P8H371Cehf3yki9CxCnJGBNhQv09RDiDDo8ngUDD4JokULrBBONEGrwCJJf7dBoX9qVF2relRte2XBsc+7ee3W7Y0DyH9pUL9qem4zqw/9hZePFkQtn2Bd7XluKu9aFVIAtGCSDwqeASqJzeHRj09R4OTK3Q7rVacGafW70Wfdif3N+tFhjlDWdls0JWEoG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y3eAlDhVzn9IS0hJa3KUg0xGskx/AzvigK4trrtZvvjKUTxRiRzQrx6zm134/XuakexVI+n2voDMI2auj0iu8jRpyEUhjBAeoZg6vBJHqtAJYzVIzA9XOvvQjoUirMkGSrZDJGpnr56t0DRti5tDQhLO11XSKY7ENHrnKmtYdV5x3bzaVTfP0yv2foGBCqr2VvfmqcZeHSb6vtHtxX4ojLJtoCbLAndymRaJQw1VPHMrdCabRqPLjTb7tX6BrO+emQ2K3nEabgm0OLSsx06+JTA/hH9HVc2YWyqwJ4YUVHerNV4c7Y8BU52kelJQ/NFmVikR+PJtNDzrVZamKsppwehGnS5F6LEPAfrkEzRzFZ702pS0UDN/xHwNZDGIRHUoPwTFrMXvMsQAAA= | base64 -d | gunzip > /app/railway-init.js && node /app/railway-init.js && exec node /app/vanilla.js "${PORT:-8360}"'`
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host Waline on Railway

Waline is an open-source comment system for static sites and blogs. You add a small JavaScript client to your pages, and a Node.js server stores comments, pageview counts and reactions. It supports Markdown, emoji, nested replies, comment moderation, e-mail notifications and an admin dashboard for managing comments and users.

## About Hosting Waline

Hosting Waline means running its Node.js server next to a database and giving the server a public HTTPS address that your blog's pages can call. This template runs the official `lizheming/waline` image (1.43.6, pinned by digest) with Railway Postgres on a volume. On first start it creates the database tables and an administrator account from your e-mail and a generated password, so nobody else can claim the admin role by registering first. JWT signing uses a generated secret. After deploying, point the Waline client on your site at the Railway domain, and optionally set your blog's domain so other sites can't use your server.

## Common Use Cases

* Comments on Hugo, Hexo, Jekyll, Astro, VuePress or other static sites
* Pageview counters and emoji reactions on blog posts and docs
* A self-hosted, ad-free replacement for Disqus with your own moderation

## Dependencies for Waline Hosting

* Waline server (`lizheming/waline`, Node.js)
* PostgreSQL database (Railway Postgres)

### Deployment Dependencies

* Waline server docs: https://waline.js.org/en/guide/deploy/vps.html
* Server environment variables: https://waline.js.org/en/reference/server/env.html
* Waline releases: https://github.com/walinejs/waline/releases
* Start command and first-start script used by this template: https://github.com/aalfath/waline-railway-template

### Implementation Details

**First login.** Open `https:///ui` and sign in with `WALINE_ADMIN_EMAIL` and the generated `WALINE_ADMIN_PASSWORD`, which you'll find in the Waline service's Variables tab. Change the password in the dashboard afterwards. Visitors who register later get normal (guest) accounts.

**Add Waline to your site:**

```html

<div id="waline"></div>

```

**Lock it to your blog.** Set `SECURE_DOMAINS` to your blog's domain (comma-separated, e.g. `blog.example.com`) so that only your site can read and post comments. The template adds the Waline domain itself so the dashboard keeps working. **Notifications.** To get e-mail (or Telegram, Discord, …) notifications, add Waline's standard variables to the Waline service: `SMTP_*` and `AUTHOR_EMAIL`, plus `SITE_NAME` and `SITE_URL` (your blog's name and URL, used for the links in notifications). Other options such as `COMMENT_AUDIT` work the same way.

**Good to know.** The Waline server asks `https://oauth.lithub.cc` for the list of social login providers on every request, as upstream does, so it needs outbound internet access. The time zone defaults to UTC; set `TZ` to change it.

## Why Deploy Waline 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 Waline 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.





## Similar templates

- [Pixelfed](https://railway.com/deploy/OZSdEw) — Explore + Share beautiful photos and videos on the Fediverse
- [Hexo](https://railway.com/deploy/hexo) — Hexo — fast static blog framework with admin editor and S3 media storage
- [Castopod](https://railway.com/deploy/castopod-clone) — Self-hosted podcast hosting with Fediverse support

Open this page in a browser: https://railway.com/deploy/waline
