Install Bagisto eCommerce di Ubuntu 24.04

Install Bagisto eCommerce di Ubuntu 24.04

Bitnesia Software Mar 25, 2026 89 EN

Membangun platform ecommerce kini semakin mudah berkat hadirnya solusi open source seperti Bagisto. Platform e-commerce ini memberikan fleksibilitas tinggi, performa yang optimal, serta fitur lengkap untuk membangun toko online modern. Jika ingin menjalankan Bagisto di server sendiri (self-hosted), panduan ini akan memandu Anda mulai dari pengenalan, fitur utama, hingga langkah instalasi lengkap di Ubuntu menggunakan Nginx.

1. Pengenalan Bagisto

Bagisto adalah platform e-commerce open source berbasis Laravel dan Vue.js yang dikembangkan oleh Webkul. Dirancang untuk kemudahan pengembangan, performa tinggi, serta skalabilitas, Bagisto memungkinkan Anda membangun toko online modern dengan fitur lengkap seperti manajemen produk, order, pelanggan, multi-store, multi-channel, dan banyak lagi. Karena arsitekturnya yang modular, Bagisto cocok untuk bisnis kecil hingga enterprise yang membutuhkan solusi e-commerce fleksibel dan dapat dikustomisasi sepenuhnya.

Fitur Utama Bagisto:

  • Mendukung multi-channel dan multi-store dalam satu dashboard.
  • Menyediakan katalog produk canggih untuk berbagai jenis produk.
  • Mendukung multi-language dan multi-currency untuk bisnis global.
  • Memiliki sistem manajemen inventory yang powerful dan fleksibel.
  • Menyediakan role-based access control (RBAC) untuk pengaturan akses admin.
  • Menggunakan tech stack modern Laravel dan Vue.js yang mudah dikembangkan.

2. System Requirements

Minimum Requirements:

  • Apache atau Nginx Web Server
  • PHP 8.3+
  • Composer 2.5+
  • MySQL 8.0+ atau MariaDB 10.3+

3. Persiapan Server

Tutorial ini menggunakan sistem operasi Ubuntu. Sebelum instalasi, update sistem Ubuntu terlebih dahulu:

sudo apt update
sudo apt upgrade -y

Install Nginx:

sudo apt install nginx certbot python3-certbot-nginx -y

Tambah repository PPA ondrej/php:

sudo add-apt-repository ppa:ondrej/php -y
sudo apt upgrade -y

Install PHP 8.3 dan extension yang dibutuhkan:

sudo apt install php8.3 php8.3-fpm php8.3-cli php8.3-common \
php8.3-apcu php8.3-mbstring php8.3-gd php8.3-intl \
php8.3-xml php8.3-soap php8.3-bcmath php8.3-mysql php8.3-zip \
php8.3-curl php8.3-tidy php8.3-imagick php8.3-sqlite3 unzip -y

Install Composer:

sudo wget https://getcomposer.org/download/latest-stable/composer.phar -O /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer

Install MariaDB:

sudo apt install mariadb-server -y

4. Buat Database

Login ke MariaDB:

sudo mysql

Buat database dan user:

CREATE DATABASE bagisto;
CREATE USER 'bagisto'@'localhost' IDENTIFIED BY 'secretpassword';
GRANT ALL PRIVILEGES ON bagisto.* TO 'bagisto'@'localhost';
FLUSH PRIVILEGES;
exit

5. Konfigurasi Nginx Reverse Proxy

Buat konfigurasi Nginx server block untuk subdomain bagisto.domain.com:

sudo nano /etc/nginx/sites-available/bagisto.domain.com.conf

Masukkan konfigurasinya:

server {
    listen 80;
    listen [::]:80;
    server_name bagisto.domain.com;
    root /var/www/bagisto.domain.com/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    index index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~* ^\/(?!cache).*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ {
      expires max;
      access_log off;
      add_header Cache-Control "public";
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_hide_header X-Powered-By;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Aktifkan konfigurasi:

sudo ln -s /etc/nginx/sites-available/bagisto.domain.com.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

Request sertifikat SSL:

sudo certbot --non-interactive \
-m [email protected] \
--agree-tos \
--no-eff-email \
--nginx -d bagisto.domain.com \
--redirect

6. Install Bagisto

Buat project Bagisto via Composer:

sudo composer create-project bagisto/bagisto /var/www/bagisto.domain.com

Jalankan installer:

cd /var/www/bagisto.domain.com
sudo php artisan bagisto:install

Prompt yang ditampilkan selama proses instalasi:

Please enter the application name
Please enter the application URL
Please select the application timezone
Please select the default application locale
Please select the default currency
Please choose the allowed locales for your channels
Please choose the allowed currencies for your channels
Please select the database connection
Please enter the database host
Please enter the database port
Please enter the database name
Please enter the database prefix
Please enter your database username
Please enter your database password
Enter the name of the admin user
Enter the email address of the admin user
Configure the password for the admin user
Please select if you want some sample products after installation

Buka file .env:

sudo nano /var/www/bagisto.domain.com/.env

Set ke mode production:

APP_ENV=production
APP_DEBUG=false

Ubah user-group direktori:

sudo chown -R www-data:www-data /var/www/bagisto.domain.com

Install Bagisto telah selesai, siap diakses di https://bagisto.domain.com dan dashboard admin di https://bagisto.domain.com/admin.

8. Penutup

Bagisto adalah salah satu platform e-commerce open source paling lengkap yang berbasis Laravel. Proses instalasinya cukup mudah dan cocok untuk developer yang ingin membangun toko online profesional dengan kendali penuh terhadap server. Dengan mengikuti tutorial ini, Anda sudah berhasil menyiapkan environment, database, konfigurasi web server, hingga menjalankan instalasi Bagisto sepenuhnya.

Dukung keberlanjutan tutorial open source Bitnesia melalui link di bawah ini.

Kirim Donasi

Related Posts