Skip to main content
Before beginning the installation, make sure your environment meets System requirements.

Important Info From v2.4

  • Ensure that you are using php v8.2
  • Ensure that you have enabled imagick extension in your server (If not you might experience error 500).
  • Ensure that you are running either MYSQL > 5.7.7 or MariaDB > 10.2.2 (Alternatively, you may enable the innodb_large_prefix option for your database)

1. Obtain the package

After purchasing Swiftchats, you will get a zipped folder. After unzipping the folder, you will get three folders, the source code folder, update folder and the documentation folder.
Documentation
Source-code
Update

2. Database setup (MySQL)

  1. Create a new MySQL database.
  2. Create a new MySQL username and password.
  3. Assign full privileges to your database username.
On a VPS, create the database with the MySQL or MariaDB client (mysql / mariadb), or run the equivalent SQL from an admin tool. Grant the application user full privileges on that database and allow connections from the host where PHP runs (often localhost).

3. Uploading code

Before starting to upload the files, please make sure your file explorer has the option to view hidden files turned on. On some operating systems, the dotfiles are hidden by default.
Ubuntu and similar VPS or dedicated servers: The most reliable approach is to push your project to a private GitHub repository (or another Git host), then clone or pull the code on the server with Git. That gives you version history, simpler updates, and avoids incomplete SFTP uploads or missing application files. Create environment files such as .env directly on the server (never commit secrets to Git).
  • Git (recommended on Linux servers): Create a private repository, add the Swiftchats source code (including dotfiles your workflow requires), deploy keys or SSH access on the server, then git clone into your web root or project directory (for example /var/www/your-site).
  • Manual upload (alternative): Copy the source-code folder to your project directory on the server (for example under /var/www/) using SFTP or rsync. Ensure hidden files are included.
  • Ensure you have already created the MySQL database and DB user on the server and assigned that user to the database (see section 2).

4. Installer setup

Once you have configured the steps above, go to your domain or subdomain which should redirect you to the installation page. Go through each installation step and grant folder permissions where necessary.

5. Evolution API on Ubuntu (Docker)

The WhatsApp QR connect add-on uses Evolution API as the WhatsApp Web gateway. On Ubuntu, the recommended approach is to run Evolution API with Docker and Docker Compose alongside your Swiftchats stack.
WhatsApp QR connect add-on required. The Swiftchats WhatsApp QR connect integration (settings, connectivity, and related features) is only available if you have purchased the WhatsApp QR connect add-on for your Swiftchats license. Complete the add-on purchase before relying on this stack in production.
1

Install Docker Engine and Compose

On Ubuntu 20.04 or 22.04 LTS:
Log out and back in (or open a new SSH session) so the docker group applies. Verify:
2

Create the Evolution API project directory

Create the project under /opt/evolution-api (default path used by Evolution API):
The next steps assume your shell is inside /opt/evolution-api.
3

Configure environment variables

Create or edit .env in /opt/evolution-api:
Paste these variables into your .env file:
Replace your-authentication-api-key and your-whatsapp-business-token-webhook with real secrets (for example strong random values from generate-random.org API keys).
Save AUTHENTICATION_API_KEY somewhere secure after you set it. Later, set EVOLUTION_API_KEY in the Swiftchats .env to the same value (see Connect Swiftchats to the WhatsApp gateway at the end of this section).
4

Create YAML file for Docker

In /opt/evolution-api (same directory as .env), create docker-compose.yaml:
Paste this into the file:
Save and exit the editor.
5

Start the services

From /opt/evolution-api, launch Evolution API with Docker Compose:
This starts:
  • Evolution API (port 8080)
  • PostgreSQL (port 5432 on localhost)
  • Redis (port 6379 on localhost)
Verify the services are running:
6

Reverse proxy (Nginx)

Create a reverse proxy to expose the API safely.
Paste this:
Enable the site and reload Nginx:
Replace evolution.yourdomain.com with the same hostname you set in Nginx server_name. For more options or troubleshooting, see How to install in Nginx.
7

Connect Swiftchats to the WhatsApp gateway

In the Swiftchats .env file on the server, set:
  • EVOLUTION_BASE_URL — Same base URL as SERVER_URL in the Evolution API gateway (for example https://evolution.yourdomain.com).
  • EVOLUTION_API_KEY — Must match AUTHENTICATION_API_KEY from the gateway’s .env (use the value you saved when configuring Evolution API).
Clear config cache after editing:
For the latest Evolution API options, environment variables, and troubleshooting, see the Evolution API installation documentation.

6. Laravel jobs and queues

To ensure successful delivery of WhatsApp campaigns, it’s essential to set up a queue system that runs at scheduled intervals to dispatch campaigns efficiently. On a VPS, use Supervisor to run Laravel queue workers and a cron entry for Laravel’s scheduler (see step 6 below).
Supervisor requires shell access (SSH) and permission to install system packages (for example sudo on Ubuntu).
If you decide to use Laravel queues, go to your .env file and change the following:
1

Install Supervisor

On Ubuntu or Debian:
After installation, start Supervisor and enable it to run on boot:
2

Create a Supervisor configuration file for Laravel queues

Create a new configuration file inside /etc/supervisor/conf.d/:
Add the following content:
Replace /path-to-your-project/ with your actual Laravel project path.
3

Apply Supervisor changes

After creating the configuration file, run the following commands to update and start Supervisor:
To check if Supervisor is running correctly, use:
4

Monitoring and logs

You can check the logs if anything goes wrong:
If the queue worker stops unexpectedly, restart Supervisor:
5

Ensure Supervisor starts on boot

To prevent queue workers from stopping after a reboot, enable Supervisor:
6

Add a cron job for the Laravel scheduler

Edit the crontab:
Add this line (runs Laravel’s scheduler every minute):
Replace /path-to-your-project/ with your actual Laravel project path.

7. Trouble-shooting your installation

If you are facing issues with the installer, try the following: Grant access to your .env file — from your project directory, run:
Clear the installer lock — open the storage folder and delete the installed file. Retry the installation in your browser.