Skip to content

Install on a VPS (Ubuntu + Nginx)

These commands are for Ubuntu 24.04 on a fresh server, run as a user with sudo. Replace yourdomain.com everywhere. Plan about 30 minutes.

Terminal window
sudo apt update && sudo apt -y upgrade
sudo apt -y install software-properties-common unzip curl nginx mysql-server supervisor
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
sudo apt -y install php8.4-fpm php8.4-cli php8.4-mysql php8.4-mbstring php8.4-xml php8.4-curl \
php8.4-zip php8.4-bcmath php8.4-gd php8.4-intl
php -v # must show 8.4.27 or newer
Terminal window
sudo mysql
CREATE DATABASE rapidmart CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'rapidmart'@'localhost' IDENTIFIED BY 'choose-a-strong-password';
GRANT ALL PRIVILEGES ON rapidmart.* TO 'rapidmart'@'localhost';
FLUSH PRIVILEGES;
EXIT;

From your computer (replace the paths):

Terminal window
scp rapidmart-v1.0.0.zip you@your-server:/tmp/

On the server:

Terminal window
cd /tmp && unzip rapidmart-v1.0.0.zip
sudo mv rapidmart-v1.0.0/backend /var/www/rapidmart
sudo chown -R www-data:www-data /var/www/rapidmart
sudo chmod -R 775 /var/www/rapidmart/storage /var/www/rapidmart/bootstrap/cache
/etc/nginx/sites-available/rapidmart
server {
listen 80;
server_name yourdomain.com;
root /var/www/rapidmart/public;
index index.php;
client_max_body_size 25M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
}
location ~ /\.(?!well-known) {
deny all;
}
}
Terminal window
sudo ln -s /etc/nginx/sites-available/rapidmart /etc/nginx/sites-enabled/
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t && sudo systemctl reload nginx

Point your domain’s DNS A record at the server first, then:

Terminal window
sudo apt -y install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com

Certbot renews the certificate automatically.

Open https://yourdomain.com and follow Run the web installer.

  1. Scheduler — sudo crontab -u www-data -e and add:

    Terminal window
    * * * * * cd /var/www/rapidmart && php artisan schedule:run >> /dev/null 2>&1
  2. Queue worker — create the Supervisor program:

    /etc/supervisor/conf.d/rapidmart-worker.conf
    [program:rapidmart-worker]
    command=php /var/www/rapidmart/artisan queue:work --queue=realtime,default --tries=3
    autostart=true
    autorestart=true
    user=www-data
    numprocs=1
    stopwaitsecs=60
    stdout_logfile=/var/log/rapidmart-worker.log
    Terminal window
    sudo supervisorctl reread && sudo supervisorctl update
  3. Realtime (optional) — see Server setup → Realtime.