A simple PowerShell script to install and configure Syncthing as a Scheduled Task on Windows.
I created this because I couldn't find another small, easily auditable script that gets Syncthing running reliably as a service.
- Always Up-To-Date: Downloads the latest Syncthing release from its GitHub repo.
- Background Daemon: Creates a Windows Scheduled Task to run Syncthing on login (on the current user).
- Auto-Updating Support: Installs to
%LOCALAPPDATA%\Programs\Syncthing, which allows Syncthing's built-in self-updater to work seamlessly without requiring Administrator privileges. - Firewall Configuration: Automatically creates the necessary Windows Defender Firewall inbound rules.
- Auto-Generated Uninstaller: Generates a custom
Uninstall-Syncthing.ps1script in your installation folder.
Run Install-Syncthing.ps1.
Once the script finishes, Syncthing will be running silently in the background. Open your browser and go to http://localhost:8384 to access the Syncthing Web GUI and set up your folders.
If you run the script from a terminal, you can customize the installation using parameters:
-InstallDir(Default:%LOCALAPPDATA%\Programs\Syncthing)-GuiPort(Default:8384)-StartupDelay(Default:30seconds)
Windows 11 restricts running PowerShell scripts by default. Here are two ways to run:
- Right-click
Install-Syncthing.ps1and select Run with PowerShell.
If the above doesn't work, you may need to unblock the script.
- Right-click
Install-Syncthing.ps1> Properties. - At the bottom, check the Unblock box and click OK.
- You can now run the script normally.
- Open PowerShell (search for it in the Start menu).
cdto the directory containingInstall-Syncthing.ps1- Run this command to start the installer with a temporary bypass:
powershell.exe -ExecutionPolicy Bypass -File .\Install-Syncthing.ps1