Pial2233 commited on
Commit
e1087f0
·
verified ·
1 Parent(s): 118b20f

Update USER_GUIDE.md

Browse files
Files changed (1) hide show
  1. USER_GUIDE.md +9 -0
USER_GUIDE.md CHANGED
@@ -50,9 +50,18 @@ No separate upstream model downloads are needed.
50
  ## 3. Create a local API key
51
 
52
  ```bash
 
53
  umask 077
54
  printf 'OCR_API_KEYS=%s\n' "$(openssl rand -hex 32)" > .env
55
  ```
 
 
 
 
 
 
 
 
56
 
57
  Compose reads `.env` automatically. Keep it private. The API requires this key in
58
  the `X-API-Key` header. Existing installations can use
 
50
  ## 3. Create a local API key
51
 
52
  ```bash
53
+ # Linux
54
  umask 077
55
  printf 'OCR_API_KEYS=%s\n' "$(openssl rand -hex 32)" > .env
56
  ```
57
+ ```bash
58
+ # Windows(Powershell)
59
+ $bytes = New-Object byte[] 32
60
+ [Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($bytes)
61
+ $key = -join ($bytes | ForEach-Object { $_.ToString('x2') })
62
+ [IO.File]::WriteAllText("$PWD\.env", "OCR_API_KEYS=$key`n", (New-Object Text.UTF8Encoding $false))
63
+ ```
64
+ **This makes the key of 32 random bytes written as 64 hex characters.**
65
 
66
  Compose reads `.env` automatically. Keep it private. The API requires this key in
67
  the `X-API-Key` header. Existing installations can use