---
title: "Lacuna PSC command: **gen-enc-key**"
description: "Reference for the Lacuna PSC gen-enc-key command, which generates a random 256-bit key for the General__EncryptionKey setting that encrypts sensitive data."
canonical: "https://docs.lacunasoftware.com/en-us/articles/psc/on-premises/tool/gen-enc-key"
locale: "en"
product: "PSC"
last_updated: "2026-07-14"
---

# Lacuna PSC command: **gen-enc-key**

## Name

`gen-enc-key` - Generates a random encryption key (to encrypt sensitive database columns)

## Syntax

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

Or, on Docker:

```sh
docker run lacunasoftware/psc:1.2 -- gen-enc-key
```

## Description

The `gen-enc-key` generates a 256-bit encryption key to be used on the setting `General__EncryptionKey`, which is used by Lacuna PSC to encrypt sensitive data
stored on the database.

## See also

* [Lacuna PSC command-line tool](https://docs.lacunasoftware.com/en-us/articles/psc/on-premises/tool)
