-
If necessary, download,
install and
configure
Sauce Connect. Ensure that it works as expected and note the command line you run to establish the tunnel.
For this tutorial, we installed Sauce Connect in folder "C:\sauce-connect" and created configuration file "C:\sauce-connect\sauce-connect.yaml".
This command launched the tunnel on our machine:
C:\sauce-connect\sauce-connect.exe run --config-file C:\sauce-connect\sauce-connect.yaml
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to the Sauce Connect Proxy executable, sauce-connect.exe.
You'll find it in your Sauce Connect folder.
-
In the Arguments field, enter your parameters to sauce-connect.exe (from step 1).
-
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 went with Sauce Connect Proxy but you can specify another name if you like.
-
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).
-
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.
-
Since you won't see the console when the proxy is running in the background as a service, let's capture the output to a file.
Go to the Extras tab, check the Capture output to this log file box and enter the full path to the log file:
-
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's not yet running though and the state will be "Stopped":
-
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 will be operating in the background:
Finally, confirm that your tunnel has been established and is working as expected. For example, things look normal in our log file (set in step 8):
-
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 computer 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 sauce-connect.exe uses too much RAM,
and much more.