Skip to content
20 changes: 20 additions & 0 deletions users/autostart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,26 @@ by a sysadmin who knows enough to understand the security implications.
#. Start the service via ``sc start syncthing`` in the Command Prompt.
#. Connect to the Syncthing UI, enable HTTPS, and set a secure username and password.

CLI and Native Solutions for Terminal Users
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It's possible to run Windows Task Scheduler native CLI API with a command such as
``schtasks /create /sc ONLOGON /tn Syncthing /tr "<program-path> [--no-console --no-browser]"``.
The operation requires elevated privileges. If you're facing issues when using ``--no-console``, you can
try wrapping the executable with a ``PowerShell`` script.

``script.ps1``::

Start-Process [-FilePath] "<path to syncthing>.exe" [-ArgumentList "..."] -WindowStyle Hidden

Then run as admin::

schtasks /create /sc ONLOGON /tn Syncthing /tr "powershell <path to script>.ps1"


For more information, please read official docs for Command Line Interface API:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks

macOS
-----

Expand Down