Snippets

Giuliano Ribeiro AppEngine

Created by Giuliano Ribeiro last modified

Add HTTPS on your AppEngine app

https://certbot.eff.org/docs/using.html#manual

Install certbot

For Linux

user@webserver:~$ wget https://dl.eff.org/certbot-auto
user@webserver:~$ chmod a+x ./certbot-auto
user@webserver:~$ ./certbot-auto --help

For MacOS

$ brew install certbot

First things first

Execute certbot to get your certificate:

$ sudo certbot -a manual certonly  --preferred-challenges dns -d YOURDOMAIN.COM

You can use the --preferred-challenges option with other options, but the DNS is the easier. You'll get something like this:

sudo certbot -a manual certonly  --preferred-challenges dns -d mydomain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): MYEMAIL@SERVER.COM

-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for MYDOMAIN

-------------------------------------------------------------------------------
NOTE: The IP of this machine will be publicly logged as having requested this
certificate. If you're running certbot in manual mode on a machine that is not
your server, please ensure you're okay with that.

Are you OK with your IP being logged?
-------------------------------------------------------------------------------
(Y)es/(N)o: Y

-------------------------------------------------------------------------------
Please deploy a DNS TXT record under the name
_acme-challenge.MYDOMAIN.com with the following value:

LpOFvAwJfhSOMECODE7igfAjRXQN80y64SOMECODEhkyk72h4co

Before continuing, verify the record is deployed.
-------------------------------------------------------------------------------
Press Enter to Continue
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/MYDOMAIN/fullchain.pem. Your cert will
expire on DATE. To obtain a new or tweaked version of this
certificate in the future, simply run certbot again. To
non-interactively renew *all* of your certificates, run "certbot
renew"
- If you like Certbot, please consider supporting our work by:

Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
Donating to EFF:                    https://eff.org/donate-le

After have you new certificate on /etc/letsencrypt/live/MYDOMAIN/ go to you App Engine Console Settings pages (try follow this instructions https://cloud.google.com/appengine/docs/flexible/java/using-custom-domains-and-ssl).

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.