post-image

Deploy a secure backend with just one command

13 July, 2024

I have had this problem where I've my backend service ready, and to deploy it on an AWS machine; I have to go through a series of repetitive steps that require almost half an hour:

  • Configure a subdomain to point to that machine (eg. api.example.co)

  • Spin up the backend code on some port of the machine

  • Install NGINX, setup a server block, a reverse proxy to listen for the backend service port on port 80

  • Install and run certbot via pip (Amazon Linux 2023 has a problem installing snap)

So I developed AutoSSLx - a CLI tool that automates all these tasks for you. No download/setup required for the tool. Just run 1 command (given on the repo's README) and some couple params. That's it!

Thought of making this with Golang but it would have been an overkill, plus I wanted the script to run without setting up any binaries and something which people can easily modify according to their needs - so I decided to go with bash.

All the time that went into setting up the backend is now done in just one command and in a few minutes! Although still not as easy and fast as deploying on Vercel/Netlify but one step closer.

Get notified when I post!