Keep your Repls alive!
One of the most highly requested features of Replit is to make your Repls never fall asleep.
This can be the case of a
- Discord bot that shouldn't fall offline
- Website that should be always on-demand
- A program that should run it's functions overnight or forever
Or anything else.
Method 1: Cycles
Using your Cycles, you can buy Always-On Repls. They currently cost 2 cycles a day however this may change.
Method 2: Upgrade your plan
Hacker plan and other education plans most likely have 5 (or more) Always-On Repls included. Hacker plan is currently around $7/month and provides 5 Always-On Repls.
Method 3: Free?
Using uptimers and a webserver you can have your Repls have a mini version of Always-On, but only if you do it correctly and your program never crashes.
A common method is to use Uptime Robot, but they have since sadly banned Repls.
Currently, what you'll need to do is make a web server.
For node.js Repls
- The replit-alive-server package
- Express
- http (built-in)
For Python Repls
- Flask
- http.server (built-in)
Then, you should see a new website window above your console. That means you've done it correctly!
Now, you need an uptimer. Uptimers continually ping your Repl's webserver to keep them alive.
Up.repl.link
up.repl.link is one of the most popular uptimers, hosting 1000+ Repls.
You can either run curl "https://up.repl.link/add?repl=${REPL_SLUG}&author=${REPL_OWNER}"
in the Shell on your Repl
Or you can visit up.repl.link and submit your repl.user.repl.co
link (in the new website window)
Other uptimers
up.terminatorfishstudios.com is very similar to up.repl.link, and freshping.io is also quite popular. You can find a list of these sites here.