Skip to content

Instantly share code, notes, and snippets.

@iamkoch
Forked from fredriks/setup-certbot.sh
Created July 28, 2017 10:52
Show Gist options
  • Save iamkoch/14ce57d1ac1370bcbbfd28fe420989bb to your computer and use it in GitHub Desktop.
Save iamkoch/14ce57d1ac1370bcbbfd28fe420989bb to your computer and use it in GitHub Desktop.
Certbot on Amazon Linux
#!/usr/bin/env sh
wget https://dl.eff.org/certbot-auto
chmod +x certbot-auto
unset PYTHON_INSTALL_LAYOUT
pip install virtualenv --upgrade --user
# Remove old installation
rm -rf ~/.local/share/letsencrypt
# Create swap file for space requirements (for low memory instances)
sudo fallocate -l 1G /tmp/swapfile
sudo chmod 600 /tmp/swapfile
sudo mkswap /tmp/swapfile
sudo swapon /tmp/swapfile
# Update letsencrypt
./certbot-auto -v --debug
# Remove swap file
sudo swapoff /tmp/swapfile
sudo rm /tmp/swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment