<?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: Mehrdad Dadashi</title>
    <description>The latest articles on DEV Community by Mehrdad Dadashi (@mehrdad_dadashi_d4020898e).</description>
    <link>https://dev.to/mehrdad_dadashi_d4020898e</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%2F2453558%2F1a5bf326-050e-46f1-8e7e-e11ea7a352a9.png</url>
      <title>DEV Community: Mehrdad Dadashi</title>
      <link>https://dev.to/mehrdad_dadashi_d4020898e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mehrdad_dadashi_d4020898e"/>
    <language>en</language>
    <item>
      <title>🚀 Laravel Server Auto-Installer – Deploy Laravel on a Fresh VPS in Minutes!</title>
      <dc:creator>Mehrdad Dadashi</dc:creator>
      <pubDate>Fri, 15 Aug 2025 17:32:07 +0000</pubDate>
      <link>https://dev.to/mehrdad_dadashi_d4020898e/laravel-server-auto-installer-deploy-laravel-on-a-fresh-vps-in-minutes-322l</link>
      <guid>https://dev.to/mehrdad_dadashi_d4020898e/laravel-server-auto-installer-deploy-laravel-on-a-fresh-vps-in-minutes-322l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Setting up a production-ready Laravel server from scratch can be a real headache — from installing PHP and Nginx to configuring SSL, Redis, and MySQL, it can easily take hours.  &lt;/p&gt;

&lt;p&gt;I’ve been working with Laravel and server administration for over a decade, and I’ve faced this challenge countless times. That’s why I created a &lt;strong&gt;fully automated Laravel Server Installer&lt;/strong&gt;: a single Bash script that sets up your entire environment in under 10 minutes.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Script?
&lt;/h2&gt;

&lt;p&gt;If you’ve ever done a manual Laravel deployment, you know the pain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installing &amp;amp; configuring Nginx with PHP-FPM
&lt;/li&gt;
&lt;li&gt;Setting up MySQL securely
&lt;/li&gt;
&lt;li&gt;Enabling SSL with Let’s Encrypt
&lt;/li&gt;
&lt;li&gt;Installing Redis, Memcached, Composer, Node.js, and more
&lt;/li&gt;
&lt;li&gt;Configuring Supervisor for Laravel queues
&lt;/li&gt;
&lt;li&gt;Setting up backups and security
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This script &lt;strong&gt;handles all of that automatically&lt;/strong&gt; so you can focus on coding, not server setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;p&gt;✅ &lt;strong&gt;Nginx + PHP 8.3&lt;/strong&gt; with optimal PHP settings&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;MySQL&lt;/strong&gt; secure installation + optimization config&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Redis &amp;amp; Memcached&lt;/strong&gt; for caching&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;phpMyAdmin&lt;/strong&gt; integrated into the same vhost&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Let’s Encrypt SSL&lt;/strong&gt; via webroot method&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Supervisor&lt;/strong&gt; configuration for Laravel queues&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Daily automatic backups&lt;/strong&gt; (files + MySQL)&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Full logging&lt;/strong&gt; and saved credentials&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Swap memory setup&lt;/strong&gt; for better performance&lt;br&gt;&lt;br&gt;
✅ Ready for &lt;strong&gt;Ubuntu 20.04 &amp;amp; 22.04&lt;/strong&gt;  &lt;/p&gt;




&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠ &lt;strong&gt;Requirements:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fresh Ubuntu 20.04 or 22.04 server (root access)
&lt;/li&gt;
&lt;li&gt;A domain name pointing to your server’s IP
&lt;/li&gt;
&lt;li&gt;Basic knowledge of SSH
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Download the installer&lt;/span&gt;
wget https://raw.githubusercontent.com/mehrdad03/laravel-server-auto-installer/main/laravel-installer.sh

&lt;span class="c"&gt;# Make it executable&lt;/span&gt;
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x laravel-installer.sh

&lt;span class="c"&gt;# Run the installer&lt;/span&gt;
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./laravel-installer.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During installation, the script will:&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Ask&lt;/strong&gt; for your main domain and SSL email&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Install &amp;amp; configure&lt;/strong&gt; all required services&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Save&lt;/strong&gt; all generated credentials in &lt;code&gt;/root/server-credentials.txt&lt;/code&gt;&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Set up&lt;/strong&gt; automatic backups and security  &lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ How It Works
&lt;/h2&gt;

&lt;p&gt;Here’s what happens under the hood:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;System Preparation&lt;/strong&gt; – Updates packages, sets timezone, creates swap file
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Setup&lt;/strong&gt; – Firewall (UFW) configuration, SSH adjustments
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nginx &amp;amp; PHP&lt;/strong&gt; – Installs PHP 8.3 + extensions, configures Nginx vhost
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSL&lt;/strong&gt; – Automatically issues and configures Let’s Encrypt certificate
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MySQL&lt;/strong&gt; – Secure installation + optimization config file
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;phpMyAdmin&lt;/strong&gt; – Integrated and protected under &lt;code&gt;/phpmyadmin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching&lt;/strong&gt; – Redis &amp;amp; Memcached installation and tuning
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supervisor&lt;/strong&gt; – Config for Laravel queue workers
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developer Tools&lt;/strong&gt; – Composer, Node.js LTS, Yarn, PM2
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backup Setup&lt;/strong&gt; – Daily backup cron jobs for files and databases&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  📂 GitHub Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mehrdad03/laravel-server-auto-installer" rel="noopener noreferrer"&gt;&lt;strong&gt;Laravel Server Auto Installer – View on GitHub&lt;/strong&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;⭐ If you find it useful, please &lt;strong&gt;give the repo a star&lt;/strong&gt; — it really helps others discover the project.&lt;/p&gt;




&lt;h2&gt;
  
  
  👨‍💻 About the Author
&lt;/h2&gt;

&lt;p&gt;Hi, I’m &lt;strong&gt;Mehrdad Dadashi&lt;/strong&gt; — a Laravel specialist with over 7 years of coding experience.&lt;br&gt;&lt;br&gt;
I help developers and companies build high-performance Laravel apps.&lt;/p&gt;

&lt;p&gt;💬 &lt;strong&gt;Connect with me:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/mehrdad03/laravel-server-auto-installer" rel="noopener noreferrer"&gt;https://github.com/mehrdad03/laravel-server-auto-installer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn:&lt;/strong&gt; &lt;a href="https://www.linkedin.com/in/mehrdaddadashi/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/mehrdaddadashi/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>devops</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
