Run any Dart Script as a Windows Service with AlwaysUp

How to Run any Dart Script as a Windows Service with AlwaysUp

Automatically start your application with the Dart VM (dart.exe) in the background whenever your computer boots, before you log in. Keep it running 24/7 or schedule it to restart several times a day


Last Updated on June 6, 2026

Google's Dart programming language was launched in 2011 as a more structured, better-performing alternative to JavaScript. Dart is often used to build web applications that run in a browser but it also supports the construction of standalone applications.


To install your Dart script as a Windows Service with AlwaysUp:

  1. If you don't have Dart installed, download the Dart zip file and extract it to a folder of your choice.

    We placed the software in "C:\dart" and we'll reference that location throughout this tutorial.

  2. Next, let's ensure that your Dart script runs normally from the command prompt.

    1. Start a command prompt (Start button > Run > cmd.exe)

    2. In the window that appears, type the full path to the Dart executable (dart.exe) followed by the full path to the script you wish to run as a windows service. Be sure to quote each component that contains a space!

      Since we placed Dart in "C:\dart", and our script is "C:\dart\server.dart", our command line is:

      C:\dart\bin\dart.exe C:\dart\server.dart
    3. Run the command line. If your script doesn't work as expected please resolve the issues now. If your script doesn't run here then it won't run as a windows service with AlwaysUp either.

      Here's the code of our simple script:

      Sample Dart script code

      And here is the result of running it:

      Sample Dart script code running

      Everything looks great!

  3. Download and install AlwaysUp, if necessary.

  4. Start AlwaysUp.

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

    Add Application

  6. On the General tab:

    • In the Application field, enter the full path to the Dart executable. dart.exe. This is "C:\dart\dart-sdk\bin\dart.exe" for our installation.

    • In the Arguments field, enter the full path to your Dart script. We want to run our simple script, "C:\dart\server.dart".

    • And in the Name field, enter the name that you will call this application in AlwaysUp. We went with Dart Server but you can specify virtually anything you like:

    Dart Windows Service: General Tab

  7. If you want your script to run periodically (that is, not 24/7), click over to the Restart tab and choose when to run. For example, if you wish to kick off the script at 9 AM every day, check the Not immediately and At boxes and enter that time in the corresponding field.

    However we'll stick with the default of restarting immediately to keep our Dart application running all the time:

    Dart Windows Service: Restart Tab

  8. When your Dart application runs as a Windows Service, you won't see it's console window. If that's a problem, we recommend saving everything written to the console to a file. That way you can review the output if something goes wrong.

    To set that up:

    • Switch to the Extras tab.

    • In the Capture output to this log file field, enter the full path to the text file that should track the console output.

    • If important, specify what should happen to the output file if it grows very large:

    Dart Windows Service: Extras Tab

  9. Click the Save button. In a couple of seconds, an application called Dart Server will show up in the AlwaysUp window. It is not yet running though (the state will be "Stopped"):

    Dart Windows Service: Created

  10. To start the service, which will kick off the Dart script, choose Application > Start "Dart Server". In a few seconds, the state will transition to "Running" and your script will be working away in the background (in Session 0):

    Dart Windows Service: Running

  11. That's it! Next time your computer boots, your Dart application be launched immediately, before anyone logs on.

    We encourage you to explore the many other AlwaysUp settings that may be appropriate for your environment.

    For example, you can:


Dart not working properly as a Windows Service?

  • Check the console log file (configured in step 8) for warnings and errors that may indicate what's going wrong.

  • 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 Dart application. The AlwaysUp Event Log Messages page explains the more obscure messages.

  • 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!