Sign inCreate server
Apps & bots

Restart Your App or Bot and Set Up Auto-Restart

Restart your app from the panel, turn on a health check that restarts it after repeated failures, or schedule a daily restart on SolumeCore.

6 min read#restart app#auto restart#health check#scheduled restart#reiniciar app#reinicio automático#reiniciar bot de discord#bot keeps crashing

You restart your SolumeCore app or bot with the Restart button at the top of the app page, and you can make it restart by itself in two ways: a health check that restarts the app after repeated failures, or a scheduled task that restarts it at a fixed time, such as every night. Pick the one that matches how your app works; bots and web apps need different setups.

Restart, stop or force stop manually

The power controls sit at the top of the app page, whatever tab you are on:

  • Start turns the app on.
  • Restart stops it cleanly and starts it again. Use it after changing variables, packages or the language version.
  • Stop shuts it down cleanly so your program can finish what it is doing.
  • Force stop kills the process immediately, with no chance to save. The panel asks you to confirm and recommends it only when Stop isn't responding.

You can follow the result in Console > Live console. See View your app's logs and live console.

Option 1: Restart automatically with a health check

A health check tests your app every so often. If it fails several times in a row, the panel can restart the app and notify you. It works by connecting to your app's public address, so it only makes sense if your app accepts connections on a port.

  1. Open your app and go to Console > Logs & health.
  2. In the Health check card, press Set up. If it is already on, press Configure.
  3. Under How to check, choose:
    • Web (HTTP) for websites and APIs. We request a page and expect an answer that isn't an error. Type the Page to request, such as / or /health (it must start with /).
    • Port (TCP) for anything that isn't a website but listens on a port. We only check that the port accepts connections.
  4. Pick the Port (the main port by default), how often to check in Every (from 15 to 3,600 seconds; 30 by default) and Failures before acting (3 by default).
  5. Turn on Restart it automatically and, if you want a notification, Notify me. Both are on by default.
  6. Press Save.

How it behaves:

  • A check fails when the app doesn't answer within about 5 seconds, refuses the connection or, for HTTP, answers with an error status.
  • After the number of failures you chose in a row, the app is restarted and you get a notification. The card then shows Last automatic restart.
  • After a restart the panel waits at least 90 seconds before checking again, so the app can finish starting.
  • Checks only run while the app is on. If you stopped it yourself, it is not treated as down, and nothing is judged while a deploy is running.

A note for Discord bots

A normal Discord bot doesn't open any port: it connects out to Discord. A TCP or HTTP check would fail every time and restart your bot in a loop. You have two honest options:

  1. Leave the health check Off and use a scheduled restart (option 2 below).
  2. Make the bot also answer a tiny HTTP request on the PORT the panel gives it, then use the Web (HTTP) check. For Node.js:
javascript
const http = require('node:http');

http.createServer((req, res) => res.end('ok')).listen(process.env.PORT, '0.0.0.0');

For Python:

python
import os
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer


class Ping(BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200)
        self.end_headers()
        self.wfile.write(b"ok")

    def log_message(self, *args):
        pass


def serve():
    HTTPServer(("0.0.0.0", int(os.environ["PORT"])), Ping).serve_forever()


threading.Thread(target=serve, daemon=True).start()

Place the last line before bot.run(...) (or client.run(...)): that call blocks, so anything after it never runs.

This keeps your bot reachable for the check, but a bot that is stuck without crashing won't always fail it, so don't expect it to catch every problem.

Option 2: Schedule a restart

Scheduled tasks run on a clock, even with the panel closed. A nightly restart is a simple way to keep a long-running app fresh.

  1. Go to the Automation tab and open Scheduled tasks.
  2. Press New task, type a Name such as Early-morning restart and choose when it runs. The shortcuts include Every day at 4, Every 6 hours, Every hour and Every Sunday at 4, or you can fill the cron fields (Minute, Hour, Day of month, Month, Day of week).
  3. Check the Time zone. Times use the zone you pick here, not the server's.
  4. Leave Only when the server is online on if you don't want the task to turn on an app you stopped on purpose.
  5. Save the task, then press New action. For What to do choose Power on / off, and for Action choose Restart. Save.
  6. Press Run now to test it.

You can add steps to the same task, for example a backup before the restart.

If your app keeps crashing

An automatic restart brings the app back; it doesn't fix the cause. If it restarts again and again:

  1. Open the saved logs and look for the first error. See View your app's logs and live console.
  2. Check that the start command and the variables are right.
  3. Turn off Restart it automatically while you debug, so the loop doesn't hide the error.

Troubleshooting

  • The health check says "Not answering" but my bot works: the bot doesn't listen on a port. Use option 1's HTTP endpoint, or turn the check off.
  • The check reports a refused connection (nothing is listening on that port): your app must listen on 0.0.0.0 and on the PORT variable, not on localhost.
  • The buttons are disabled: the service may be suspended, or you don't have permission to control it.
  • I changed a variable and the app didn't pick it up: press Restart to apply under Code > Variables.

FAQ

Does my app restart by itself if it crashes?

Only if you set it up. With a health check and Restart it automatically on, the app is restarted after repeated failed checks. You can also schedule restarts. Without either, you restart it from the panel.

How do I restart my Discord bot every day?

Create a scheduled task under Automation > Scheduled tasks with a Power on / off action set to Restart, and use the shortcut Every day at 4 or your own time.

Will I be notified when my app goes down?

Yes, if the health check is on and Notify me is enabled. You receive a notification when it goes down.

Does deploying restart the app?

Yes. A deploy restarts the app briefly. For web apps that can't afford the gap, see Zero-downtime deploys.

Need an always-on home for your bot or API? See the app plans.

Was this article helpful?
Restart Your App or Bot and Set Up Auto-Restart