<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Akshat Mehta</title>
    <description>The latest articles on DEV Community by Akshat Mehta (@nerkoux).</description>
    <link>https://dev.to/nerkoux</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3956499%2F4aba0da2-abfb-4e52-adeb-72809f265f06.png</url>
      <title>DEV Community: Akshat Mehta</title>
      <link>https://dev.to/nerkoux</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nerkoux"/>
    <language>en</language>
    <item>
      <title>I Built a Beginner-Friendly NGINX Automation CLI for Linux Servers</title>
      <dc:creator>Akshat Mehta</dc:creator>
      <pubDate>Thu, 28 May 2026 11:35:56 +0000</pubDate>
      <link>https://dev.to/nerkoux/i-built-a-beginner-friendly-nginx-automation-cli-for-linux-servers-5elc</link>
      <guid>https://dev.to/nerkoux/i-built-a-beginner-friendly-nginx-automation-cli-for-linux-servers-5elc</guid>
      <description>&lt;p&gt;I’ve configured NGINX manually more times than I can count.&lt;/p&gt;

&lt;p&gt;Every server setup usually turns into the same repetitive process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;install nginx&lt;/li&gt;
&lt;li&gt;configure virtual hosts&lt;/li&gt;
&lt;li&gt;set up reverse proxies&lt;/li&gt;
&lt;li&gt;issue SSL certificates&lt;/li&gt;
&lt;li&gt;debug broken configs&lt;/li&gt;
&lt;li&gt;reload nginx carefully&lt;/li&gt;
&lt;li&gt;pray &lt;code&gt;nginx -t&lt;/code&gt; succeeds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And for beginners, it gets worse fast.&lt;/p&gt;

&lt;p&gt;Different Linux distros store configs differently.&lt;br&gt;
Certbot behaves differently depending on packages.&lt;br&gt;
One typo can break production.&lt;br&gt;
Rollback is usually manual.&lt;/p&gt;

&lt;p&gt;So instead of repeating the same setup process forever, I built &lt;strong&gt;EasyNGINX&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An automation-focused CLI that makes NGINX setup simpler, safer, and much faster across Linux distributions.&lt;/p&gt;


&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;EasyNGINX turns common NGINX operations into simple commands.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;easynginx create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That single command can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generate reverse proxy configs&lt;/li&gt;
&lt;li&gt;configure SSL automatically&lt;/li&gt;
&lt;li&gt;validate configs before reload&lt;/li&gt;
&lt;li&gt;open firewall ports&lt;/li&gt;
&lt;li&gt;enable HTTPS&lt;/li&gt;
&lt;li&gt;rollback safely if validation fails&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Designed for Real Servers
&lt;/h2&gt;

&lt;p&gt;One thing I specifically wanted to avoid was unsafe automation.&lt;/p&gt;

&lt;p&gt;Every operation follows this workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Snapshot → Write → nginx -t → Reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If anything fails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;configs rollback automatically&lt;/li&gt;
&lt;li&gt;nginx stays online&lt;/li&gt;
&lt;li&gt;backups remain available&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the goal wasn't just convenience — it was reducing risk.&lt;/p&gt;




&lt;h2&gt;
  
  
  Supported Use Cases
&lt;/h2&gt;

&lt;p&gt;EasyNGINX currently supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reverse proxies&lt;/li&gt;
&lt;li&gt;static hosting&lt;/li&gt;
&lt;li&gt;PHP-FPM&lt;/li&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;li&gt;redirects&lt;/li&gt;
&lt;li&gt;load balancing&lt;/li&gt;
&lt;li&gt;SSL certificate management&lt;/li&gt;
&lt;li&gt;backups &amp;amp; restore&lt;/li&gt;
&lt;li&gt;security hardening&lt;/li&gt;
&lt;li&gt;monitoring utilities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also works across multiple Linux distributions including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu&lt;/li&gt;
&lt;li&gt;Debian&lt;/li&gt;
&lt;li&gt;Fedora&lt;/li&gt;
&lt;li&gt;RHEL&lt;/li&gt;
&lt;li&gt;Rocky Linux&lt;/li&gt;
&lt;li&gt;AlmaLinux&lt;/li&gt;
&lt;li&gt;Arch Linux&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example Workflow
&lt;/h2&gt;

&lt;p&gt;Fresh VPS setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/nerkoux/EasyNGINX/main/install.sh | &lt;span class="nb"&gt;sudo &lt;/span&gt;bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;easynginx create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer a few prompts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Domain: api.example.com
Type: Reverse Proxy
Backend: http://127.0.0.1:3000
Enable SSL: Yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the site is live with HTTPS configured automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Features I Personally Wanted
&lt;/h2&gt;

&lt;p&gt;Some features were built specifically because I was tired of missing them in other tooling.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automatic Rollback
&lt;/h3&gt;

&lt;p&gt;Broken configs revert automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backup &amp;amp; Restore
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;easynginx backup
&lt;span class="nb"&gt;sudo &lt;/span&gt;easynginx restore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful for migrations and recovery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security Features
&lt;/h3&gt;

&lt;p&gt;Includes support for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HSTS&lt;/li&gt;
&lt;li&gt;fail2ban&lt;/li&gt;
&lt;li&gt;ModSecurity&lt;/li&gt;
&lt;li&gt;TLS profiles&lt;/li&gt;
&lt;li&gt;bot blocking&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cluster Deployments
&lt;/h3&gt;

&lt;p&gt;Deploy configurations across multiple servers with rollback support per host.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;Built using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Bash&lt;/li&gt;
&lt;li&gt;NGINX&lt;/li&gt;
&lt;li&gt;Certbot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Documentation is powered by Docusaurus and deployed using Vercel.&lt;/p&gt;




&lt;h2&gt;
  
  
  Open Source
&lt;/h2&gt;

&lt;p&gt;GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nerkoux/EasyNGINX" rel="noopener noreferrer"&gt;https://github.com/nerkoux/EasyNGINX&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Docs:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://easynginx.akshatmehta.com" rel="noopener noreferrer"&gt;https://easynginx.akshatmehta.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback, ideas, and contributors are always welcome.&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>linux</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
