Skip to content

Keep Alive plugin guide

Jerrie edited this page Sep 23, 2022 · 8 revisions

Intro

Represents Keep Alive plugin, it keeps your bot up 24/7 (lies, there is still downtime) when hosting on Replit. This plugin is just for those who host their Modmail bot on Replit.

No additional dependencies required to install this plugin.

1. Hosting on Replit

It is assumed that you already have a Replit account and know how to set and configure the Modmail bot on Replit. If you are, you can proceed to step 2. UptimeRobot and 4. Install Keep Alive plugin.

However just in case if you don't know how to set it up, read this Hosting on Replit wiki to fork my Repl and set it up.

BUT do not run it just yet. You still need to set up an UptimeRobot account if you want this plugin to automatically set up the monitor.

Otherwise, if you want to use other service or you want to manually set up the monitor, you can skip to step 3. Run the bot.

2. UptimeRobot

This plugin will use UptimeRobot service to make HTTP ping requests to the web server created by this plugin. If you still do not have an UptimeRobot account, sign up a new one here.

Then follow these steps:

  • Create API key from the UptimeRobot settings page. Click here to go to the settings page.
  • Scroll down until you find the API Settings section, then click the Create the main API key (see picture). create_api_key
  • Copy the API key and save it somewhere (e.g. Notepad or Text Editor).
  • Go to your Modmail project page on Replit and add UPTIMEROBOT_API_KEY in the project secrets (environment config variables), and paste the API key you created earlier. Click Save (or Add new secret).

3. Run the bot

Run the bot (hit the Run button/symbol).

4. Install Keep Alive plugin

After your bot is up and running, install the Keep Alive plugin with the following command:

?plugin add Jerrie-Aries/modmail-plugins/keepalive

This plugin will automatically create a monitor on UptimeRobot website using the API key you provided earlier. You can check the monitor list on the UptimeRobot's Dashboard page.

Note

Do not edit the monitor created by this plugin as it always checks the monitor settings on startup.

If you want to manually customise the monitor or want to use other service to ping the web server, just remove the UPTIMEROBOT_API_KEY environment config variable from your Secrets on Replit, and the bot will no longer check the monitor.

Reporting bugs and errors

If you encounter any bugs or errors, just open a new issue here and report it.

Source