Install on Windows
This guide builds the Priompt server on Windows and runs it as a Windows service. It works on Windows 10, Windows 11, and Windows Server 2019 or later, on amd64. To run the server in a container instead, see Install with Docker.
Prerequisites
Before you begin, make sure you have:
- PowerShell, run as administrator: every command on this page is PowerShell, and the install steps write to
C:\Program Files. - winget: to install Go and NSSM. It ships with current Windows versions.
1. Build the binary
To build and install priompt.exe:
-
Install Go 1.25 or later, then open a new PowerShell window so
gois on yourPATH:winget install GoLang.Go -
Build
priompt.exeinto the current directory. No clone is needed:$env:GOBIN = "$PWD"; go install github.com/priompt/priompt/cmd/priompt@latest -
Copy it to
C:\Program Files\Priomptand add that directory to the systemPATH:New-Item -ItemType Directory -Force "C:\Program Files\Priompt" | Out-NullCopy-Item priompt.exe "C:\Program Files\Priompt\"$machinePath = [Environment]::GetEnvironmentVariable("Path", "Machine")[Environment]::SetEnvironmentVariable("Path", "$machinePath;C:\Program Files\Priompt", "Machine") -
Open a new PowerShell window as administrator, and check the version:
priompt versionOutputpriompt v0.7.4 (commit unknown, go1.26.4)The Go version in the output is the one you built with.
2. Create the data directory and credentials
To create the directory and the admin token:
-
Create the data directory and switch to it:
New-Item -ItemType Directory -Force C:\ProgramData\Priompt | Out-Nullcd C:\ProgramData\Priompt -
Create the tokens file with an admin token:
priompt initOutputwrote admin token to tokens.txtstart server: priompt serve -tokens-file tokens.txtpoint client: $env:PRIOMPT_URL = "priompt://<token>@localhost:8443"Keep the token. Clients use it in step 4.
-
Restrict the directory to SYSTEM and Administrators, because it holds the tokens file and the database:
icacls C:\ProgramData\Priompt /inheritance:r /grant:r "SYSTEM:(OI)(CI)F" "Administrators:(OI)(CI)F"
3. Run the server as a Windows service
priompt.exe is a console program, so a service manager runs it as a service. This guide uses NSSM, a third-party, open-source service manager.
To install and start the service:
-
Install NSSM, then open a new PowerShell window as administrator:
winget install NSSM.NSSM -
Create and configure the service:
$dir = "C:\ProgramData\Priompt"nssm install Priompt "C:\Program Files\Priompt\priompt.exe"nssm set Priompt AppParameters "serve -addr :8443 -db $dir\priompt.db -tokens-file $dir\tokens.txt -metrics-addr 127.0.0.1:2112"nssm set Priompt AppDirectory $dirnssm set Priompt AppEnvironmentExtra "PRIOMPT_SEED=false"nssm set Priompt AppStderr "$dir\priompt.log"nssm set Priompt AppRotateFiles 1nssm set Priompt Start SERVICE_AUTO_STARTThe server writes its log, including one JSON audit line per request, to
priompt.log. -
Start the service and check its status:
nssm start PriomptGet-Service PriomptThe
Statuscolumn showsRunning.
NATS stays on loopback in this setup, so only local processes can subscribe to change events. For agents on other hosts, add -nats-addr 0.0.0.0:4222 to AppParameters and PRIOMPT_NATS_TOKEN=<nats-token> to AppEnvironmentExtra, with a token from priompt gen-token. The server refuses an off-loopback NATS address without a token. Agents then subscribe with their own API token: nats://<token>@<your-host>:4222.
To open the firewall for clients:
New-NetFirewallRule -DisplayName "Priompt gRPC" -Direction Inbound -Protocol TCP -LocalPort 8443 -Action Allow
If remote agents subscribe to change events, add the same rule for port 4222.
4. Connect a client
To publish a first prompt and read it back:
-
Point the CLI at the server with the token from step 2:
$env:PRIOMPT_URL = "priompt://<token>@localhost:8443" -
Write a template to a file, and publish it:
Set-Content -Encoding ascii welcome.txt 'Welcome to {org}, {name}! Ask me anything to get started.'priompt publish -uri priompt://acme/onboarding/welcome -file welcome.txt -slot name -slot orgOutputpublished priompt://acme/onboarding/welcome (9ae06087ed69) — subscribers notified -
List the prompts:
priompt listOutputpriompt://acme/onboarding/welcome 9ae06087ed69
priompt publish strips a UTF-8 byte-order mark and converts CRLF line endings to LF, so a file from Set-Content or text piped from PowerShell 5.1 stores the same template as on Linux. It rejects UTF-16 files, which Set-Content -Encoding Unicode and Out-File in PowerShell 5.1 write, with <file>: file is UTF-16; save as UTF-8. Requires v0.7.3 or later.
Both SDKs read PRIOMPT_URL when you create a client without arguments, so the same variable connects your agents.
- Python
- Node
To fetch the prompt from Python:
-
Install the SDK:
pip install priompt-sdk -
Save this script as
connect.py:connect.pyfrom priompt_sdk import PromptClientclient = PromptClient() # reads PRIOMPT_URLprompt = client.get("priompt://acme/onboarding/welcome")print(prompt.template) -
Run it with
python connect.py.OutputHi {name}, welcome to {org}!
To fetch the prompt from Node:
-
Install the SDK:
npm install @priompt/client -
Save this script as
connect.js:connect.jsconst { PromptClient } = require("@priompt/client");async function main() {const client = new PromptClient(); // reads PRIOMPT_URLconst prompt = await client.get("priompt://acme/onboarding/welcome");console.log(prompt.template);client.close();}main(); -
Run it with
node connect.js.OutputHi {name}, welcome to {org}!
Upgrade
To upgrade to a new release:
-
Build the new binary, as in step 1:
$env:GOBIN = "$PWD"; go install github.com/priompt/priompt/cmd/priompt@latest -
Stop the service and back up the database:
nssm stop Priomptpriompt backup -db C:\ProgramData\Priompt\priompt.db -out C:\ProgramData\Priompt\pre-upgrade.jsonl -
Replace the binary and start the service. Pending schema migrations run on start:
Copy-Item priompt.exe "C:\Program Files\Priompt\" -Forcenssm start Priompt
Uninstall
To remove the service, the binary, and all data:
-
Stop and remove the service:
nssm stop Priomptnssm remove Priompt confirm -
Delete the binary and the data directory. This deletes every prompt, so back up first:
Remove-Item -Recurse "C:\Program Files\Priompt"Remove-Item -Recurse C:\ProgramData\Priompt
PowerShell equivalents of the shell commands in other pages
Other pages show bash commands. These are the PowerShell forms:
# Set an environment variable for this session
$env:PRIOMPT_TOKEN = "<token>"
# Create a random 32-byte encryption key, base64-encoded
$b = New-Object byte[] 32
[Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($b)
[Convert]::ToBase64String($b)
Next steps
- Production checklist: set what a server needs before it takes real traffic.
- Troubleshoot common problems: fix validation errors and startup failures.
- Client SDKs: use Priompt from your agents.