# Laravel on a $5 VPS

> Deploy a Laravel app from Git to a small VPS with Vantuly: database, Redis, .env, migrations, queue workers and the scheduler set up for you.

Source: https://vantuly.com/docs/guides/laravel-on-a-vps

A Laravel app does not need an expensive host. A small VPS with 1 or 2 GB of memory, around $5 a month at many providers, runs a typical Laravel app well. This guide connects one to Vantuly and deploys your app from Git on every push.

**You need:** a fresh VPS with Ubuntu 24.04/26.04, Debian 12/13, Fedora 43/44 or Enterprise Linux 9 and at least 1 GB of memory (see [Server requirements](/docs/reference/requirements)), your app in a GitHub, GitLab or Bitbucket repository, and a Vantuly account. Vantuly is free for 2 servers.

## 1. Connect the server

1. Open **Servers → Add a server** and choose **Connect a server you already have**.
2. Enter a **Server name** and pick the **WordPress & PHP** stack (NGINX, PHP-FPM, MariaDB, Redis, WP-CLI and Composer).
3. Copy the install command and run it on the server as root.

Setup takes about two minutes. The server needs only outbound port 443 for the agent. A server with less than 2 GB of memory also gets a swap file, which helps Composer on a small machine. See [Connect your first server](/docs/start/connect-server).

No VPS yet? Vantuly can create one at [ten cloud providers](/docs/start/cloud-providers).

## 2. Create the Laravel site

Click **New site → Laravel**, pick a **PHP version** and the server. The site starts as an empty app served from `public/`, with its own MariaDB database, Redis user and `.env`.

## 3. Deploy from Git

1. On the site, click **Connect repository**, paste the repository address and pick the **Branch**.
2. Add the **Deploy key** and **Deploy webhook** Vantuly shows to the repository (see [Deploy from Git](/docs/guides/git-deploy)). On GitHub you can instead [deploy with a GitHub App](/docs/guides/github-app) and pick the repository from a list, with no key or webhook to add.
3. Turn on **Auto-deploy on push**, or click **Deploy now**.

The default deploy script for a Laravel site is:

```bash
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
php artisan migrate --force
php artisan storage:link
php artisan optimize
```

Each deploy builds a new release next to the running one and switches to it only when every step succeeds. If a step fails, the previous release keeps serving visitors. Edit the script in the site's settings.

## 4. Set your environment

Set your `.env` values (for example `APP_URL`, mail settings or API keys) in the site's **Environment** settings. The database and Redis are already filled in for you.

## 5. Queue workers and the scheduler

The site's **Laravel** tab has a **Queue workers and scheduler** section:

- **Queue workers** run as systemd services under the site's own Linux user and restart on every deploy. Failed jobs can be listed, retried or flushed from the same tab.
- **Scheduler** runs `php artisan schedule:run` every minute when turned on. No cron entry to write.

The **Laravel** tab also runs migrations, clears cached config and routes, puts the app in maintenance mode, and runs `artisan` commands (owners and admins).

## 6. Your domain and HTTPS

The site gets a free `vantuly.site` HTTPS address at once. To use your own domain, add it on the **Domains** tab and point an A record at the server. The Let's Encrypt certificate follows about 15 seconds after DNS matches. See [Add your own domain](/docs/domains/own-domain).

## Next

- [Laravel sites](/docs/apps/sites/laravel)
- [How backups work](/docs/backups): back up the database and files to your own storage.
- [Vantuly vs Laravel Forge](/compare/forge)
