SureCommerce
Upload the source code, open /install in your browser, and configure everything through the web installer — no command line required.
Jump to section
📋 Server Requirements
| Component | Minimum | Recommended |
|---|---|---|
| PHP | 8.2 | 8.4+ |
| MySQL | 5.7 | 8.0+ / MariaDB 10.3+ |
| RAM | 512 MB | 1 GB+ |
| Disk | 500 MB | 2 GB+ |
| Web Server | Apache 2.4+ / Nginx 1.10+ | Nginx 1.18+ |
PHP Extensions
php-curlphp-gdphp-imagickphp-jsonphp-zipphp-mbstringphp-xmlphp-pdo / php-pdo_mysqlphp-bcmathphp-tokenizerphp-redisphp-opcachephp.ini Recommended Settings
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300
memory_limit = 256M
max_input_vars = 3000
🌐 Web Installer (Standard method — shared hosting, VPS, local)
vendor folder — just upload and open /install in your browser.Upload source code to server
vendor folder is included — no Composer required.
- Shared hosting: Upload to
/home/user/public_html— web server document root should point to thepublic/subfolder - VPS / Dedicated: Upload to
/var/www/surecommerce— configure Nginx/Apache to serve frompublic/ - Local (XAMPP/MAMP): Extract to
C:\xampp\htdocs\surecommerceor/Applications/MAMP/htdocs/surecommerce
chmod -R 755 storage bootstrap/cache public/uploadsOpen the web installer in your browser
/install path on your domain:
https://yourdomain.com/install
# Local examples:
http://localhost/surecommerce/public/install (XAMPP / MAMP)
http://localhost:9059/install (Docker)
http://localhost:8000/install (artisan serve)
Complete the 7-step wizard
Requirements
Automatically checks PHP version (8.2+) and all required extensions. All items must show green before proceeding.
Permissions
Checks that key directories (storage/, bootstrap/cache, public/uploads, etc.) are writable. If any fail, run chmod -R 755 <path> on your server.
Database
Enter DB host, port, database name, username, and password. The installer tests the connection and auto-creates the database if it does not exist yet. It also writes all settings into .env automatically.
Site Info
Enter your site name and the full application URL (e.g. https://yourdomain.com). This is written to APP_URL in .env.
Admin Account
Set your admin display name, email address, and password (minimum 8 characters). Remember these credentials — you will use them to log in to the admin panel.
Language & Timezone
Select the default frontend language and server timezone. Both can be changed later from Admin → Settings.
Install
Click Install Now. A live progress log runs in the browser — it runs database migrations, seeds initial data, creates the admin account, and publishes assets. Takes 30–60 seconds.
Done — go to admin panel
/install route is automatically disabled after installation. Visiting it again will redirect to the home page.Start queue worker
Required for background jobs (Excel import, email, image optimization, warranty serial generation). Run in a separate terminal after installation:
# Local / development:
php artisan queue:work --queue=high,default
# Production (use Supervisord — see Queue Workers section below)
🚧 Docker (Recommended for reviewers & local dev)
Extract files and start containers
docker-compose up -d
.env from .env.example and generates APP_KEY on first start..env before running:
NAME_CONTAINER=surecommerce # default prefix for container names
PORTS_NGINX=9059 # browser port
PORTS_MYSQL=3359 # MySQL port
Open the web installer
http://localhost:9059/install
Follow the wizard. On the Database step, enter these Docker-specific values:
surecommerce_mysql3306rootStart queue worker (new terminal tab)
docker exec -it surecommerce_php php artisan queue:work --queue=high,default
Access the application
- Frontend:
http://localhost:9059 - Admin panel:
http://localhost:9059/admin
Container names & useful commands
# View running containers
docker ps
# Open shell in PHP container
docker exec -it surecommerce_php bash
# Check logs
docker logs surecommerce_php
docker logs surecommerce_nginx
# Restart all
docker-compose restart
# Stop and remove containers (keeps DB data)
docker-compose down
# Stop and remove everything including DB data
docker-compose down -v
⚙️ Server Configuration
Apache — .htaccess
Ensure mod_rewrite is enabled. The .htaccess in the public/ folder handles URL rewriting automatically.
<IfModule mod_rewrite.c>
Options -MultiViews -Indexes
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Nginx — server block
server {
listen 80;
server_name yourdomain.com;
root /path/to/project/public;
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
▶️ Queue Worker Configuration
php artisan queue:work --queue=high,default in a separate terminal. For production, use Supervisord.Supervisord setup (production)
Install Supervisor
# Ubuntu/Debian
sudo apt-get install supervisor
# CentOS/RHEL
sudo yum install supervisor
sudo systemctl enable supervisord && sudo systemctl start supervisord
Create config file
[program:surecommerce-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/project/artisan queue:work --queue=high,default --sleep=2 --tries=2 --timeout=120
autostart=true
autorestart=true
user=www-data
numprocs=1
redirect_stderr=true
stdout_logfile=/path/to/project/storage/logs/worker.log
stopwaitsecs=3600
Deploy and start
sudo cp surecommerce-worker.conf /etc/supervisor/conf.d/
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start surecommerce-worker:*
Mail Configuration
Configure SMTP via Admin Panel → Settings → Email Configuration. No need to edit .env manually.
sudo ufw allow 587/tcp✅ After Installation — What to Test
/install.Admin Panel Features
/admin — use the credentials entered in Step 5 of the installerQueue-dependent features (require queue worker running)
- Excel product import (Admin → Products → Import)
- Email sending (password reset, order notifications, warranty activation)
- Image optimization on upload
- Warranty serial code generation
# Run locally (keep this terminal open):
php artisan queue:work --queue=high,default
# Check for failed jobs:
php artisan queue:failed
Post-Installation Security Checklist
APP_DEBUG=false and APP_ENV=production are set automatically by the installer. If you edited .env manually afterwards, run php artisan config:clear/install redirects away (the lock file is created automatically).env is not publicly accessible🔎 Troubleshooting
⚠️ White screen or 500 error after upload
- Check file permissions:
chmod -R 755 storage bootstrap/cache public/uploads - Check Laravel logs:
cat storage/logs/laravel.log - Verify all required PHP extensions are installed
- Clear all caches:
php artisan optimize:clear
⚠️ Database connection failed in installer
- Double-check host, port, username, and password
- Try
127.0.0.1instead oflocalhost - Verify the database user has
ALL PRIVILEGESon the database - For Docker: use
surecommerce_mysqlas the host (not localhost)
⚠️ Images not uploading or displaying
- Check permissions:
chmod -R 755 public/uploads - Verify
php-gdandphp-imagickextensions are enabled - Check
upload_max_filesizeandpost_max_sizein php.ini (set to 64M)
⚠️ Background jobs not processing (Excel import, emails)
- Confirm queue worker is running:
sudo supervisorctl status - Check failed jobs:
php artisan queue:failed - Retry failed jobs:
php artisan queue:retry all
⚠️ Code updates not taking effect after deploy
- Clear all caches:
php artisan optimize:clear - Restart queue workers:
sudo supervisorctl restart surecommerce-worker:*Workers cache PHP classes in memory — they will not see new code until restarted.
⚠️ PDF / QR images not showing in Docker
Queue workers inside Docker cannot resolve localhost image URLs when rendering warranty PDFs.
In packages/warranty/resources/views/serial/pdf/print_item.blade.php, uncomment the base64 image block for Docker/localhost environments, then run php artisan queue:restart.
🔧 Manual Setup (Advanced — for CI/CD pipelines or no browser access)
/install via browser (e.g. server-side automation). For normal installations the web installer above is recommended.Upload files and set permissions
chmod -R 755 storage bootstrap/cache public/uploads public/thumbnails
Configure .env manually
cp .env.example .env
Edit .env with your values:
APP_NAME="SureCommerce"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=surecommerce_db
DB_USERNAME=surecommerce_user
DB_PASSWORD=strong_password
QUEUE_CONNECTION=database
Create database (if not exists)
CREATE DATABASE surecommerce_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON surecommerce_db.* TO 'surecommerce_user'@'localhost';
FLUSH PRIVILEGES;
Run CMS install command
# Default (auto-generated credentials shown in terminal):
php artisan cms:install
# Or with custom credentials:
php artisan cms:install "admin@yoursite.com" adminuser yourpassword
This command: generates app key, runs migrations, seeds data, creates admin account, publishes assets, clears caches.
SureCommerce — Installation Guide
© 2026 DreamTeam. All rights reserved. | FAQ | User Guide | REST API