Summary
Create a PowerShell script to install, update, and configure the Photometoria server as a Windows Service on Windows.
Part of the platform-specific split of #75.
Scope
Service Manager
| Platform |
Service Manager |
Config Location |
| Windows |
Windows Service (sc.exe / NSSM) |
Service registry |
Script to Create
scripts/install-windows.ps1 supporting three operations:
1. Install
- Copy the binary to
C:\Program Files\Photometoria\
- Create default
config.toml if not present (from config.toml.example)
- Create the storage directory
- Register the service using NSSM or native
sc.exe
- Configure appropriate permissions
- Enable auto-start at boot (Automatic startup type)
2. Update
- Stop the running service
- Back up the current binary
- Replace with the new binary
- Restart the service
- Verify the service is running (health check via
GET /api/info)
3. Configure
- Edit
config.toml (interactive or via CLI flags)
- Validate configuration before applying
- Restart the service to apply changes
Platform-Specific Details
- Service name:
Photometoria
- Configurable startup type (Automatic / Manual)
- Event log integration for logging
- Optional NSSM config:
scripts/service-templates/photometoria-nssm.conf
Common Features
- Idempotent: Running install twice must not break the setup
- Uninstall: Support
--uninstall to cleanly remove the service
- Status check:
--status flag to show service state and health
- Non-destructive updates:
config.toml is never overwritten during updates
- Pre-flight checks: Verify prerequisites (e.g., Ollama installed and reachable)
File Structure
scripts/
├── install-windows.ps1
└── service-templates/
└── photometoria-nssm.conf # NSSM config (optional)
Acceptance Criteria
Summary
Create a PowerShell script to install, update, and configure the Photometoria server as a Windows Service on Windows.
Part of the platform-specific split of #75.
Scope
Service Manager
Script to Create
scripts/install-windows.ps1supporting three operations:1. Install
C:\Program Files\Photometoria\config.tomlif not present (fromconfig.toml.example)sc.exe2. Update
GET /api/info)3. Configure
config.toml(interactive or via CLI flags)Platform-Specific Details
Photometoriascripts/service-templates/photometoria-nssm.confCommon Features
--uninstallto cleanly remove the service--statusflag to show service state and healthconfig.tomlis never overwritten during updatesFile Structure
Acceptance Criteria
docs/for Windows setup