-
-
Notifications
You must be signed in to change notification settings - Fork 1
Windows Installer
The Windows installer sets up Printbuddy natively on Windows without Docker.
It checks the required tools, clones Printbuddy, creates a Python virtual environment, installs dependencies, creates separate data and log directories, creates a start script, adds optional firewall access, and can register Printbuddy as a Windows Service.
Script path:
/install/windows-installer.ps1
Run PowerShell as Administrator and start the installer:
powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/vmhomelab/printbuddy/main/install/windows-installer.ps1 -OutFile windows-installer.ps1; .\windows-installer.ps1"The installer will guide you through the setup.
It asks for:
- Installation directory
- Printbuddy port
- Whether Printbuddy should listen on the LAN or only on this computer
- Firewall rule creation
- Optional Windows Service registration
Recommended: Use the default installation path unless you have a specific reason to change it.
For managed deployments, add parameters after .\windows-installer.ps1 in the same one-liner:
powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/vmhomelab/printbuddy/main/install/windows-installer.ps1 -OutFile windows-installer.ps1; .\windows-installer.ps1 -Port 8010 -Yes"You can pass parameters directly after .\windows-installer.ps1 in the download one-liner or when running a previously downloaded copy.
-
-InstallDir <Path>- Default:
C:\Printbuddy - Installation directory. The Git checkout is placed in
InstallDir\printbuddy; data and logs are stored as sibling folders.
- Default:
-
-Port <1-65535>- Default:
8000 - HTTP port used by Printbuddy. The installer checks whether the selected port is already in use.
- Default:
-
-Yes- Default: off
- Non-interactive mode. Accepts the default answer for yes/no prompts.
-
-Silent- Default: off
- Non-interactive mode with reduced console output.
-
-NoService- Default: off
- Skip Windows Service registration.
-
-NoStart- Default: off
- Do not start Printbuddy at the end of installation.
-
-LocalOnly- Default: off
- Bind Printbuddy to
127.0.0.1instead of exposing it on all LAN interfaces.
Examples:
powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/vmhomelab/printbuddy/main/install/windows-installer.ps1 -OutFile windows-installer.ps1; .\windows-installer.ps1 -Port 8010 -Yes"powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/vmhomelab/printbuddy/main/install/windows-installer.ps1 -OutFile windows-installer.ps1; .\windows-installer.ps1 -InstallDir C:\PrintbuddyLocal -Port 8011 -Yes -NoService -NoStart -LocalOnly"By default, Printbuddy is installed to:
C:\Printbuddy
The default installation path is C:\Printbuddy instead of C:\Program Files\Printbuddy because Printbuddy is a Git-based Python application that creates and updates a virtual environment, writes log files, and may be updated through git pull.
Using C:\Printbuddy avoids common permission, UAC, path escaping, and service-context issues on Windows.
Custom path supported: During setup, the installer asks whether the default path should be used. You can provide a custom installation path if needed.
The installer keeps user data outside the Git checkout so updates and re-clones do not remove the database, archives, uploads, or logs.
Typical layout:
C:\Printbuddy\
├─ printbuddy\ # Git checkout
├─ data\ # Persistent application data
├─ logs\ # Runtime and application logs
├─ install.log # Installer log
└─ Start-Printbuddy.ps1
The installer should be started from an elevated PowerShell session.
Administrator rights are needed for:
- Installing Git or Python via
wingetwhen they are missing - Creating the installation directory and fixing permissions
- Creating a Windows Firewall rule
- Registering Printbuddy as a Windows Service
If the script is not elevated, it may try to relaunch itself as Administrator.
The installer checks whether git is available.
If Git is missing, the installer can install it through winget.
After Git is available, the installer clones or updates:
https://github.com/vmhomelab/printbuddy.git
The installer checks whether a supported Python 3 runtime is available.
If Python is missing, the installer can install it through winget.
After Python is available, the installer creates a virtual environment and installs Printbuddy requirements inside that environment.
The installer performs these steps:
- Creates or validates the install directory.
- Starts installer logging.
- Checks administrator rights.
- Checks Git and Python.
- Clones or updates the Printbuddy repository.
- Creates persistent data and log directories.
- Creates a Python virtual environment.
- Installs backend dependencies.
- Selects the HTTP port and bind address.
- Creates
Start-Printbuddy.ps1. - Optionally creates a Windows Firewall rule.
- Optionally registers a Windows Service.
- Optionally starts Printbuddy.
The default web port is:
8000
If the selected port is already in use, choose another port, for example:
.\windows-installer.ps1 -Port 8010By default, the installer can expose Printbuddy on the LAN so other devices in your network can open it.
Use -LocalOnly to bind only to this computer:
.\windows-installer.ps1 -LocalOnlyLocal-only mode is useful when Printbuddy is accessed through a local browser only, or when another reverse proxy handles external access.
When LAN access is enabled, the installer can create a Windows Firewall rule for the selected port.
If you skip the firewall rule, Printbuddy may start correctly but be unreachable from other devices until the port is allowed manually.
The installer creates:
Start-Printbuddy.ps1
Use it to start Printbuddy manually from the install directory.
The installer and runtime use separate logs.
Typical logs:
-
install.log— installer actions and errors - Runtime log — PowerShell/service startup output
- Application logs — Printbuddy backend logs
Logs are kept outside the Git checkout where possible so updates do not remove them.
The installer can register Printbuddy as a Windows Service so it starts automatically with Windows.
The service registration uses NSSM where supported. NSSM runs the generated PowerShell start script as a Windows Service and captures service output.
Useful service commands:
Get-Service Printbuddy
Start-Service Printbuddy
Stop-Service Printbuddy
Restart-Service PrintbuddyIf service registration is enabled, Printbuddy starts automatically after Windows boots.
Use -NoService if you prefer to start it manually.
If Printbuddy was installed from Git, update from the Git checkout:
cd C:\Printbuddy\printbuddy
git pullThen restart the service or start script:
Restart-Service PrintbuddyIf you are not using the Windows Service, stop the running PowerShell window and run Start-Printbuddy.ps1 again.
cd C:\Printbuddy
.\Start-Printbuddy.ps1Get-Service PrintbuddyGet-Content C:\Printbuddy\logs\runtime.log -Tail 100 -WaitGet-ChildItem C:\Printbuddy\logsGet-Content C:\Printbuddy\logs\runtime-error.log -Tail 100 -WaitStop-Service Printbuddy
sc.exe delete PrintbuddyClose other PowerShell windows or editors that have install.log open, then run the installer again.
Stop the Printbuddy service or close the manual start window before deleting or moving runtime logs.
Check the service status and runtime logs:
Get-Service Printbuddy
Get-Content C:\Printbuddy\logs\runtime-error.log -Tail 100Also verify that the configured port is free.
Stop-Service Printbuddy
sc.exe delete Printbuddy
.\windows-installer.ps1 -YesCheck internet access, DNS, and whether GitHub is reachable from the Windows host.
You can test Git manually:
git ls-remote https://github.com/vmhomelab/printbuddy.gitChoose another port:
.\windows-installer.ps1 -Port 8010If directory permission changes fail on a non-English Windows installation, run PowerShell as Administrator and use a simple install path such as:
C:\Printbuddy
Avoid installing into C:\Program Files unless you specifically need that layout.
- Run the installer from the official Printbuddy repository only.
- Review the script before running it in production.
- Use
-LocalOnlyif you do not want Printbuddy listening on the LAN. - Only open the Windows Firewall port on trusted networks.
- Keep the Windows host patched and restrict access to the Printbuddy UI.
After installation:
- Open Printbuddy in your browser.
- Create or complete the initial setup.
- Add your first printer.
- Configure backups before storing important archive data.
- Review firewall and authentication settings before exposing the instance beyond your local machine.