No description
  • PowerShell 84.6%
  • Shell 13.4%
  • Batchfile 2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-26 23:05:32 +00:00
oem fix: configure static IP and hosts entry for mssql to resolve connection issues 2026-11-25 23:48:55 +00:00
scripts initial commit 2026-11-25 22:56:44 +00:00
.env.example feat: implement two-phase automated installation and default to Docker username 2026-11-25 23:15:45 +00:00
.gitignore chore: ignore apikey.txt in gitignore 2026-11-26 23:05:32 +00:00
docker-compose.yml refactor: migrate mssql storage from docker volume to bind mount with init service 2026-11-26 22:54:39 +00:00
README.md refactor: migrate mssql storage from docker volume to bind mount with init service 2026-11-26 22:54:39 +00:00

Passwordstate Server on Docker (Linux Host)

Run Click Studios Passwordstate as a Docker Compose stack on a Linux host without manually provisioning or managing a standalone Windows Server VM.

Architecture

Passwordstate requires Windows, IIS, .NET Framework 4.8.1, and Microsoft SQL Server, so it cannot run in a native Linux container. This stack pairs:

  1. mssql (mcr.microsoft.com/mssql/server:2022-latest) — Native Linux SQL Server 2022 container for the Passwordstate database.
  2. passwordstate (dockurr/windows:latest) — KVM-backed Windows Server 2022 container with automated OEM provisioning (oem/install.bat + oem/setup-passwordstate.ps1) that installs IIS, ASP.NET 4.8, .NET Framework 4.8.1, opens firewall ports 80/443, and stages Passwordstate.exe.

Prerequisites

  • Linux host with KVM enabled (/dev/kvm available)
  • Docker and Docker Compose v2
  • At least 4 GB RAM and 64 GB free disk space (plus space for SQL Server data)

Quick Start

  1. Configure environment variables:

    cp .env.example .env
    

    Edit .env and set strong passwords for MSSQL_SA_PASSWORD and WIN_PASSWORD.

  2. Download and verify passwordstate.zip:

    ./scripts/download-passwordstate.sh
    

    Compare the printed SHA-256 hash against the official Passwordstate Checksums page, or pass --sha256 <expected_hash> directly:

    ./scripts/download-passwordstate.sh --sha256 <expected_sha256>
    
  3. Start the stack:

    docker compose up -d
    
  4. Wait for automatic provisioning (two-phase):

    • On first boot, oem/install.bat runs oem/setup-passwordstate.ps1 (installs IIS, ASP.NET 4.8, .NET Framework 4.8.1, opens firewall ports 80/443, and extracts passwordstate.zip).
    • If .NET Framework 4.8.1 requires a reboot (exit code 3010), the VM automatically schedules oem/setup-phase2.ps1 at startup and reboots.
    • After reboot, setup-phase2.ps1 runs Passwordstate.exe /s silently and configures a self-signed HTTPS binding on port 443 if needed. (If the installer rejects silent mode, it registers Passwordstate.exe to launch automatically on desktop login.)
    • You can monitor progress via http://localhost:8006 (logs are written to C:\OEM\setup.log and C:\OEM\setup-phase2.log).
  5. Complete the web-based first-run setup:

    Open https://localhost/ (or https://<your-host-ip>/) in your browser and complete Passwordstate's initial setup wizard using:

    • Server Name: mssql
    • Authentication: SQL Server Authentication
    • Username: sa
    • Password: your MSSQL_SA_PASSWORD from .env

Persistence & Backups

  • ./data/mssql — SQL Server database files
  • ./data/windows — Windows Server virtual disk image (C:\inetpub\Passwordstate, web.config, IIS configuration)
  • Back up both ./data/mssql and C:\inetpub\Passwordstate\web.config (and your Passwordstate emergency recovery keys) regularly.