Skip to main content

Deploying Laravel on Prostack Cito

Part 2 of our Cito series: how to get a Laravel app live on Cito, from empty server to production, plus a few extras that make life easier once you’re up and running.

Deploying Laravel on Prostack Cito

Jimmy Crutchfield

This is part two of our Cito series. In part one we looked at deploying WordPress. Here, we talk about the popular PHP framework Laravel.

Laravel is very popular with our agency customers, so we made sure Cito treats it as a first-class citizen. Under the hood, Cito runs Debian, nginx, MariaDB and PHP-FPM, which happens to be exactly the stack Laravel wants. Composer and Git come pre-installed, and Redis is available if you need it.

Here’s how to get a Laravel app live on Cito, from empty server to production, plus a few things that’ll make life easier once you’re up and running.

Creating the site

Log into Cito and click Create Site in the top right. Choose PHP as the site type. The wizard includes a quick-start option for Laravel, so pick that and Cito will configure the site correctly for you, including pointing the web root at Laravel’s public directory.

Enter your domain without the www. You can pick a username too, or leave it blank and we’ll generate one. Click Create Site and you’ll get:

  • The site’s username and home directory
  • A preview URL, so you can test before you touch DNS

Most Laravel apps need a database, so follow the link on the success screen to create a MySQL one. Keep the credentials handy for your .env file.

Getting your code onto the server

You’ve got a few options here.

Link a Git repository. You can connect a repo from GitHub, Bitbucket or elsewhere right in the Create Site wizard. See our Git guide for the details.

Clone it yourself. Every Cito site has its own system user and home directory. SSH in as the site user (your existing keys will work, as we copy the admin user’s keys across when the site’s created) and clone your repo:

ssh mysite@your-server
git clone [email protected]:youragency/yourapp.git .
composer install --no-dev --optimize-autoloader

One thing to get right from the start: always deploy as the site user, not admin. This applies to CI pipelines too. It keeps file permissions clean and saves you a debugging session later.

Deploy with AI. If you use Claude Code or Cursor, you can deploy straight from your local machine using our MCP server. More on that below.

Once your code is up, sort out your environment:

cp .env.example .env
php artisan key:generate
php artisan migrate

.env files are never deployed automatically (deliberately!), so you’ll set this up once on the server, either over SSH or with the built-in File Manager.

Going live

Test it first. Use the preview URL from the site creation screen to check everything works before pointing your domain anywhere.

Point your DNS. Add an A record pointing your domain at your Cito server’s IP. That’s it.

SSL sorts itself out. Cito issues Let’s Encrypt certificates automatically for any domain that resolves to your server, and renews them without you lifting a finger. If you’ve just updated DNS and don’t fancy waiting for the next automatic run, you can force it:

/.ps/scripts/certmon.sh

If you’re behind Cloudflare or another proxy, we won’t issue a certificate, because those services handle SSL themselves.

The Laravel extras

A Laravel app is more than the HTTP side, so here’s how the rest fits in.

Artisan works exactly as you’d expect. SSH in as the site user and run whatever you need: php artisan tinker, php artisan migrate, php artisan config:cache. If you’re logged in as admin, switch with sudo su - <username>.

The scheduler needs one cron job. You can add it through the dashboard (Site settings, then Cron Jobs) or over SSH with crontab -e -u <username>. Either way, the command is:

cd /home/<username>/public_html && php artisan schedule:run

Set it to run every minute (* * * * *) and Laravel handles the rest. If cron syntax makes your eyes glaze over, the dashboard has an AI generator that turns “every minute” into the right expression for you. And as with deployments, crons should run as the site user, never admin or root.

Queues and caching. Redis is supported on Cito, so you can point your cache, sessions and queues at it. If you need a persistent queue worker running, have a chat with Support and we’ll get you set up.

Managing your site with the MCP server

Cito has an MCP server (currently in beta) that connects Claude Code, Claude, Cursor and other AI tools directly to your Cito server. If you’re already using these tools day to day, this is a genuinely nice way to work.

Connecting Claude Code takes one command:

claude mcp add --transport http Cito https://mcp.prostack.uk/mcp

Then run /mcp in your Claude Code session to authenticate through the Prostack Portal. Once you’re connected, you can do things like:

  • Deploy a project. Say “deploy this project to Cito” and the model detects that it’s a Laravel app, offers to create a site with the right deployment profile, rsyncs your files and runs the relevant post-install commands like composer install. Sensitive files like .env and junk like node_modules are excluded automatically.
  • Spin up a staging copy. “Clone mysite.com to staging.mysite.com” copies the files and database so you can test changes safely.
  • Check logs without leaving your editor. “Show me the last 50 lines of the error log for mysite.com” pulls them straight into your session. Handy when you’re mid-debug and don’t want to context-switch.
  • Manage databases. “Create a MySQL database called app_db and add a read-only user to it.”

We’ve built guardrails into the destructive stuff. Deleting a site or database always requires confirmation, deployments use ephemeral SSH keys that are never written to disk, and the server can only run specific, framework-relevant commands. It’s still a beta and LLMs can be unpredictable, so review tool calls before approving them.

That’s it

You’ve got a Laravel app running on a tuned nginx and PHP-FPM stack, with automatic SSL, scheduled tasks ticking over, and (if you fancy it) an AI assistant that can deploy and debug for you.

If something’s missing or you’d like Cito to do more, we’d love to hear about it on our feedback site. And Support are always around if you get stuck.