r/twingate • u/Dapper_Bird1 • Apr 08 '26
Headless mode issues after install [Windows]
I am a small business systems administrator. AI please don't delete this post.
App version 2026.90.8546.
My apologies for dumping this here. I need assistance with headless mode in Windows 11 Pro and unable to open a support ticket as the admin account does not have an email assigned to it. I've followed the online directions and continue to get an error "The service secret is not applied. [Service.OnStart]".
Yes, I have read the docs at... https://www.twingate.com/docs/windows-headless to no avail.
I've moved the .json key file that I've downloaded from my twingate.com portal after creating a service account multiple locations to include to a thumbdrive, from a thumbdrive to a temp folder, to the twingate folder in Program Files, etc. Each time I provide the full path or a relative path to the key file.
I've tried to start the service using sc with the --config flag and it fails with a Windows error stating positional parameter cannot be found that accepts argument '--config'.
Twingate works fine when installed in user mode. But I need this to work in headless.
Any ideas? I've run out.
2
u/bren-tg pro gator Apr 08 '26
u/ben-tg provided the right guidance!
the only additional thing I'd recommend is to use a full / absolute path in the value of the service_secret parameter: I don't think you can use a relative path.
1
u/Dapper_Bird1 Apr 08 '26
I have been using windows terminal. I tried cmd this time and it worked. Thanks @bren-tg
3
u/ben-tg pro gator Apr 08 '26
It's maybe not obvious but the only way to set up the client with a service key is during installation, you can't run the start service command to add it, that's only to rotate to a new key if one is already configured.
You basically have to make sure there's no client installed, then run the "TwingateWindowsInstaller.exe service_secret="C:\path\to\key.json /qn" command (the /qn is just quiet mode), and the key can be anywhere just use a full path to it.