You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start a new command window (to get the updated env) and run `openrun server start` to start the OpenRun service.
241
+
Start a new command window (to get the updated env) and run `openrun server start` to start the OpenRun service. On the first start, OpenRun generates an admin password and prints it; note it down.
// The default home resolves to the service account profile (e.g.
165
+
// C:\Windows\System32\config\systemprofile), not the installing
166
+
// user's home, and a bootstrapped admin password would be printed
167
+
// where nobody can see it. Fail fast instead of silently creating
168
+
// a second config under the service profile
169
+
returnfmt.Errorf("no config file found (looked for %s): when running as an OS service, set OPENRUN_HOME in the service environment or register the service with --config-file", filePath)
Copy file name to clipboardExpand all lines: docs/content/docs/Installation.md
+52-2Lines changed: 52 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,21 @@ Apps are not affected: app containers keep running through the restart. In-place
92
92
93
93
## Install On Windows
94
94
95
-
To install the OpenRun application on Windows, run:
95
+
To install OpenRun using [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/), run:
96
+
97
+
```powershell
98
+
winget install OpenRunDev.OpenRun
99
+
```
100
+
101
+
Open a new terminal so `openrun` is on the PATH, then run:
102
+
103
+
```powershell
104
+
openrun server start
105
+
```
106
+
107
+
On the first server start, OpenRun creates its config file under `$HOME\openrun` (or `$env:OPENRUN_HOME` if set) and generates an admin password. Note down the password printed.
The paths from `$env:OPENRUN_HOME` are expanded when the service is created; re-create the service if the install location changes. The service runs as LocalSystem by default; for a network facing server, consider a less privileged account using `sc.exe config openrun obj= <account>`.
132
+
The paths from `$env:OPENRUN_HOME` are expanded when the service is created; re-create the service if the install location changes. For winget installs, see [Winget Service Install](#winget-service-install) below. The service runs as LocalSystem by default; for a network facing server, consider a less privileged account using `sc.exe config openrun obj= <account>`.
119
133
120
134
When started this way, OpenRun reports service status to Windows and handles service stop, shutdown and pre-shutdown requests as graceful server shutdowns.
121
135
122
136
Open https://localhost:25223 to access the app listing UI.
123
137
138
+
### Winget Service Install
139
+
140
+
To run OpenRun as a Windows service on a machine where it was installed with winget, the recommended approach is a machine scoped install with the service registered against an explicit config file. From an elevated shell:
141
+
142
+
```powershell
143
+
winget install --scope machine OpenRunDev.OpenRun
144
+
```
145
+
146
+
Machine scope installs the binary under `Program Files\WinGet` instead of the installing user's profile, which is preferable for a service. Open a new elevated terminal so `openrun` is on the PATH, then create the config file with a generated admin password:
Passing `--config-file` pins the server home directory to the config file's directory (`C:\ProgramData\openrun` here), keeping the service independent of any user profile. Without it, a service would resolve its home under the service account profile (for LocalSystem, `C:\Windows\System32\config\systemprofile`), and OpenRun refuses to auto-create a config there. To use the `openrun` CLI against this server from a regular shell, set the env variable at machine scope so the CLI resolves the same home:
For a default user scoped winget install, keep everything under the user profile instead: run `openrun server start` once interactively to create `$HOME\openrun\openrun.toml` (note down the generated admin password), stop it with Ctrl+C, then register the service with `$OpenRunConfig = Join-Path $HOME 'openrun\openrun.toml'` in the `sc.exe create` command above. No env variable is needed in this setup: the CLI defaults to the same `$HOME\openrun` home.
171
+
172
+
In both flows, `(Get-Command openrun.exe).Source` resolves to the winget links shim, which stays valid across `winget upgrade`; after an upgrade, run `sc.exe stop openrun` and `sc.exe start openrun` to switch to the new binary.
Start a new command window (to get the updated env) and run `openrun server start` to start the OpenRun service.
45
+
Start a new command window (to get the updated env) and run `openrun server start` to start the OpenRun service. On the first start, OpenRun generates an admin password and prints it; note it down.
0 commit comments