Skip to content

Kavita Installation Script for Windows

cpx June 16, 2025 1 min read Service Management
# Kavita Installation Script for Windows # Run this script as Administrator # Check if running as Administrator if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Write-Host "This script must be run as Administrator. Please restart PowerShell as Administrator and try again." -ForegroundColor Red exit 1 } Write-Host "Installing Scoop package manager..." -ForegroundColor Green # Install Scoop with RunAsAdmin flag iex "& {$(irm get.scoop.sh)} -RunAsAdmin" # Refresh environment variables $env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User") Write-Host "Adding extras bucket..." -ForegroundColor Green scoop bucket add extras Write-Host "Installing shawl and kavita..." -ForegroundColor Green scoop install shawl kavita # Get current username $currentUser = $env:USERNAME Write-Host "Setting up Kavita as Windows service..." -ForegroundColor Green # Create Windows service using shawl (fixed the typo in %usee% to %user%) shawl add --name Kavita --cwd "C:\Users\$currentUser\scoop\apps\kavita\current" -- "C:\Users\$currentUser\scoop\apps\kavita\current\Kavita.exe" Write-Host "Configuring service to start automatically..." -ForegroundColor Green sc config Kavita start=auto Write-Host "Starting Kavita service..." -ForegroundColor Green sc start Kavita Write-Host "Installation complete!" -ForegroundColor Green Write-Host "Kavita should now be running as a Windows service and will start automatically on boot." -ForegroundColor Yellow Write-Host "You can access Kavita at http://localhost:5000 (default port)" -ForegroundColor Yellow
0 0 votes
Article Rating
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x