---
title: Generate a Private Key and a CSR 
slug: reference-guide-3-0-0/generate-a-private-key-and-a-csr
description: Learn how to generate a private key and certificate signing request (CSR) using the openssl command with this detailed document. Follow the step-by-step instructions to access the certification directory, run the necessary commands, and submit the CSR for
docTags: 
createdAt: 2022-08-01T11:36:37.000Z
---

This section provides commands to create a Private Key and a Certificate Signing Request (CSR). You can skip this step if you already have a valid certificate and key. 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/                                                                                                                                           &#x20;
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>**
