Deploy Bagisto: Self-Hosted Laravel eCommerce & Shopify Alternative
Run your own Laravel online store with MySQL, admin panel and no fees.
Bagisto
Just deployed
/var/www/bagisto/storage
MySQL
Just deployed
/var/lib/mysql
Deploy and Host Bagisto on Railway
Bagisto is an open source eCommerce platform built on Laravel and Vue.js. It gives you a complete online store: a responsive storefront, a full admin panel, products with variants and custom attributes, categories, carts, checkout, orders, invoices, shipments, refunds, customer accounts, promotions and CMS pages, plus official REST and GraphQL API packages. It supports multiple channels, locales and currencies, and its extension ecosystem adds marketplaces, B2B and POS. It is MIT licensed with about 28,300 GitHub stars. This template runs Bagisto 2.4.3 with MySQL on Railway, with migrations on every boot, sample data seeded once on the first boot, HTTPS-aware links behind Railway's proxy, and a volume for uploads. Shopify's Basic plan costs $39/month billed monthly plus transaction fees on third-party gateways. Bagisto on Railway costs about $10–20/month with no platform fees.
What This Template Deploys
| Service | Purpose |
|---|---|
| Bagisto | webkul/bagisto:2.4.3, the official image with Nginx and PHP-FPM under Supervisor. Public storefront at / and admin at /admin. Volume at /var/www/bagisto/storage for product images, uploads, logs and sessions. |
| MySQL | mysql:9.4 with a 1 GB InnoDB buffer pool, reachable only over Railway's private network. Volume at /var/lib/mysql holds products, orders and customers. |
On boot, Bagisto links storage, runs database migrations, and seeds the default channel, locale, currency, categories, attributes, theme and admin account. The seed runs only once: a marker file on the storage volume stops later boots from resetting your store.
About Hosting Bagisto
Hosted store builders are quick to start but charge every month, take a cut on payment gateways they don't own, and lock your data and checkout into their platform. Bagisto gives you the same core features on your own server with full access to the code.
Catalog. Simple, configurable, virtual, downloadable, grouped and bundle products. Attribute families let you define custom fields for each product type, and inventory sources track stock across warehouses.
Checkout and orders. Guest and account checkout, cart rules, catalog price rules, coupons, tax categories and rates, shipping methods, invoices, shipments, refunds and returns.
Multi-channel and multi-language. Run several storefronts from one admin, each with its own domain, theme, locales and currencies.
Customers. Accounts, groups, addresses, wishlists, reviews, order history and newsletter subscriptions.
Admin panel. Dashboards, data grids with filters and exports, role-based access for staff, CMS pages, theme customization and SEO fields on products and categories.
SEO built in. Products, categories and CMS pages have their own URL keys, meta titles and descriptions, and the storefront generates a sitemap you can submit to search engines.
APIs and extensions. Official REST and GraphQL API packages for headless storefronts and mobile apps, plus extensions for payments, multi-vendor marketplaces and more.
Deploy Bagisto in Under 5 Minutes
- Click Deploy on Railway. The app key and MySQL password are generated for you.
- Wait for MySQL, then for Bagisto's first boot. The first boot runs migrations and seeding, which takes a few minutes.
- Open the public domain to see the demo storefront.
- Go to
/adminand sign in withadmin@example.comandadmin123. - Change the admin email and password right away, then set your store name, currency, payment and shipping methods.
Common Use Cases
- Small online stores: sell physical or digital products without monthly platform fees.
- Multi-language shops: serve customers in several languages and currencies from one admin.
- Headless commerce: use the APIs behind a custom React, Vue or mobile frontend.
- B2B and marketplaces: extend Bagisto with marketplace or B2B modules.
- Laravel teams: build custom features in a familiar Laravel codebase.
- Store prototypes: stand up a demo store with sample data for client reviews.
- Migrating off hosted platforms: import products by CSV and keep full control of customer and order data.
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
APP_KEY | 🔐 Auto-generated | base64: plus a secret | Laravel encryption key. Never change after launch |
APP_URL | Auto-set | Railway domain | Public store URL used in links and emails |
APP_CURRENCY | Optional | USD | Default store currency |
APP_LOCALE | Optional | en | Default storefront language |
APP_TIMEZONE | Optional | UTC | Store timezone |
DB_* | Auto-set | MySQL references | Database connection to the MySQL service |
MAIL_MAILER | Optional | smtp | Mail transport |
MAIL_HOST, MAIL_PORT | Required for email | placeholder | Your SMTP server and port |
MAIL_USERNAME, MAIL_PASSWORD | Required for email | placeholder | SMTP login |
MAIL_FROM_ADDRESS, MAIL_FROM_NAME | Optional | shop@example.com, Shop | Sender shown on order emails |
TRUSTED_PROXIES | Optional | * | Trusts Railway's proxy so links use HTTPS |
QUEUE_CONNECTION | Optional | sync | Runs jobs inline with the request |
Set up email before taking orders. The mail variables start with placeholder text, not real values. Order confirmations and password resets can fail until you enter your SMTP host, port and login.
Custom domain. Add it in Railway, then set APP_URL to the new address and redeploy so links and images use it.
Performance. Bagisto runs with file-based cache and sessions and a synchronous queue, which is simple and fine for small stores. For heavier traffic, add a Redis service and set CACHE_STORE, SESSION_DRIVER and QUEUE_CONNECTION to redis, then run a queue worker so order emails and indexing happen in the background.
Search and indexing. Product prices and inventory indexes rebuild on save. After a large CSV import, run php artisan indexer:index from a Railway shell to refresh everything at once.
Payments. Bagisto ships with cash on delivery, money transfer and PayPal. Configure them under Configure, Sales, Payment Methods, and add other gateways from the Bagisto extension store.
Upgrades. The image is pinned to 2.4.3 while Bagisto 2.5.1 is out. To upgrade, change the image tag, redeploy, and let the migrations run. Back up MySQL first.
Bagisto vs. Alternatives
| Feature | Bagisto on Railway | Shopify Basic | WooCommerce | PrestaShop |
|---|---|---|---|---|
| Hosting | Self-hosted | Hosted SaaS | Self-hosted | Self-hosted |
| License | MIT | Proprietary | GPL-3.0 | OSL-3.0 |
| Framework | Laravel | Closed | WordPress | Symfony |
| Multi-channel and multi-currency | ✅ | Limited | Via plugins | ✅ |
| REST and GraphQL APIs | ✅ via packages | ✅ | REST | REST |
| Platform fees | None | Monthly plan | None | None |
| Price | About $10–20/month | $39/month | Hosting cost | Hosting cost |
Shopify is the easiest way to start but keeps raising costs as you add apps. WooCommerce suits WordPress sites. Bagisto fits teams that want a modern Laravel codebase they fully control.
Dependencies for Bagisto Hosting
- A Railway account.
- An SMTP provider for order and account emails.
- A payment gateway account. PayPal is built in; others such as Stripe come as extensions.
Deployment Dependencies
- Bagisto on GitHub: source code and releases
- Bagisto documentation: installation, configuration and APIs
- Bagisto on Docker Hub: image tags
Implementation Details
Product images and uploads live on the storage volume and are linked into the public folder at boot. MySQL runs with binary logs and the performance schema off to save memory. The original template ran the seeders on every boot, which deleted channels, categories, attributes and settings and reset the admin password; this version seeds once and records it in storage/.railway-seeded. Delete that file only if you want a fresh demo store.
Frequently Asked Questions
What is Bagisto? An MIT-licensed Laravel and Vue.js eCommerce platform with a storefront, admin panel, multi-channel support and APIs.
How much does it cost to host Bagisto? About $10–20/month on Railway for the app and MySQL, with no platform or transaction fees.
What is the default admin login?
admin@example.com with admin123 at /admin. Change both immediately after the first login.
Will redeploying reset my store? No. Seeding runs only on the first boot, and products, orders and settings stay in MySQL.
Why are emails not sending?
The SMTP variables start as placeholders. Set MAIL_HOST, MAIL_PORT, MAIL_USERNAME and MAIL_PASSWORD, then redeploy.
Can I use my own domain?
Yes. Add a custom domain in Railway and update APP_URL to match.
Why Deploy and Host Bagisto on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Bagisto on Railway, you get a full Laravel online store with MySQL, an admin panel and APIs, without monthly platform fees or locked-in data.
Template Content
Bagisto
webkul/bagisto:2.4.3MySQL
mysql:9.4