Deploy a Laravel Backend and a MySQL Database From Your Browser
All posts
Guide#laravel

Deploy a Laravel Backend and a MySQL Database From Your Browser

Cloudpen Team

Cloudpen Team

October 16, 2026·3 min read

A static preview is nice. A real backend running at a permanent URL is better. Cloudpen's one-click Deploy now handles PHP/Laravel projects as persistent, always-on apps, and pairs them with a hosted MySQL database you can create from the same editor.

How a Laravel deploy works

When you click Deploy, Cloudpen looks for a backend signature: a composer.json, an artisan file, or an index.php. If it finds one, your project is deployed as a backend instead of a static build:

  1. Your files are copied into a dedicated deployment directory
  2. A private container starts, running PHP-FPM 8.2 with your project mounted as its working directory
  3. Cloudpen bootstraps the environment for you: it writes your environment variables into .env, generates an APP_KEY if needed, runs composer install when vendor/ is missing, and clears cached config
  4. A health check confirms the app is actually responding before traffic is routed to it

Your app then runs continuously at https://yourproject.cloudpen.dev, with an SSL certificate provisioned automatically. Every deployment is sandboxed with its own CPU and memory limits, so another project's traffic spike cannot affect yours.

A hosted MySQL database, per project

Choose Add Database in your project and Cloudpen creates:

  • A dedicated MySQL database that belongs to that project
  • A scoped database user with access to that one database only, with no server-wide privileges

If you deploy a backend for the same project, the database credentials are written into your app's .env automatically. To inspect your data, click Manage Database and you land in phpMyAdmin with no separate login, using a short-lived one-time token.

Debug with the Logs tab

Next to Terminal and Output you will find a Logs tab. It lists every log file your app has actually written, newest first. If your Laravel LOG_CHANNEL is set to daily, each day shows up as its own file, and a Refresh button pulls the latest without leaving the page.

Environment variables, handled once

Set variables once in the Environment Variables Manager and they are available in your terminal, when you hit Run, and in your deployed build. Values are encrypted at rest with AES-256 and masked by default.

What to know before you start

  • Backend deployment and hosted databases are available on paid plans. Your Billing or Add-ons page shows your exact allowance, and add-ons exist if you need more slots or databases
  • Other backend frameworks (Node/Express, Django, Flask, Rails and so on) are not supported by one-click Deploy yet. For those, use SFTP Hosting Deploy to push to your own VPS, cPanel or DirectAdmin account
  • Connecting to a Cloudpen-hosted database from outside Cloudpen is on the roadmap, along with PostgreSQL support
  • Node.js/Express, Python and Next.js (SSR) are next in line for Deploy

Laravel developers no longer need a separate hosting account just to get a project online. Open a project, click Deploy, and you are live.

Deploy a Laravel Backend and a MySQL Database From Your Browser — Cloudpen Blog