Linux Tutorials

Install SuiteCRM on Ubuntu 24.04 with Nginx

SuiteCRM is a free, open-source Customer Relationship Management (CRM) platform forked from SugarCRM Community Edition. It handles sales pipeline tracking, customer support cases, marketing campaigns, and reporting – all without per-user licensing costs. SuiteCRM 8 is a complete rewrite built on the Symfony framework with an Angular frontend, replacing the legacy SugarCRM codebase with a modern architecture.

This guide walks through installing SuiteCRM 8.9.3 on Ubuntu 24.04 LTS with Nginx as the web server and MariaDB as the database backend. We cover PHP 8.3, database setup, Nginx virtual host configuration, SSL with Let’s Encrypt, cron jobs, and firewall rules.

Prerequisites

Before starting, make sure you have the following in place:

  • A server running Ubuntu 24.04 LTS with at least 2 GB RAM and 2 CPU cores
  • Root or sudo access
  • A registered domain name pointed to your server IP (for SSL and web access)
  • Ports 80 and 443 (TCP) open for HTTP/HTTPS traffic

All commands in this guide assume you are running as root. If using a sudo user, switch to root first:

sudo -i

Step 1: Install PHP 8.3 and Required Extensions

SuiteCRM 8.9 requires PHP 8.1 or newer. Ubuntu 24.04 ships with PHP 8.3 in the default repositories, which is the recommended version. Install PHP-FPM along with all extensions SuiteCRM needs:

apt update
apt install -y php8.3-fpm php8.3-cli php8.3-common php8.3-mysql php8.3-curl php8.3-gd php8.3-iconv php8.3-intl php8.3-mbstring php8.3-xml php8.3-zip php8.3-imap php8.3-ldap php8.3-soap php8.3-bcmath php8.3-opcache

SuiteCRM requires specific PHP settings for file uploads and memory. Edit the PHP-FPM configuration:

vi /etc/php/8.3/fpm/php.ini

Update the following directives:

memory_limit = 512M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300
date.timezone = UTC

Set the timezone to match your server location. Restart PHP-FPM to apply the changes:

systemctl restart php8.3-fpm

Verify PHP-FPM is running:

systemctl status php8.3-fpm

The output should show active (running). You can also confirm the PHP version:

php -v

This should display PHP 8.3.x. If you need a newer or different PHP version for other applications, see our guide on installing PHP on Ubuntu 24.04.

Step 2: Install MariaDB Database Server

SuiteCRM supports MariaDB 10.6, 10.11, 11.4, and 11.8. Ubuntu 24.04 ships MariaDB 10.11 in the default repositories, which works well. Install it:

apt install -y mariadb-server mariadb-client

Enable and start the MariaDB service:

systemctl enable --now mariadb

Run the security script to set a root password and remove insecure defaults:

mariadb-secure-installation

Answer the prompts – set a strong root password, remove anonymous users, disallow remote root login, and remove the test database. Verify MariaDB is running:

systemctl status mariadb

The service should show active (running). For a more detailed MariaDB installation on Ubuntu, check our dedicated guide.

Step 3: Create SuiteCRM Database and User

Log into the MariaDB shell and create a dedicated database and user for SuiteCRM:

mariadb -u root -p

Run the following SQL statements to create the database, user, and grant privileges. Replace StrongPassword123 with a secure password of your choice:

CREATE DATABASE suitecrm CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'suitecrm'@'localhost' IDENTIFIED BY 'StrongPassword123';
GRANT ALL PRIVILEGES ON suitecrm.* TO 'suitecrm'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 4: Install Nginx Web Server

Install Nginx from the default Ubuntu repositories:

apt install -y nginx

Enable and start Nginx:

systemctl enable --now nginx

Confirm it is running:

systemctl status nginx

You should see active (running) in the output. For more details on setting up Nginx with PHP-FPM on Ubuntu, see our complete guide.

Step 5: Download and Install SuiteCRM 8.9.3

Download the latest SuiteCRM 8.9.3 release package from the official GitHub releases page. We will extract it directly into the web root:

cd /tmp
wget https://github.com/SuiteCRM/SuiteCRM-Core/releases/download/v8.9.3/SuiteCRM-8.9.3.zip

Install the unzip utility if not already present, then extract the archive:

apt install -y unzip
unzip SuiteCRM-8.9.3.zip -d /var/www/suitecrm

Set proper ownership and permissions so the web server can read and write the files:

chown -R www-data:www-data /var/www/suitecrm
find /var/www/suitecrm -type d -exec chmod 2755 {} \;
find /var/www/suitecrm -type f -exec chmod 0644 {} \;

Clean up the downloaded archive:

rm -f /tmp/SuiteCRM-8.9.3.zip

Step 6: Configure Nginx Virtual Host for SuiteCRM

Create a new Nginx server block configuration for SuiteCRM. Replace crm.example.com with your actual domain name throughout:

vi /etc/nginx/sites-available/suitecrm

Add the following configuration:

server {
    listen 80;
    server_name crm.example.com;
    root /var/www/suitecrm/public;
    index index.php index.html;

    client_max_body_size 64M;

    # Redirect / to /suitecrm/public
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    # Legacy API and backward compatibility
    location ^~ /legacy {
        try_files $uri $uri/ /legacy/index.php?$args;
    }

    location ^~ /api {
        try_files $uri $uri/ /index.php?$args;
    }

    # PHP-FPM handler
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 256 16k;
    }

    # Deny access to sensitive files
    location ~ /\. {
        deny all;
    }

    location ~* \.(log|yml|yaml|twig|env)$ {
        deny all;
    }

    # Static file caching
    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
        expires 1y;
        add_header Cache-Control "public, immutable";
        access_log off;
    }
}

Enable the site and remove the default Nginx configuration:

ln -s /etc/nginx/sites-available/suitecrm /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default

Test the Nginx configuration for syntax errors:

nginx -t

If the test passes with syntax is ok and test is successful, reload Nginx:

systemctl reload nginx

Step 7: Run the SuiteCRM Web Installer

Open your browser and navigate to your domain:

http://crm.example.com

The SuiteCRM installation wizard loads automatically. Follow these steps:

  • License Agreement – Accept the AGPL v3 license
  • System Check – The installer verifies PHP version, extensions, and file permissions. Fix any red items before proceeding
  • Database Configuration – Enter the database details: host localhost, database name suitecrm, user suitecrm, and the password you set in Step 3
  • Admin Account – Create the admin username and a strong password
  • Site URL – Set to https://crm.example.com (use HTTPS if you plan to configure SSL in the next steps)

The installer creates database tables and configures the application. This takes a few minutes depending on your server resources. Once complete, you are redirected to the SuiteCRM login page.

Alternatively, you can run the installation from the command line:

cd /var/www/suitecrm
php bin/console suitecrm:app:install \
  --db_host=localhost \
  --db_port=3306 \
  --db_name=suitecrm \
  --db_user=suitecrm \
  --db_password='StrongPassword123' \
  --site_url='https://crm.example.com' \
  --admin_username=admin \
  --admin_password='AdminPassword123'

After installation completes, verify you can log in by navigating to https://crm.example.com and signing in with the admin credentials you just created.

Step 8: Configure SuiteCRM Cron Jobs

SuiteCRM uses scheduled tasks for workflow processing, email checks, report generation, and database maintenance. These must run as the web server user. Create a cron job:

crontab -u www-data -e

Add the following line to run the SuiteCRM scheduler every minute:

* * * * * cd /var/www/suitecrm && php bin/console suitecrm:app:cron >> /var/log/suitecrm-cron.log 2>&1

Create the log file and set permissions:

touch /var/log/suitecrm-cron.log
chown www-data:www-data /var/log/suitecrm-cron.log

Verify the cron job is registered:

crontab -u www-data -l

You should see the cron entry you just added in the output.

Step 9: Configure SSL with Let’s Encrypt

Encrypt traffic to your SuiteCRM instance with a free SSL certificate from Let’s Encrypt. Install Certbot and its Nginx plugin:

apt install -y certbot python3-certbot-nginx

Obtain and install the certificate. Replace crm.example.com with your domain:

certbot --nginx -d crm.example.com

Certbot prompts for your email address and asks if you want to redirect HTTP to HTTPS – choose yes. It automatically updates your Nginx configuration to listen on port 443 with SSL and adds the redirect from port 80.

Verify the certificate renewal timer is active:

systemctl status certbot.timer

The timer should show active (waiting), meaning automatic renewals are scheduled. Test the renewal process without actually renewing:

certbot renew --dry-run

If the dry run succeeds, your SSL setup is complete. Access SuiteCRM at https://crm.example.com and verify the padlock icon appears in your browser.

Step 10: Configure UFW Firewall

Ubuntu 24.04 comes with UFW (Uncomplicated Firewall). Allow HTTP, HTTPS, and SSH traffic:

ufw allow OpenSSH
ufw allow 'Nginx Full'
ufw enable

The Nginx Full profile opens both port 80 (HTTP) and port 443 (HTTPS). Verify the firewall rules:

ufw status

The output should list OpenSSH, Nginx Full, and their allowed status for both IPv4 and IPv6. If you use Firewalld instead of UFW, the equivalent commands are:

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

Conclusion

You now have SuiteCRM 8.9.3 running on Ubuntu 24.04 with Nginx, PHP 8.3, MariaDB, and SSL encryption via Let’s Encrypt. The cron scheduler handles background tasks, and the firewall restricts access to web and SSH traffic only.

For production environments, set up regular database backups using mariadb-dump, configure email sending through SMTP in the SuiteCRM admin panel, and monitor disk usage as file uploads and logs grow over time. Check the SuiteCRM documentation for advanced configuration options including LDAP authentication, Elasticsearch integration, and role-based access control.

Related Articles

Ubuntu How To Install Drupal 9 CMS on Ubuntu 20.04 Automation Install JFrog Artifactory on Ubuntu 22.04|20.04|18.04 Debian Setup iPXE Server on Ubuntu or Debian using netboot.xyz Ubuntu Install Dolibarr ERP CRM on Ubuntu 22.04|20.04|18.04

Press ESC to close