---
title: "Rest PKI Core - Setup on Windows Server"
description: "Installing an on-premises Rest PKI Core on Windows Server: binaries download, prerequisites (SQL Server, PKI SDK, Web PKI), database requirements and IIS."
canonical: "https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/on-premises/windows-server"
locale: "en"
product: "Rest PKI Core"
last_updated: "2026-10-12"
---

# Rest PKI Core - Setup on Windows Server

To install an *on-premises* instance of Rest PKI Core on Windows Server, first download the binaries of the desired version. The latest
version available is provided on the link below:

**[Rest PKI Core binaries package](https://cdn.lacunasoftware.com/restpkicore/restpkicore-5.0.0.zip)**

## Prerequisites

* Windows Server 2016 or later (any edition)
* SQL Server 2014 or later (Standard edition or higher recommended)
* PKI SDK license (in Base64 format)
* Web PKI license (binary/Base64 format)

## Database requirements

* Database with collation `Latin1_General_100_CI_AI` or `Latin1_General_CI_AI`
* Credentials of a user with the `db_owner` role

If you need help preparing the database, see [Preparing a database](https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/on-premises/prepare-database).

## Installation

1. Install IIS
1. Install the [ASP.NET Core Runtime 10.0 Hosting Bundle](https://dotnet.microsoft.com/download/dotnet/10.0)
   (section *ASP.NET Core Runtime*, item *Hosting Bundle* under *Windows*)
1. Create a folder for the IIS site. Example: `C:\inetpub\Rest PKI Core`
1. Create a folder for logs. Example: `C:\Logs`
1. Create the site on IIS
1. On the corresponding application pool:
   * Select **Basic Settings** and set the .NET CLR version to `No managed code`

     ![No managed code](https://docs.lacunasoftware.com/images/windows/no-managed-code.png)
   * Select **Advanced Settings** and set **Load User Profile** to `True`

     ![Load user profile](https://docs.lacunasoftware.com/images/windows/load-user-profile.png)

1. Extract the files of the binaries package to the site folder.

> **Warning**
>
> The ASP.NET Core Hosting Bundle must be installed after IIS; otherwise, you may get the error `500.19 (0x8007000d)` when running the site.
> If that is your case, run the **Repair** option of the Hosting Bundle installer.

## Configuration

1. Create the folder `C:\ProgramData\Lacuna Software\Rest PKI Core`
1. In the site folder, go to `config-templates\linux` and copy the `appsettings.conf` file to the folder you just created, renaming it to
   `appsettings.ini` ![as shown in the image](https://docs.lacunasoftware.com/images/windows/appsettings-rename.png)
1. Open `C:\ProgramData\Lacuna Software\Rest PKI Core\appsettings.ini` and fill in the settings as described in the file's comments, such as the
   database connection string (`[ConnectionStrings]`), the site URL (`[General]`) and the licenses (`[PkiSuite]`)
1. Add the blob storage section to `appsettings.ini` (see [Blob storage configuration](https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/on-premises/configure-blob-storage) for other options):

   ```ini
   [BlobStorage]
   Type=FileSystem
   Path=C:\Path\To\Storage
   ```
1. Save and close the file

## Generating the encryption key and the password hash

For the `EncryptionKey` setting of the `[General]` section, generate a 256-bit key used to encrypt sensitive data stored in the database.
Run the following command in the site folder (`C:\inetpub\Rest PKI Core`):

```sh
dotnet Lacuna.RestPki.Site.dll -- gen-enc-key
```

For the `RootPasswordHash` setting of the `[General]` section, choose a strong password for *root* access to the management interface and
compute its hash:

```sh
dotnet Lacuna.RestPki.Site.dll -- hash-root-pass
```

On IIS, start the site with the **Start** button on the right-hand panel.
