Update on 2023/06/01#
Recently, there have been rollbacks in Replit's Repl, causing the loss of recent changes. As mentioned by the manager of the uptimekumaonreplit repository, "Replit is a bit laggy, it seems to roll back, which causes many inconsistencies in the database. Feel free to use it 20220430." I have not found a solution to the rollback issue yet.
1. Introduction#
I plan to monitor the availability of my blog's friend links (which may be considered impolite). Since the free version of UptimeRobot has a limit of 50 monitors, I decided to use Uptime Kuma instead. The official readme provides instructions for installing it with Docker or Non-Docker.
I learned from uptime-kuma/issues/1472 and the Butterfly modification group on QQ that Replit can be used to host Uptime Kuma. However, I encountered difficulties in setting it up following the steps provided in issues #1472. So I continued to search for solutions.
I found the repository valetzx/uptimekumaonreplit on Replit, which was set up successfully according to the video Uptime Kuma...replit....
I also learned from the video Replit...binding...domain that Replit can be used to bind a custom domain to the service.
You can see the result of the setup at Mycpen's Friend Link Check.
2. Setup Steps#
Main Steps: Import the valetzx/uptimekumaonreplit project into Replit.
Setup steps:
-
Register on Replit.
-
Import the valetzx/uptimekumaonreplit repository into Replit.
-
Follow the instructions in the valetzx/uptimekumaonreplit readme:
-
For Replit Personal, click Run on Replit to import it into Replit.
-
Once the "Loading Nix environment..." is complete, click the green ▶ Run button.
-
-
-
Bind a custom domain to the Replit service.
Follow the instructions in the video Replit...binding...domain: In the Replit Webview window, click the button on the right side (as shown in the image below) to bind a custom domain and follow the instructions to configure DNS resolution in the domain service provider's DNS control panel.
With that, the setup is complete. You can use the custom domain to access the Uptime Kuma dashboard for registration, settings, adding status pages, adding monitors, and binding monitors to status page groups.
3. Points to Note#
-
When the monitor type is set to
HTTP(s)
, selectHEAD
as theHTTP Options - Method
for verifying availability (do not use the default GET method, as it will generate a "significant amount of meaningless traffic" to the corresponding service). -
It is recommended to "lengthen" the heartbeat interval (check frequency) (do not use the default 60s, as it will generate a "significant amount of meaningless traffic" to the corresponding service). For example, I set it to
86400 seconds
(monitor once a day).
In my case, there were 4 changes in the monitor settings, as shown in the image below:
If a website blocks Uptime Kuma's User-Agent, such as in this article How to Block Uptime Kuma from Monitoring Your Website, you can configure the "Request Headers" to solve the issue. Refer to the comment by 张洪 Heo for an example:
{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
}
4. References#
louislam/uptime-kuma/issues/1472
Bilibili Video: Uptime Kuma...replit...
Bilibili Video: Replit...binding...domain
valetzx: Building Monitoring Website in Replit (not referenced) (An article by the author of the uptimekumaonreplit repository, which introduces some monitoring alert notifications. I have not configured them personally)