DEV Community


'1-click' install for Laravel + Voyager


  • Apache2
  • MySQL/MariaDB
  • PHP
  • Git
  • Composer


Hey, $user! Today I'll share with you how to install Laravel + Voyager with only "1-click". Well, you guessed it - it's a script. My script. There are many like it but this one is mine.

Anyway, for the ones who don't know what Voyager is - let me explain. Voyager is the ultimate admin panel for Laravel. I suggest you watch a quick video from DevDojo to get more understanding of why Voyager is a great ally to have on your side!

Only two things are required from you:

  1. Clone the script in directory of your choice (or wget it):
git clone
Enter fullscreen mode Exit fullscreen mode
  1. Run it.


I will not be doing a full walk-through for each line, yet I want to highlight some key points.


The Variables "section" is pretty straight forward. The only thing I want to pay attention here is the following:

DBPASSWORD="$(openssl rand -base64 12 | tr -d \"=/\")
Enter fullscreen mode Exit fullscreen mode

Sometimes when the password add the special characters '=; /; \;' the whole script crashes 🤷.

Voyager Install and Config

The word 'frustrated' would not be enough to express how I felt until I found where the problem is. I need you to remember the following line:

find /var/www/$SITE/laravel/config/app.php -type f -exec sed -i "168i TCG\\\\Voyager\\\\VoyagerServiceProvider::class," {} \;
Enter fullscreen mode Exit fullscreen mode

So what's the deal with it? Well, when you try to escape a character, usually you do one simple back-slash (\). However, when you want to escape a back-slash you have to enter 3 of these little guys. As a 'not-senior' guy, the debugging part was hell for me and I purged a lot of my time before I found the real problem. Anyway, when you want to escape \ , just turn it into \\\\ .


If we don't setup the permissions of our Laravel project, it will throw exceptions at us and we don't want that. We setup permissions.

"That's all, Folks"


Yup, that's all. I hope you find this handy. Bye!

Top comments (1)

bobbyiliev profile image
Bobby Iliev

Nice! Cool script! I will make sure to give it a try!

The DevOps Brief

Stay ahead of the game with this week's top posts from the DevOps ecosystem. Dive into three trendworthy articles covering various aspects of DevOps – security, containerized apps, and networking fundamentals.

mTLS everywhere!

Gain crucial insight on setting up mTLS throughout Apache APISIX – a popular API gateway. This comprehensive guide provides a step-by-step approach to configuring TLS in order to enhance the effectiveness and simplicity of your overall data infrastructure.

Deploy your Containerized App in 5 Minutes with Fly Machines

Discover Fly Machines' secret to agile app deployment even within a limited environment. Implemented on AWS, this brisk guide will help you deploy your microservices faster and more efficiently, without incurring additional roadblocks that adversely affect content output.

Deep Dive into AWS Networking Fundamentals for Aspiring Solutions Architects

Understand the essential networking essentials required for deploying, managing, and configuring the variety of resources available across AWS. Perfect for solutions architects, this in-depth look into primary AWS services such as VPC, Security Groups, NACLs, Routing, and Hybrid Cloud will aid you with practical methods for end-to-end network communication enforcement tasks.