Run any Ruby Script as a Windows Service with AlwaysUp

How to Run any Ruby Script as a Windows Service / Daemon with AlwaysUp

Automatically kick off your Ruby script whenever your computer boots. Re-run it every hour or day. No logon necessary


Last Updated on July 7, 2026

Ruby is an open source programming language known for its simplicity and productivity.

To install a Ruby script as a Windows Service with AlwaysUp:

  1. Download and install Ruby, if necessary. The RubyIstaller package for Windows is recommended. Make a note of where you installed Ruby as that folder will be used in a later step.

    We installed Ruby in "C:\Ruby" for this tutorial and that path will crop up throughout:

    Install Ruby

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the Ruby executable (ruby.exe). This is "C:\Ruby\bin\ruby.exe" for our installation.

    • In the Arguments field, enter the full path to your Ruby script. We want to run "C:\Ruby\clean-system.rb", so that's what we put in.

    • And in the Start the application field, select Automatically, but shortly after the computer boots. That setting tells AlwaysUp to launch your Ruby service a couple of minutes after a reboot — enough time to ensure that all critical services are up and ready to go.

    • In the Name field, enter the name that you will call this application in AlwaysUp. We went with My Ruby App but you can specify virtually anything you like.

    Ruby Script Windows Service: General Tab

  6. Move to the Logon tab and enter the user name and password of the Windows account where you installed Ruby. Please ensure that you can run your script successfully in that account.

    Ruby Script Windows Service: Logon Tab

  7. If you only want your script to run periodically (that is, not 24/7), click over to the Restart tab and choose when to run.

    We set up AlwaysUp to run our script every day at 1 AM, but your needs may be different and you should set accordingly:

    Ruby Script Windows Service: Restart Tab

  8. We're done configuring Ruby as a service so click the Save button to record your changes. In a couple of seconds, an application called My Ruby App will show up in the AlwaysUp window. It's not yet running though and the state will be "Stopped":

    Ruby Windows Service: Created

  9. To start the service, choose Application > Start "My Ruby App". The state will transition to "Running" after AlwaysUp launches the script:

    Ruby Windows Service: Running

    Note that after the script completes, AlwaysUp will go into the "Waiting" state until it's time to run again. That's tomorrow at 1 AM for us:

    Ruby Windows Service: Waiting

  10. That's it. Next time your computer boots, AlwaysUp will launch your Ruby script immediately, as a daemon, before anyone signs on.

    When you have some time, we encourage you to explore the many other settings that may be appropriate for your environment. For example, you can:


Ruby not working properly as a Windows Service?

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a Windows Service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and your Ruby script. The AlwaysUp Event Log Messages page explains what each message means.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!

Our 14,000+ customers include...
AlwaysUp is fully compatible with Windows 11 AlwaysUp is fully compatible with Windows Server 2025
Over 97,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 20+ years!