May 15, 2024

1-click install for Laravel + Voyager

Check out DigitalOcean

DigitalOcean Holdings, Inc. is an American multinational technology company and cloud service provider. The company is headquartered in New York City, New York, US, with 15 globally distributed data centers. DigitalOcean provides developers, startups, and SMBs with cloud infrastructure-as-a-service platforms.


  • 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 https://github.com/47ontech/voyager_with_laravel.git
  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 \"=/\")

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," {} \;

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!

Latest Comments

  • No comments yet.

More From This User

1 0 2
Read Now
0 0 7
Read Now
0 0 25
Read Now
1 0 5
Read Now
0 0 16
Read Now

© 2024 Geeklore - DEV Community RPG

Facebook Twitter Linkedin Instagram