The Power of Laravel Forge šŸš€

Daniel Ramirez
All Kinds Of Stories
3 min readMay 25, 2018

--

Manually provisioning your own VPS instances can be painful and time consuming, but Forge makes it simple.

Introduction

Back in the old days, way before Git or GitHub were widely adopted, we used whatā€™s called FTP/SFTP to transfer our codebase onto our servers directly. Nothing wrong with using FTP, but when it came down to working on team projects (2+ developers), FTP just didnā€™t cut it. Files would easily be overwritten and well, it was a nightmare to say the least. Hereā€™s an illustration on how this process went.

Using FTP to upload directly to your server.

This isnā€™t really a ā€œwhy you should use gitā€ post, so I will leave out convincing the git nay sayers. With git in our workflow, something needed to make the process from Git to our servers a little quicker, smoother and smarter.

Then Forge Came Along

Laravelā€™s creator, Taylor Otwell, created Forge to remove the pain and repetition of provisioning servers that are best suited for Laravel. Now, with the help of Forge, server provisioning will be the last thing on your mind; since it will seamlessly provision the servers for you, handle code deployments with zero-downtime, and take care of so much more without the need to SSH into your server yourself.

Forge provisions and deploys your Git repo onto your server(s).

Why is Forge So Good?

If youā€™re not experienced with provisioning servers directly from the SSH terminal, which means having to constantly search up ā€œhow to install thisā€¦?ā€ or ā€œwhat is thatā€¦?ā€, then Forge is what you should be using. Anything could go wrong during this phase ā€” like forgetting to utilize the super handy mysql_secure_installation tool which helps secure your MySQL database from attackers, or even worse, forgetting to secure your serverā€™s firewall.

Key Features

Forge: SSL certificate installation page

SSL Certificates šŸ”

If youā€™re a big fan of Cloudflareā€™s free SSL certificates, then Forge allows you to obtain a full (strict) SSL certificate from Cloudflare with just a few clicks. LetsEncrypt SSL certificates work too!

Code Deployment šŸš€

Push your code into any one of your favorite Git providers, such as (GitHub, GitLab, or Bitbucket), then Forge takes care of the deployment of your code onto any one of your servers. All you have to do to enable this nifty feature, is to toggle the ā€œEnable Quick Deployā€ button on your site details page.

Forge: Toggle the ā€œFilesā€ dropup to see your options.

Custom Configurations āš™ļø

Quickly edit your env and/or Nginx configuration right from within Forge. (e.g. setting up Basic HTTP Auth for your private staging sites)

Securing your Servers šŸ”‘

By default, Forge will generate secured passwords for both your SSH user and for MySQL (or which ever database you decide to use), your firewall is automatically configured by Forge, and any security updates that may come up ā€” Forge will take care of those for you too!

Conclusion

Although the somewhat hefty price tag may turn users down, itā€™s still worth trying out Forge for yourself and seeing just how powerful it can be. With that being said, Iā€™d like to thank Taylor for providing such a great service for developers like me who dislike the constant repetition of manually provisioning servers. Check out Forge at https://forge.laravel.com.

P.S. If you went to Laracon Online this year, thereā€™s a Forge coupon waiting for you here.

--

--