---
title: How to Deploy a TALL Stack Application with Vultr's Laravel Marketplace App
url: https://docs.vultr.com/how-to-deploy-a-tall-stack-application-with-vultr-s-laravel-marketplace-app
description: Learn how to quickly deploy a TALL Stack (Tailwind CSS, Alpine.js, Laravel, Livewire) application using Vultr's Laravel Marketplace App with this step-by-step guide.
publish_date: 2025-10-10T17:43:45.937938Z
last_updated: 2025-10-15T20:52:13.790000Z
author: Syam Sarosa
header_image: https://assets.vultrdevrel.com/docs-main-doc-assets-1/2340/41430468-61fb-4a9f-a2e6-94ce27855779.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

The TALL stack combines Tailwind CSS, Alpine.js, Laravel, and Livewire to create a modern full-stack framework for building responsive, reactive applications. Laravel handles the backend, Tailwind provides utility-first CSS, Alpine.js adds lightweight frontend reactivity, and Livewire allows developers to build dynamic and reactive user interfaces with PHP. Vultr's Laravel Marketplace Application provisions a ready-to-use Laravel environment on Ubuntu LTS in just minutes.

This article explains deploying a TALL stack application on Vultr using the Laravel Marketplace App. You will install Node.js, configure a MySQL database, deploy a sample TALL application, set proper file permissions, configure Apache with a virtual host, verify each TALL stack component works correctly, and set up a TLS certificate to enable HTTPS.

## Prerequisites

Before you begin:

* Deploy a [Laravel Marketplace App](https://docs.vultr.com/how-to-use-vultr-s-laravel-marketplace-application) on Vultr.
* [Access the server via SSH](https://docs.vultr.com/how-to-use-ssh-with-vultr-servers) as [a non-root user with sudo privileges](https://docs.vultr.com/how-to-create-a-sudo-user-in-linux#create-a-sudo-user).
* Create a domain A record pointing to your server's IP address. For example, `app.example.com`.

## Install Node.js

The Laravel Marketplace App includes Apache, PHP, MySQL, Composer, and Git. Install Node.js to build Tailwind CSS assets.

1. Download and install Node Version Manager (NVM) to manage Node.js versions.

    ```console
    $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
    ```

    You can first run the command without `| bash` to review the script before execution.

1. Reload your shell configuration to make NVM available in your current session.

    ```console
    $ source ~/.bashrc
    ```

1. Install the latest LTS version of Node.js.

    ```console
    $ nvm install --lts
    ```

1. Verify the Node.js installation.

    ```console
    $ node -v
    ```

    Output:

    ```
    v22.19.0
    ```

1. Verify the NPM installation.

    ```console
    $ npm -v
    ```

    Output:

    ```
    10.9.3
    ```

## Prepare the Database

Your TALL application requires a database. Follow these steps to secure MySQL, create a new user and database, and grant the user permission to manage it.

1. Run the MySQL secure installation script to disable insecure default settings and enable authentication on your database server.

    ```console
    $ sudo mysql_secure_installation
    ```

    Reply to the following MySQL database server options when prompted:

    * **VALIDATE PASSWORD COMPONENT**: Enter :key_y: to enable strict password policies on the database server.
    * **Password strength policy**: Enter `2` to enable multi-character passwords and dictionary usage on the server.
    * **Change the password for root**: Enter :key_y: to change the MySQL root password.
    * **Remove anonymous users**: Enter :key_y: to remove anonymous database users.
    * **Disallow root login remotely**: Enter :key_y: to disable `root` remote login access.
    * **Remove test database**: Enter :key_y: to delete the MySQL test database on your server.
    * **Reload privileges tables now**: Enter :key_y: to reload the MySQL privilege tables and apply your configuration changes.

1. Login to your MySQL shell as `root` user.

    ```console
    $ mysql -u root -p
    ```

1. Create a database. Replace `tallisman` with your desired database name.

    ```sql
    mysql> CREATE DATABASE tallisman;
    ```

1. Create a new MySQL user. Replace `vultr` with your desired username and `Strong@@password123` with your desired password.

    ```sql
    mysql> CREATE USER 'vultr'@'localhost' IDENTIFIED BY 'Strong@@password123';
    ```

1. Give the `vultr` user permission to manage the `tallisman` database.

    ```sql
    mysql> GRANT ALL ON tallisman.* TO 'vultr'@'localhost';
    ```

1. Exit the MySQL shell.

    ```sql
    mysql> EXIT;
    ```

1. Test the connection with the `vultr` user. Enter your password when prompted.

    ```console
    $ mysql -u vultr -p
    ```

1. Verify the databases that the `vultr` user can access.

    ```sql
    mysql> SHOW DATABASES;
    ```

    Output:

    ```
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | performance_schema |
    | tallisman          |
    +--------------------+
    3 rows in set (0.00 sec)
    ```

1. Exit the database.

    ```sql
    mysql> EXIT;
    ```

## Prepare the TALL Application

The Laravel Marketplace Application provides a fresh Laravel installation. In this step, you'll replace the default application with a sample application already preinstalled in the TALL stack.

1. Navigate to the Apache document root and remove the default Laravel application.

    ```console
    $ cd /var/www/html/
    $ sudo rm -rf my-laravel-app/
    ```

1. Clone the sample TALL repository.

    ```console
    $ sudo git clone https://github.com/syamsarosa/tallisman.git
    ```

1. Change the ownership of the `tallisman` directory to your user and the `www-data` group.

    ```console
    $ sudo chown -R $USER:www-data tallisman/
    ```

    This sets the owner to your user and the group to `www-data`, giving both you and Apache permission to manage the application.

1. Navigate to the `tallisman` directory.

    ```console
    $ cd tallisman/
    ```

1. Copy `.env.example` to `.env`.

    ```console
    $ cp .env.example .env
    ```

1. Configure the database connection in the `.env` file.

    ```console
    $ nano .env
    ```

    Update `DB_DATABASE`, `DB_USERNAME`, and `DB_PASSWORD` with the values created earlier:

    ```ini
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=tallisman
    DB_USERNAME=vultr
    DB_PASSWORD=Strong@@password123
    ```

    Save and close the file.

1. Install backend dependencies.

    ```console
    $ composer install
    ```

1. Install frontend dependencies.

    ```console
    $ npm install
    ```

1. Generate the application key. Laravel uses this key to encrypt data within your application.

    ```console
    $ php artisan key:generate
    ```

1. Run database migrations.

    ```console
    $ php artisan migrate
    ```

1. Build the frontend assets for production.

    ```console
    $ npm run build
    ```

    This compiles your Tailwind CSS and JavaScript assets, creating the necessary files in the `public/build` directory.

## Secure the Laravel Application for Production

Before going live, secure the application by configuring file permissions and Apache.

### Set Correct File and Folder Permissions

Laravel requires correct file and folder permissions to run securely. Files must be readable, directories accessible, and the `storage` and `bootstrap/cache` directories writable by the web server.

1. Change all file permissions to `644`.

    ```console
    $ sudo find . -type f ! -path "*/node_modules/*" -exec chmod 644 {} \;
    ```

    This ensures files are not executable unless specifically needed.

1. Change all directory permissions to `755`.

    ```console
    $ sudo find . -type d ! -path "*/node_modules/*" -exec chmod 755 {} \;
    ```

    This allows users to enter and traverse directories.

1. Change the group ownership of the `storage` and `bootstrap/cache` directories to `www-data`.

    ```console
    $ sudo chgrp -R www-data storage bootstrap/cache
    ```

    This gives the web server access to manage these directories.

1. Grant full permissions to the owner and group for `storage` and `bootstrap/cache`.

    ```console
    $ sudo chmod -R ug+rwx storage bootstrap/cache
    ```

    These directories must be writable so Laravel can store logs, cache, and compiled views.

1. Clear Laravel's cached files.

    ```console
    $ php artisan optimize:clear
    ```

    Running this after permission changes ensures Laravel can rebuild its cache without errors.

### Create Apache Virtual Host

Apache uses virtual hosts to define how to serve websites. By creating a custom virtual host for your Laravel app, you can disable Apache directory listing and ensure the server points directly to Laravel's `public` directory.

1. Disable the default virtual host.

    ```console
    $ sudo a2dissite my-laravel-app.conf
    ```

    Output:

    ```
    Site my-laravel-app disabled.
    ```

1. Navigate to Apache's site configuration directory.

    ```console
    $ cd /etc/apache2/sites-available/
    ```

1. Create a new virtual host file.

    ```console
    $ sudo nano tallisman.conf
    ```

1. Add the following configuration:

    ```ini
    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/tallisman/public
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <Directory /var/www/html/tallisman>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        <Directory /var/www/html/tallisman/public>
            Options -Indexes +FollowSymLinks
            AllowOverride All
            Require all granted

            <FilesMatch \.php$>
                SetHandler application/x-httpd-php
            </FilesMatch>
        </Directory>
    </VirtualHost>
    ```

    Save and close the file.

1. Test the Apache configuration for errors.

    ```console
    $ sudo apache2ctl configtest
    ```

1. Enable the virtual host.

    ```console
    $ sudo a2ensite tallisman.conf
    ```

1. Reload Apache to apply the virtual host changes.

    ```console
    $ sudo systemctl reload apache2
    ```

1. Visit `http://your-server-ip/` in your browser to view the application.

## Verify the TALL Stack Components

After deploying your application, verify that each component of the TALL stack is functioning correctly.

### Test Tailwind CSS

Tailwind CSS provides utility-first CSS classes that allow you to style elements directly in your HTML. Follow these steps to verify Tailwind is working:

1. Navigate to the `tallisman` directory.

    ```console
    $ cd /var/www/html/tallisman/
    ```

1. Open the welcome view file.

    ```console
    $ nano resources/views/welcome.blade.php
    ```

1. Modify the heading by adding Tailwind classes.

    ```html
    <h1 class="text-3xl font-bold underline decoration-blue-500">
        Welcome to TALL Stack on Vultr
    </h1>
    ```

    Save and close the file.

1. Rebuild the assets to apply the changes.

    ```console
    $ npm run build
    ```

1. Visit `http://your-server-ip/` in your browser. You should see a large, bold, underlined heading with blue decoration.

### Test Livewire

Livewire enables you to build dynamic interfaces using PHP without writing JavaScript. Create a simple counter component to test Livewire:

1. Create a new Livewire component.

    ```console
    $ php artisan make:livewire counter
    ```

    This generates two files:
    * `app/Livewire/Counter.php` - The component logic
    * `resources/views/livewire/counter.blade.php` - The component view

1. Open the Counter component class.

    ```console
    $ nano app/Livewire/Counter.php
    ```

1. Replace the contents with:

    ```php
    <?php

    namespace App\Livewire;

    use Livewire\Component;

    class Counter extends Component
    {
        public $count = 0;

        public function increment()
        {
            $this->count++;
        }

        public function decrement()
        {
            $this->count--;
        }

        public function render()
        {
            return view('livewire.counter');
        }
    }
    ```

    Save and close the file.

1. Open the counter view file.

    ```console
    $ nano resources/views/livewire/counter.blade.php
    ```

1. Replace the existing content with the following content:

    ```html
    <div class="p-6 bg-white rounded-lg shadow-md">
        <h2 class="text-2xl font-bold mb-4">Livewire Counter</h2>
        <div class="flex items-center space-x-4">
            <button wire:click="decrement" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600">
                -
            </button>
            <span class="text-3xl font-bold">{{ $count }}</span>
            <button wire:click="increment" class="px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600">
                +
            </button>
        </div>
    </div>
    ```

    Save and close the file.

1. Open the welcome view to include the Livewire component.

    ```console
    $ nano resources/views/welcome.blade.php
    ```

1. Add the Livewire component after the heading:

    ```html
    <h1 class="text-3xl font-bold underline decoration-blue-500">
        Welcome to TALL Stack on Vultr
    </h1>
    <livewire:counter />
    ```

    Save and close the file.

1. Rebuild the assets to compile the new CSS classes.

    ```console
    $ npm run build
    ```

1. Visit `http://your-server-ip/` and test the counter buttons. The count should update without a page refresh.

### Test Alpine.js

Alpine.js provides lightweight JavaScript functionality for interactive elements. Add a simple toggle component to verify Alpine.js:

1. Navigate to the `tallisman` directory.

    ```console
    $ cd /var/www/html/tallisman/
    ```

1. Open the welcome view file.

    ```console
    $ nano resources/views/welcome.blade.php
    ```

1. Add an Alpine.js toggle component:

    ```html
    <div x-data="{ open: false }" class="p-6 bg-gray-100 rounded-lg mt-6">
        <button @click="open = !open" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
            Toggle Alpine.js Demo
        </button>
        <div x-show="open" x-transition class="mt-4 p-4 bg-white rounded shadow">
            <p class="text-lg">🎉 Alpine.js is working! This content toggles on and off.</p>
        </div>
    </div>
    ```

    Save and close the file.

1. Rebuild the assets to compile the new CSS classes.

    ```console
    $ npm run build
    ```

1. Visit `http://your-server-ip/` and click the toggle button. The content should smoothly appear and disappear with transitions.

## Secure the Application with SSL/TLS

Once your TALL stack application is verified, secure it with TLS certificates to enable HTTPS connections and protect user data. Use Certbot to generate and manage these certificates.

1. Install the Certbot Let's Encrypt client plugin for Apache.

    ```console
    $ sudo apt install certbot python3-certbot-apache -y
    ```

1. Request a new Let's Encrypt SSL certificate for your domain. Replace `app.example.com` with your domain and `email@example.com` with your email address.

    ```console
    $ sudo certbot --apache --agree-tos --redirect --email email@example.com -d app.example.com
    ```

    The `--redirect` option automatically configures Apache to redirect HTTP traffic to HTTPS.

    > [!NOTE]
    > Let's Encrypt certificates are valid for 90 days and automatically renew via a systemd timer. You can check the renewal timer status with `systemctl list-timers | grep certbot`.

1. Restart Apache to apply the SSL configuration changes.

    ```console
    $ sudo systemctl restart apache2
    ```

1. Visit `https://app.example.com` in your browser to verify HTTPS is working. A padlock icon in the address bar indicates a secure connection.

## Conclusion

You have successfully deployed a TALL stack application on Vultr using the Laravel Marketplace App. You secured MySQL, configured environment variables, installed backend and frontend dependencies, set proper file permissions, and created a custom Apache virtual host. You also set TLS encryption to enable secure HTTPS access.
