Description
Reproduced on Windows 21H2 (OS build 20348.2159)
coder server
fails to start with the error:
Error: Failed to start built-in PostgreSQL. Optionally, specify an external deployment with --postgres-url: unable to init database using 'C:\Users\info\AppData\Roaming\coderv2\postgres\bin\bin\initdb.exe -A password -U coder -D C:\Users\info\AppData\Roaming\coderv2\postgres\data --pwfile=C:\Users\info\AppData\Roaming\coderv2\postgres\runtime\pwfile': exit status 0xc0000135
Steps to reproduce on a fresh machine:
- Download the Coder MSI from https://github.com/releases
- Open PowerShell
- Run
coder server
with no further arguments
After performing the following steps, coder server
started successfully:
- Download PostgreSQL installer from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
- Run MSI and only select "Command Line Tools" when prompted to select components.
Possible solutions:
- Bundle the required libraries to run embedded postgres in our MSI,
- Update install documentation to include the above two steps.
Update: installing vcredist libraries also solves the issue.
Simple one-liner: https://vcredist.com/quick/