Server Configuration
This page will guide you with installing the generated certificates from Cloudflare on your server.
Please follow each step in order.
Step 0
Prerequisites
Section titled “Prerequisites”You have saved the
origin.pemand theorigin.keyfrom the Cloudflare configuration.
Step 1
Login as root
Section titled “Login as root”Learn how to set your root password
If you don’t have your root password yet, you probably received a one-time root password in your email when you purchased your server/VPS.
When connected, run:
Terminal window sudo passwd rootIt will ask you to enter a new password and confirm it.
After you have setup all the A-records in Cloudflare, login into your server/VPS.
You can use any SSH client (Termius, PuTTY, etc.).Switch to root by running
su root, then enter your password.Step 2
Create files for the SSL certificate
Section titled “Create files for the SSL certificate”Learn more about the nano command
Nano is a terminal text editor.
For pasting text, useCTRL + SHIFT + V
For copying text, useCTRL + SHIFT + CThe
/etc/folder is meant for system-wide config files. We’ll create/etc/ssl/cfand store the Cloudflare origin certificate + key there.First, create a folder for the files:
Terminal window mkdir /etc/ssl/cfNow create the certificate file
origin.pem:Terminal window sudo nano /etc/ssl/cf/origin.pemPaste your generated certificate from Cloudflare (CTRL + SHIFT + V).
Then pressCTRL + X, pressy, and press Enter to save.Create the private key file
origin.key:Terminal window sudo nano /etc/ssl/cf/origin.keyPaste the private key from Cloudflare, then save again with
CTRL + X,y, Enter.