---
title: "Deploy Cusdis on Railway"
description: "In this post, we go over the process of deploying a Cusdis (a privacy-first, open-source comment system) instance connected to a PostgreSQL database on Railway!"
date: 2021-08-06T00:00:00.000Z
updated: 2026-10-29T11:13:10.176Z
topics: ["Guides"]
tags: []
url: https://railway.com/guides/cusdis
---

# Deploy Cusdis on Railway

[Cusdis](https://cusdis.com/) is a privacy-first, open-source, and lightweight (~5kb gzipped) comment system. You can think of it as a self-hosted alternative to [Disqus](https://disqus.com/) that does not track you or your users. It also comes with a dashboard for moderating comments, email notifications, and webhook support for staying up-to-date with new comments on your blog or website.

At Railway, we provide a free one-click deploy for Cusdis using a PostgreSQL database which we automagically provision for you.

## Deploying on Railway

[https://railway.com/new/template?template=https%3A%2F%2Fgithub.com%2Fdjyde%2Fcusdis&plugins=postgresql&envs=NEXTAUTH_URL%2CDB_TYPE%2CDB_URL%2CUSERNAME%2CPASSWORD%2CHOST%2CJWT_SECRET%2CPORT&NEXTAUTH_URLDesc=Don't+modify+it&DB_TYPEDesc=Don't+modify+it&DB_URLDesc=Don't+modify+it&USERNAMEDesc=Username+to+sign+in&PASSWORDDesc=Password+to+sign+in&HOSTDesc=Don't+modify+it&JWT_SECRETDesc=A+secret+key+to+encrypt+JWT+token&PORTDesc=Don't+modify+it&NEXTAUTH_URLDefault=%24{{+RAILWAY_STATIC_URL+}}&DB_TYPEDefault=pgsql&DB_URLDefault=%24{{+DATABASE_URL+}}&HOSTDefault=https%3A%2F%2F%24{{+RAILWAY_STATIC_URL+}}&PORTDefault=3000&referralCode=randyloop](https://railway.com/new/template?template=https%3A%2F%2Fgithub.com%2Fdjyde%2Fcusdis&plugins=postgresql&envs=NEXTAUTH_URL%2CDB_TYPE%2CDB_URL%2CUSERNAME%2CPASSWORD%2CHOST%2CJWT_SECRET%2CPORT&NEXTAUTH_URLDesc=Don%27t+modify+it&DB_TYPEDesc=Don%27t+modify+it&DB_URLDesc=Don%27t+modify+it&USERNAMEDesc=Username+to+sign+in&PASSWORDDesc=Password+to+sign+in&HOSTDesc=Don%27t+modify+it&JWT_SECRETDesc=A+secret+key+to+encrypt+JWT+token&PORTDesc=Don%27t+modify+it&NEXTAUTH_URLDefault=%24%7B%7B+RAILWAY_STATIC_URL+%7D%7D&DB_TYPEDefault=pgsql&DB_URLDefault=%24%7B%7B+DATABASE_URL+%7D%7D&HOSTDefault=https%3A%2F%2F%24%7B%7B+RAILWAY_STATIC_URL+%7D%7D&PORTDefault=3000&referralCode=randyloop)

To deploy your Cusdis instance on Railway, simply click the button above ([source code](https://github.com/djyde/cusdis)), enter the prompted environment variables and hit deploy. The required PostgreSQL database will be automagically provisioned and the required database migrations will be run for you.

Default environment variables (do not change these):

- **NEXTAUTH_URL**: This has already been set for you as `${{ RAILWAY_STATIC_URL }}` using our template variables. What this been is that it'll be set to the URL for your deployment.
- **DB_TYPE**: Already set to `pgsql`.
- **DB_URL**: Already set using template variables to `${{ DATABASE_URL }}`.
- **PORT**: This value is already set for you to `3000` as `3000` is the default port for Cusdis.

Additional required environment variables:

- **USERNAME**: The username you'd like to use to log in to the Cusdis dashboard.
- **PASSWORD**: The password you'd like to use to log in to the Cusdis dashboard.
- **JWT_SECRET**: To sign JWTs.

<aside>
💡 Pro-tip: You can hit **CMD+K** on the dashboard and use our secret generator.

</aside>

## Your Cusdis instance

Once you've added all the variables and hit the deploy button, a PostgreSQL database will be automagically provisioned for you and you should be able to use your Cusdis instance!

![Cusdis dashboard](https://cms.railway.com/media/3cf742594f6c8db4c6098b9084773f9e6f1438fd81bdc50140b010683a06b516.png)

Once your Cusdis instance is live, you can create projects for your websites and add commenting functionality to them!

## Closing

And with that, you should have all the information you need to deploy your own Cusdis instance on Railway! You should be able to create new projects and add the comments widget to your websites.

If you have any suggestions for more open-source self-hosted solutions you'd like to see guides for, let us know on [Discord](https://discord.com/invite/xAm2w6g). Or even better, submit a pull request to our [starters repository](https://github.com/railwayapp/starters) on Github!