---
title: Generate a Private Key and a CSR 
slug: kronpam-reference-guide-3-5-0/generate-a-private-key-and-a-csr
description: Learn how to create a Private Key and Certificate Signing Request (CSR) with easy-to-follow commands in this comprehensive document. Master the process of generating key and CSR files by running openssl req command in the certification directory, and conf
docTags: 
createdAt: 2022-08-01T11:36:37.000Z
---

This section provides commands to create a Private Key and a Certificate Signing Request (CSR). If you already have a valid certificate and key, you can skip this step. Please replace the words **company-name** in the command lines with your company name.

To generate a private key and CSR:

1. Access the certification directory with the command:
   cd /u01/netright-tomcat/conf/cert/
2. Run the command below for the key and CSR files:
   openssl req -newkey rsa:2048 -nodes -keyout **\<company-name.key>** -ou&#x74;**&#x20;\<company-name.csr>**
3. Submit the CSR to your preferred signing authority to receive your certificate. Alternatively, if you want to operate with a self-signed certificate, run the following command to generate a self-signed certificate from your Private Key and CSR:
   openssl x509 -signkey **\<company-name.key>** -in **\<company-name.csr>** -req -days 365 -out **\<company-name.crt>**

