Home / Snippets / How to Retrieve Certificate and Private Key from Laravel Forge Server
How to Retrieve Certificate and Private Key from Laravel Forge Server cover

How to Retrieve Certificate and Private Key from Laravel Forge Server

540

2 years ago

0 comments

Sometimes you are in need to get the Private Key and Certificate from your Laravel Forge server and it's quite straightforward to retrieve the credentials.

Step 1: SSH Into your Laravel Forge Server


First thing first you need to access your Laravel Forge Server.
ssh forge@your-ip-address

Step 2: Retrieve it from the NGINX SSL Directory


And once you are logged in you will need to enter into your Nginx configuration. Usually it's located in the following directory
/etc/nginx/ssl/[your-domain-name]/[your-server-id]
Within those directories, you will typically see 2 files which are ".crt" and ".key".
server.crt  server.key
To view the certs, you can make use of the cat command.
cat server.crt
cat server.key
Hope this snippet helps and happy coding!
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this