Skip to content

Instantly share code, notes, and snippets.

@anondev-sudo
Last active February 26, 2022 17:59
Show Gist options
  • Save anondev-sudo/914a4fc01f4d67b01ffc0ed09cdd767a to your computer and use it in GitHub Desktop.
Save anondev-sudo/914a4fc01f4d67b01ffc0ed09cdd767a to your computer and use it in GitHub Desktop.
Modmail hosting on Railway [Tutorial]

You can host Modmail bot bot on Railway for free without credit card! On railway you get $5 credit monthly for free (more info about their pricing here). If you use your free credit, your projects will be paused and you need to re-deploy them next month when you get credit. You can also upgrade to Developer plan by adding your credit card details (you will be billed only when your usage is more than $10). You don't have to add your credit card tho. Railway offers MongoDB plugin or you can get MongoDB from Atlas.

Modmail bot wiki: https://github.com/kyb3r/modmail/wiki

  • Create account on railway by clicking here and login with Github.
  • Create a bot from Discord dev portal and invite it to your Discord server- guide
  • Get MongoDB database, you have 2 options - use Railway MongoDB plugin or MongoDB Atlas:

Creating MongoDB on Railway

  • Go here and click deploy
  • You can find your MongoDB Connection URI here, copy it. image

Creating MongoDB on Atlas

  • Here is the official guide how to create MongoDB database on Atlas

After you have your MongoDB connection URI from Railway or Atlas, continue:

Deploying the Log Viewer

  • Click on the deploy button below and choose where repo should be created for it.

Deploy on Railway

  • Fill in the Environment Variables.
  • Click deploy and wait.
  • After it's deployed, you can find URL to the logviewer here: image Copy it, you will need it later. You can also link your own domain if you want.

Deploying the Modmail bot

  • Click on the deploy button below and choose where repo should be created for it.

Deploy on Railway

  • Fill in the Environment Variables. Enter URL to your logviewer app with protocol and without / at the end, like this: image

  • Click deploy and wait.

  • 🎉 Your modmail bot should be online now, try to run ?setup command on your Discord server.

That's all.

If you need help you can join Pinglik Support Server and ask for help in #💛|coding-help-support channel and we will help you 😉

If you would like to support me:
Buy Me a Coffee at ko-fi.com

Guide how to host this bot on Replit: here

@Deveroonie
Copy link

k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment