Hosting gestionado para Laravel
Despliega una aplicación Laravel en un servidor gestionado con MySQL, workers de colas y el scheduler ya conectados.
Conecta tu repositorio de GitHub desde tu panel, elige la rama y despliégalo. Consulta «Cómo desplegar una aplicación web desde GitHub» para ver los pasos exactos.
- Versiones compatibles
- 8.4, 8.3, 8.2
- Modo de ejecución
- Se ejecuta como proceso gestionado y siempre activo
Colas y scheduler
Los workers en segundo plano y el scheduler de Laravel se ejecutan como procesos gestionados y supervisados.
MySQL incluido
Se aprovisiona una base de datos MySQL dedicada junto a tu aplicación.
Despliegues sin tiempo de inactividad
Cada despliegue es una nueva versión aislada con una comprobación de salud antes de pasar a producción.
Cómo funciona este despliegue
Cómo detectamos tu proyecto
- Un archivo artisan en el repositorio
- El paquete laravel/framework en composer.json
Qué ocurre en cada despliegue
-
Paso de compilación
composer install --no-dev --no-interaction --optimize-autoloader -
Paso de compilación
php artisan optimize:clear -
Comando de inicio
php artisan serve --host=0.0.0.0 --port=9000 - La aplicación escucha en el puerto 9000
- Una nueva versión se publica solo cuando /up supera la comprobación de estado
- Se admiten procesos en segundo plano y tareas programadas
Variables de entorno
-
Laravel application encryption key. (generada automáticamente)
APP_KEY -
Password for the provisioned application database user. (generada automáticamente)
DB_PASSWORD
Base de datos
- MariaDB 11.4 se aprovisiona junto a tu aplicación y no es accesible públicamente
-
Los ajustes de conexión se inyectan como variables de entorno
DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME
Almacenamiento persistente
-
Estas rutas se conservan entre despliegues
storage/app, storage/logs, storage/framework, storage/framework/cache, storage/framework/sessions, storage/framework/testing, storage/framework/views, bootstrap/cache
Recursos mínimos
- 0.5 vCPU, 512 MB de memoria, 2000 MB de almacenamiento
What you get when you host Laravel on MoodLensAI
The Laravel preset is built for the way real Laravel applications run in production. Your code is installed with Composer without development packages, the application is served as a managed process, a MariaDB database is provisioned next to it, and the queue worker and the scheduler run as supervised background processes. You do not install PHP, configure a web server or write a systemd unit.
Each deploy is a new, isolated release. It goes live only after the /up health route answers, so a release that crashes on boot never replaces the one that works.
Preparing your repository
Detection is automatic when the repository contains an artisan file and lists laravel/framework in composer.json. Before the first deploy it is worth checking a few points.
- The /up route must respond. Recent Laravel versions register it by default, and the release only goes live after it answers.
- Your composer.json must install cleanly without development dependencies, because the build uses the no-dev option.
- Do not commit your .env file. Configuration is supplied through environment variables from your dashboard.
- Use the database connection variables that Laravel already reads, so the injected settings are picked up without code changes.
- Pick a PHP version from the supported list shown above: 8.4, 8.3 or 8.2.
Environment variables and the database
The application key and the database password are generated for you. The connection settings, namely DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE and DB_USERNAME, are injected as environment variables, so Laravel's standard database configuration works without edits. The database is not exposed to the public internet and is reachable only from your own application.
Anything specific to your project, such as mail credentials, payment keys or third-party API tokens, you add yourself before deploying. Keep them out of the repository and out of your commit history.
Queues and the scheduler
Background work is a first-class part of the preset. Queue workers run as supervised processes, so a worker that exits is restarted rather than left dead. The Laravel scheduler runs the same way, which means the scheduled commands you define in your application are executed on time without a cron entry that you maintain yourself.
Workers are long-running processes, so plan your queue changes the way you would anywhere else: after you ship a change to a job class, confirm over SSH that the worker is running the new release and not an older one.
Storage, migrations and Artisan
Because every deploy is a fresh release, only certain paths are kept between releases. For Laravel these are storage/app, storage/logs, the storage/framework directories and bootstrap/cache. Uploaded files that you keep under storage/app survive a redeploy, while anything you write elsewhere in the project folder does not.
The build steps run composer install and clear the optimization caches. Database migrations are not part of those steps, so you run them yourself over SSH, which is included on every plan. The same connection lets you run any other Artisan command, open Tinker or inspect logs.
Sizing and what to expect
The minimum footprint of a Laravel deployment is a half share of one vCPU, 512 MB of memory and 2000 MB of storage. That is enough for a small application, an internal tool or an early product. If your queue workers, image processing or reports need more headroom, choose a larger plan instead of squeezing a heavy workload into the smallest one.
Custom domains are supported with one hostname per deployment. You add a single A record at your own DNS provider, MoodLensAI verifies it and issues the SSL certificate automatically. Backups run on a schedule and are stored off the server, so a restore is possible even if the server itself is lost.
A typical first deploy
A first Laravel deploy usually takes four moves. Connect the repository and choose the branch. Confirm that the Laravel preset was detected and pick a PHP version. Add the variables that are specific to your project, for example mail settings or a payment provider key. Start the deploy and watch the output until the health check passes.
Once the release is live, open an SSH session, run your migrations and any seeders you need, and load the site. From then on, a normal change is a commit, a push and a new deploy. Because each release is health-checked before it goes live, you can ship small changes often without worrying that one mistake takes the site down.
Troubleshooting a Laravel deploy
Most failed Laravel deploys come from three causes. A health check that fails after a successful build usually means the application crashes on boot, often because a required variable is missing, so check the output for an exception about the key or the database. A build that stops during Composer installation usually points at a dependency that is only available in development. A release that starts but shows errors on pages that need the database often means migrations have not been run yet.
If you are weighing this against running your own server, the comparison of managed hosting and a VPS lays out what you take on in each case, and the Laravel Cloud alternative page compares this setup with Laravel's own platform.
Páginas relacionadas
- Hosting gestionado para Next.js
- hosting de apps React
- hosting de apps Vue
- Hosting gestionado para Django
- Hosting gestionado para FastAPI
- Hosting gestionado para Node.js
- Hosting gestionado para n8n
- Hosting gestionado de apps
- Despliegue desde GitHub
- Guías
- Copias de seguridad
- Seguridad
- Alojamiento gestionado vs VPS
- Alternativa a Laravel Cloud
Preguntas frecuentes
¿Qué versiones de Laravel se admiten?
Las versiones compatibles indicadas arriba reflejan aquello contra lo que realmente compila y prueba el pipeline de despliegue.
¿Puedo ejecutar comandos de Artisan?
Sí, mediante acceso SSH, que está incluido en todos los planes.