After you obtained your Cloudflare API Token, you need to put it in a file called certbot.ini in your server with format like below:
you can use your text editor or this command below to write it into a file directly
Generate SSL
After you finished previous steps, now we need to generate the SSL.
You can do it by executing below command:
It will generate a wildcard SSL. If you want a subdomain specific, you can replace the * symbol with your subdomain (e.g. crossfi-testnet-api.cryptonode.id)
The default location of the certificates are /etc/letsencrypt/live/cryptonode.id/fullchain.pem for the public key and /etc/letsencrypt/live/cryptonode.id/privkey.pem for the private key
Re-Configure NGINX to use SSL
In Routing using NGINX, we've already set up our domain to point to correct endpoint. But it's still using HTTP. Now, we will set it up so we can use HTTPS.
Edit your config by opening your previous config with this command
And replace the config with this
Repeat the same process for other endpoints and you will have all of your endpoints with SSL enabled