Run Sauce Connect Proxy as a Windows Service

How to Install Sauce Connect Proxy as a Windows Service with AlwaysUp

Automatically launch your Sauce HTTP proxy in the background when your computer reboots. Ensure that your tunnel is available 24/7 without anyone having to log on.

Sauce Connect Proxy is a HTTP proxy server that opens a secure "tunnel" connection for testing between a Sauce Labs virtual machine or real device and a website or mobile app hosted on your local computer or behind a corporate firewall. It provides a means for Sauce Labs services to access your application or website.

To install Sauce Connect Proxy as a Windows Service with AlwaysUp:

  1. If necessary, download, install and configure Sauce Connect Proxy. Ensure that it works as expected and note your full command line (this page lists the available parameters).

    For example, since we installed Sauce version 4.6.3 in "C:\sc-4.6.3-win32", this command does the trick in our test environment:

    C:\sc-4.6.3-win32\bin\sc.exe -u CoreTechnologies -k <OUR-ACCESS-KEY> -i Tunnel1 -l C:\sc-4.6.3-win32\sc-Tunnel1-log.txt
  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 Sauce Connect Proxy executable, sc.exe. You will find it in the "bin" subfolder where Sauce is installed.

    • In the Arguments field, enter your parameters to sc.exe.

      For example, using our example command line from step 1, we entered:

      -u CoreTechnologies -k <OUR-ACCESS-KEY> -i Tunnel1 -l C:\sc-4.6.3-win32\sc-Tunnel1-log.txt

      Be sure to quote paths and file names that contain a space

    • In the Start the application field, select Automatically, but shortly after the computer boots.

      This setting — which delays service startup by about 2 minutes after boot — will ensure that critical system services (like networking and domain authentication) are ready and waiting when Sauce Connect is launched in the background.

    • And in the Name field, enter the name that you will call the application in AlwaysUp. We have gone with Sauce Connect Proxy but you can specify another name if you like.

    Sauce Connect Proxy Windows Service: General Tab

  6. Click over to the Logon tab and enter the username and password of the Windows account where you installed and run Sauce Connect Proxy. The proxy should run in this account to find any settings you have configured (including environment variables).

    Sauce Connect Proxy Windows Service: Logon Tab

  7. Move to the Monitor tab. Let's setup a nightly restart of Sauce Connect Proxy to keep the tunnel "fresh" and free of leaks.

    Check the Every box and enter a time when no one is likely to be using the tunnel. Note that restarting sc.exe will be very quick so downtime will be very minimal (only a few seconds).

    Sauce Connect Proxy Windows Service: Monitor Tab

  8. Switch to the Startup tab and check the Ensure that the Windows networking components have started box. Sauce Connect Proxy communicates via TCP/IP, this option will keep the server from starting before the network is completely ready.

    Sauce Connect Proxy Windows Service: Startup Tab

  9. We're done configuring Sauce Connect Proxy as a service so click the Save button to record your settings. In a couple of seconds, an application called Sauce Connect Proxy will show up in the AlwaysUp window. It is not yet running though and the state will be "Stopped":

    Sauce Connect Proxy Windows Service: Created

  10. To start Sauce Connect Proxy from AlwaysUp, choose Application > Start "Sauce Connect Proxy". In a few seconds, the status will change to "Running" and the tunnel should be operating in the background:

    Sauce Connect Proxy Windows Service: Running

    Finally, confirm that your tunnel has been established and is working as expected. For example, things look normal in our log file:

    Sauce Connect Proxy log file

  11. That's it! Next time your computer boots, Sauce Connect Proxy will start up immediately, in the background, without anyone needing to log on. Please restart your PC now and test that everything works as expected after Windows comes back to life.

    And please feel free to edit Sauce Connect Proxy in AlwaysUp to check out the many other settings that may be appropriate for your environment. For example, send email alerts if it stops, restart the tunnel if sc.exe uses too much RAM, and much more.



Sauce Connect Proxy not working properly as a Windows Service?

  • Review the Sauce Connect Proxy knowledge base, which discusses configuration, errors and more.

  • 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 Sauce Connect Proxy. The AlwaysUp Event Log Messages page explains the messages that may appear.

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

  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 12.7 New!

6.3 MB Installer
  • Unrestricted 30-day trial for new users; upgrade for existing users
  • For Windows 10/8 and Windows Server 2019/2016/2012
  • How to Install | EULA
Our customers include...


Compatible with Windows 10 (32 & 64-bit)

Windows Server 2012 Certified (32 & 64-bit)

Windows 8 Compatible (32 & 64-bit)




Over 84,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 15+ years!