DEV Community

Abdelrahman Farag
Abdelrahman Farag

Posted on

How I set up a production AWS server in 5 minutes with one bash script

Every time I spin up a new EC2 instance I used to spend hours configuring the same things: Docker, Nginx, SSL, firewall. After 18 years as a DevOps engineer I finally automated all of it.
One command:
sudo bash setup.sh yourdomain.com you@email.com

It installs Docker, configures Nginx as reverse proxy, gets a Let's Encrypt SSL certificate with auto-renewal, and locks down the firewall. Works on Ubuntu 20.04 and 22.04.
I packaged it here if you want it: https://faragman31.gumroad.com/l/sgckzk
Happy to answer any questions in the comments.

Top comments (0)