Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahoi's avatar
Level 5

Create a web installer for a Laravel-app or even deploy it using FTP

Hi there,

I am facing a situation where a Laravel-app I created needs to be installed on dozens of remote servers. Those target-servers provide FTP-access, sometimes SSH and always a database-server.

All these Laravel-apps should be managed by a "main app", which is also built with Laravel.

Now I am wondering, whether I can create a good solution to:

  1. install the Laravel-app the best way
  2. deploy updates

Those are my thoughts on that:

As the app does not need to run queues or schedulers, the setup itself should be no problem on the remote-site. I could generate an .env-file with pre-filled values regarding database-access and automatically upload it using another Laravel-app ( = "main app").

As it is not always possible to run composer on those remote targets, I'd need to prepack /vendor and all the static assets.

But I can not run migrations when I do not have access to the shell. So I wondered if I could do that by publishing a protected /install and /update-route.

But what would be the best and most secure way to provide these routes? Or are there even better approaches I can try?

Edit: Please note my post down here: https://laracasts.com/discuss/channels/general-discussion/create-a-web-installer-for-a-laravel-app-or-even-deploy-it-using-ssh?page=1&replyId=851634

The latest answers are completely correct but they don't solve my problem: I can't create a multi-tenant-app, as this app has to run on different servers, which I do not own. I only get a web hosting-account that allows me to deploy a PHP-app using FTP.

0 likes
9 replies
jlrdw's avatar

Have you considered using a multi-tenant app.

ahoi's avatar
Level 5

@jlrdw thanks for your answer. Unfortunately this is not a solution. But indeed: I should have specified my needs a bit more, so I updated the initial post.

Sinnbeck's avatar

Why not just use vps for all the servers? Then they are all exactly the same and comes with ssh. Sounds like you want to deploy to different shared hosting sites which is a disaster waiting to happen

ahoi's avatar
Level 5

@Sinnbeck Thanks for your reply. Unfortunately I do not own the servers and I don't control them. All I got is FTP-credentials, a subdomain and database-credentials.

However, I should have mentioned that in my initial posting. I updated it now.

Sinnbeck's avatar

@ahoi Ok then I would start by getting an account with each shared hosting provider and find out how to set up laravel on each and every one (hopefully they all work the same). Then once you are sure it works on all of them, you can revisit how to automate it. Be aware that getting laravel working on shared hosting can be tricky, and often the solution on one host, does not work with another.

ahoi's avatar
Level 5

@Sinnbeck agreed. But as I don't need the scheduler or queues, the most annoying things when it comes to shared hosting should not be necessary.

I thought about evaluating how OctoberCMS or WinterCMS are dealing with this issue - both are using a web installer, right?

ahoi's avatar
Level 5

@Tray2 thank you for your reply.

I updated my question as it did not contain the fact that I do not control the servers I need to deploy that app.

So I somehow need to build a "pre-packed" Laravel-app and deploy it.

ahoi's avatar
Level 5

Thank you all for your answers.

And you are right: The best way would be to have a multi-tenant-app or at least a deployment on forge.

I missed to elaborate on my issue a bit more: The goal is to deploy the very same app on multiple web hosting-accounts to perform measurements on those. So unfortunately I can not control the hosts and I have to deploy the Laravel-app as "pre-packed" app.

Please or to participate in this conversation.