Recommended Free Tools
Run the app under one process supervisor, configure it to restart after crashes, register that supervisor or container runtime at boot, save the process definition, and monitor both logs and application health. Closing SSH then has no effect, and an ordinary process crash or VPS reboot can recover automatically. No setup can guarantee uptime when the provider, network, dependencies, or application itself fails.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What “running forever” actually means
A command launched in an SSH shell belongs to that session unless you deliberately detach and supervise it. Even a detached process can disappear on a crash, a reboot, an out-of-memory event, or an unhandled dependency failure. Reliable VPS operation therefore has four separate requirements:
As an Amazon Associate I earn from qualifying purchases.
- Supervision: a manager owns the process and notices when it exits.
- Recovery: the manager starts it again after an ordinary crash, with sensible delay controls.
- Boot persistence: the manager and your saved process or container definition start after the VPS reboots.
- Observation: logs and a real health check show whether users can actually use the app.
Automatic restart is not the same as application health. A process can remain alive while it cannot reach its database, is returning errors, or is listening on the wrong interface. Treat “forever” as automatic recovery from routine process failures and host restarts, not a guarantee against provider outages, network failures, broken releases, or exhausted disks.
Choose one restart authority
Decide first whether the workload runs directly on the VPS or inside a container. Assign exactly one component responsibility for restarting that workload. Two independent supervisors can fight over the same process, create duplicate instances, obscure logs, and produce unpredictable deployment behavior.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
| Approach | Best fit | Crash and boot behavior | Observability | Main caution |
|---|---|---|---|---|
| PM2 on the host | Node.js, Python, shell, Ruby, PHP, or binary applications managed directly on the VPS | Automatic restarts; a generated startup hook; pm2 save persists the process list |
pm2 logs, pm2 monit, status commands, and an optional dashboard |
Use graceful shutdown and backoff so a dependency outage does not become a tight crash loop |
| Docker restart policy | Applications already packaged as containers | Docker restarts containers according to the policy and brings them back when the Docker service starts | Container logs plus application-level health checks | Do not add a host-level process manager for the same container |
| systemd or Supervisor | Host-managed services where operating-system supervision is preferred | The selected service manager owns restart and boot registration | Depends on the manager and the host’s logging setup | Document ownership clearly and do not layer another supervisor on top |
PM2 is a practical default for a small or medium application executed directly on a VPS. Docker is usually cleaner when the application, runtime, and dependencies are already delivered as an image. systemd is a strong OS-native choice when your team wants service definitions, journal logging, and distribution-level controls. The choice matters less than consistent ownership: one app or container, one restart authority.
Run a host application with PM2
1. Install and start the application
Install PM2 for the same Linux user that should own the application. Running it as an unprivileged deployment user avoids giving the application unnecessary root access.
Free tools Windows power users keep installed
One-click scans. No signup required.
npm install --global pm2
cd /srv/my-app
pm2 start app.js --name my-app
For another runtime, point PM2 at that runtime’s entry command or executable. The important detail is a stable name: it makes status, logs, reloads, and incident commands unambiguous.
pm2 list
pm2 logs my-app
pm2 monit
Confirm that the app binds to the expected address and port, can read its environment, and reaches its required database or queue before making the setup persistent. A supervisor will faithfully restart a process that immediately fails because its configuration is wrong.
2. Register PM2 at boot
Generate a startup command for the VPS’s detected init system:
pm2 startup
PM2 prints a command tailored to the operating system and user. Copy and execute that generated command with the required privileges. Do not substitute a command from a different user: the startup hook must load the same user’s PM2 home, environment, and process list.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
3. Freeze the process list
After the correct application is running, save the list that PM2 should restore:
pm2 save
Run pm2 save again whenever you add, remove, rename, or materially reconfigure a managed process. The startup hook alone does not know which applications to restore; the saved list supplies that definition.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
4. Check the reboot path
Inspect the list and logs before scheduling a maintenance reboot:
pm2 status
pm2 logs my-app --lines 100
After reboot, verify that the PM2 service started, the process appears online, the listening port is open, and the application health endpoint returns healthy. A successful process restart does not prove that initialization completed correctly.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesUse Docker’s restart policy for a container
If the app is containerized, let Docker own container recovery. A minimal detached run might look like this:
docker run -d
--name my-app
--restart unless-stopped
-p 8080:3000
my-app:1.4.2
The unless-stopped policy restarts the container after a crash and after a Docker-host restart, while respecting an intentional stop. Other policies cover different requirements: always continually restarts the container, on-failure limits recovery to non-zero exits and can include a retry count, and no disables automatic restart.
For Compose-based deployments, express the policy in the service definition so it is versioned with the application:
services:
app:
image: my-app:1.4.2
ports:
- "8080:3000"
restart: unless-stopped
Ensure the Docker service itself starts at boot on the VPS, then inspect the container:
docker ps
docker inspect -f '{{.HostConfig.RestartPolicy.Name}}' my-app
docker logs --tail 100 my-app
Do not run PM2 or another host process manager to restart the same container. Docker explicitly warns that combining restart policies with host-level process managers creates conflicts. If you use PM2 inside a container for a specific reason, let Docker supervise the container and use PM2 only for the processes it intentionally owns inside it; document that boundary.
When systemd or Supervisor is the better fit
Use an OS-native manager when the service should look and behave like a standard Linux daemon, when you want journal integration, or when your operations team already has systemd policies. A typical systemd unit has an absolute executable path, a dedicated user, a working directory, environment settings, and restart controls:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
[Unit]
Description=My application
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=app
WorkingDirectory=/srv/my-app
ExecStart=/usr/bin/node /srv/my-app/app.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
After placing and reviewing the unit, reload systemd, enable it for boot, start it, and inspect its status:
sudo systemctl daemon-reload
sudo systemctl enable --now my-app.service
sudo systemctl status my-app.service
sudo journalctl -u my-app.service -f
Use one unit per independently managed service and avoid wrapping a systemd-managed process in PM2 unless you have a deliberate, documented reason. Supervisor offers a similar host-managed model with its own configuration and logging conventions; select it when it matches your existing operational tooling rather than adding it merely because it is available.
Configure restart behavior that does not make outages worse
An immediate restart is useful for a transient crash but harmful when the database, credentials, or external provider is unavailable. Repeated failures can consume CPU, flood logs, trigger rate limits, and hide the first useful error.
Fixed delay
Set a short, fixed delay between attempts when failures are expected to clear quickly. PM2 supports restart delays; configure one in the command or ecosystem file rather than relying on a zero-delay loop. A delay of several seconds gives the process and local dependencies time to settle.
Exponential backoff
Use exponential backoff when a remote dependency may be down for minutes or longer. PM2’s exponential mode increases the delay after successive failures and resets it after the app has remained stable. This reduces restart pressure during an outage while still recovering automatically when the dependency returns.
Backoff does not replace alerting. Record the exit reason, first failure time, and current retry state so an operator can distinguish a recovering dependency outage from a bad release.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Limit accidental restart storms
- Fail fast with a clear log message when required configuration is missing.
- Do not mask startup errors by returning a successful exit code.
- Set sensible restart limits where your supervisor supports them.
- Alert when restart frequency crosses a threshold, even if the service eventually comes back.
- Reserve manual intervention for a known bad release, corrupted state, or dependency that will not recover.
Implement graceful shutdown before relying on restarts
A restart that kills active requests can corrupt work or return avoidable errors. On SIGINT or SIGTERM, the application should:
- Stop accepting new work and, if applicable, remove itself from load-balancer rotation.
- Allow in-flight requests or jobs to reach a defined deadline.
- Finish or safely requeue background work.
- Close database pools, queue consumers, sockets, and other resources.
- Exit so the supervisor can start a clean instance.
PM2 describes graceful shutdown as a five-step sequence covering notification, traffic draining, request completion, resource release, and exit. Set a timeout for the drain phase: a hung request must not block deployment forever. Your application should also tolerate a second termination signal by stopping promptly after the grace period.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Add a health endpoint that measures user-visible health
A process-status command answers only “does a process exist?” A health check should answer “can this instance serve the function users need?” Separate checks by purpose:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11- Liveness: the event loop or main service is running and not deadlocked.
- Readiness: the instance is initialized and ready to receive traffic.
- Dependency health: required database, queue, cache, storage, or API connections work within an acceptable timeout.
Expose a small endpoint such as /healthz or /readyz. Keep it fast, authenticated where appropriate, and explicit about degraded dependencies. A check that always returns HTTP 200 is not useful. Conversely, avoid making liveness depend on a slow third-party service if that would cause needless restarts; use readiness or monitoring for that dependency instead.
curl --fail --max-time 5 http://127.0.0.1:8080/healthz
For containers, pair Docker’s restart policy with an application health check and a monitoring system that alerts on unhealthy responses. PM2’s container integration also supports a web health endpoint when pm2-runtime is used, but the endpoint still needs meaningful application logic.
Make logs useful and keep disks from filling
Capture standard output and error with timestamps, severity, and a request or job identifier. PM2 provides pm2 logs for streaming output and a log-rotation module for retention. Docker provides container logs; configure the runtime or a log collector so retention matches your disk capacity and incident needs. systemd users can inspect the journal and set retention appropriate to the VPS.
- Rotate logs before they can exhaust the root filesystem.
- Keep enough history to identify the first failure, not only the latest restart.
- Never write secrets, access tokens, or full customer payloads into logs.
- Include startup configuration checks without printing secret values.
- Alert on repeated crashes, health-check failures, disk pressure, and memory pressure.
When an app is “up” but unusable, compare supervisor status, health responses, and logs. Those three views expose different failure classes.
Persist configuration as well as the process
Boot recovery fails if the process definition depends on an interactive shell. Use absolute paths, a known working directory, and explicit environment management. Keep the following under controlled ownership:
- PM2 ecosystem files or the saved PM2 process list.
- Docker image tags, Compose files, and environment-file references.
- systemd unit files or Supervisor configuration.
- Database migration and release scripts.
- Health-check paths, ports, and reverse-proxy configuration.
Do not assume an SSH profile, shell aliases, or a language-version manager will be loaded at boot. The startup command must point to the intended runtime and executable directly. If the application needs secrets, provide them through a protected environment file or secret store with permissions limited to the service user.
Test recovery deliberately
Recovery should be verified during a maintenance window, not inferred from a successful first launch. Record the expected result for each test:
Best Value
- Supervisor restart: restart PM2, Docker, or the systemd unit and confirm the app returns without manual SSH intervention.
- Application failure: terminate the managed process or container in a controlled way. Confirm one replacement starts, the health endpoint becomes ready, and logs show the cause.
- VPS reboot: reboot the host and verify that the supervisor, process definition, network binding, and dependencies recover in the correct order.
- Dependency outage: block or stop a non-production dependency where safe. Confirm backoff prevents a tight loop and that monitoring reports the degraded state.
- Graceful deployment: send termination during active requests and verify that in-flight work drains or is safely retried.
These are operator procedures, not guarantees. Keep the commands, timestamps, and observed results in your runbook so another person can repeat them.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Deployment patterns that preserve uptime
PM2 reload for compatible applications
For an application that supports a reload strategy, use PM2’s reload operation rather than killing every instance at once. Validate the new code, drain old workers gracefully, and watch health and error rates while traffic moves. A reload cannot fix schema incompatibility or a broken migration; deploy database changes in an order that old and new code can both tolerate.
Container replacement
Build an immutable image, tag it clearly, start the new container with the same health and restart policy, and move traffic only after readiness succeeds. Keep the previous image available for rollback. Do not treat a container that starts successfully as proof that the application is ready.
Single-instance limitations
One VPS and one process can recover from a crash, but they cannot provide service while the VPS itself is unavailable. If your availability requirement includes host, zone, or provider failure, you need redundancy, a traffic-switching plan, backups, and a tested restoration procedure. A restart supervisor is resilience inside one host, not a replacement for high availability.
Troubleshoot the common failure modes
The app stops when SSH closes
It is probably running as a foreground shell process or under an untracked background command. Start it through PM2, Docker, or systemd and verify its status from a second SSH session. Do not use nohup as the production recovery plan; it detaches output but does not provide boot persistence or reliable crash handling.
The app survives manually but not after reboot
Check that the supervisor’s boot unit is enabled, the saved process list or container policy exists, and the service runs as the expected user. Look for relative paths, missing environment variables, unavailable mounts, and dependencies that start later than the app.
The supervisor reports “online” but requests fail
Query the local health endpoint, inspect initialization and dependency logs, and confirm the listening address, firewall, reverse proxy, TLS termination, and DNS target. Process presence alone does not validate the request path users take.
The app restarts continuously
Read the first failure in the logs rather than the latest restart message. Check configuration, permissions, port collisions, memory limits, database credentials, migrations, and runtime versions. Add fixed delay or exponential backoff, then correct the underlying failure. Do not silence the loop by increasing restart limits indefinitely.
Deployments drop requests
Implement the five graceful-shutdown stages, configure a finite drain timeout, and use reload or replacement only after readiness is proven. Confirm that clients and job queues can retry safely when a request reaches the deadline.
Production checklist
- The workload is classified as host-run or containerized.
- Exactly one restart authority is documented.
- The app runs as a least-privileged user where practical.
- Crash restart and boot startup are both enabled.
- The PM2 process list, container policy, or service unit is persisted and versioned.
- Fixed delay or exponential backoff is configured for likely dependency outages.
- SIGTERM and SIGINT trigger draining, cleanup, and a bounded exit.
- Liveness and readiness checks reflect real application behavior.
- Logs are timestamped, retained, rotated, and free of secrets.
- Disk, memory, restart frequency, and health failures generate alerts.
- Crash, dependency-outage, reboot, and graceful-deployment tests have documented results.
- Backups and a restoration plan cover failures a process supervisor cannot repair.
The practical answer
For a directly hosted Node.js or script-based service, start it with PM2, run the generated pm2 startup command, save it with pm2 save, configure backoff, and verify recovery after a controlled reboot and crash. For a containerized service, set Docker’s restart policy, enable Docker at boot, add a meaningful health check, and keep Docker as the sole restart authority. Choose systemd or Supervisor when OS-native service management better matches your operating model. In every case, pair automatic recovery with graceful shutdown, retained logs, and health monitoring; that combination is what turns a background command into an operable VPS service.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




