Requirements
- PHP >= 8.4
- Laravel 12 or 13
bcmathPHP extensionexifPHP extensionintlPHP extension- MySQL or PostgreSQL
Lunar v2 splits what was previously a single
lunarphp/lunar package into a headless core plus a choice of admin panel. lunarphp/core has no Filament dependency and works standalone for a custom storefront, a custom admin, or an API-only deployment.1. Install the core package
2. Choose an admin panel
Install one panel package alongside the core. Each is an equal, explicit choice — none is bundled by default.It is possible to run Lunar with no panel at all — for example, an API-only storefront that manages products and orders through custom tooling.
php artisan lunar:panel:install.
3. Add the LunarUser contract
Parts of Lunar core rely on theUser model exposing certain e-commerce relationships (carts, orders, customers). Add the bundled trait and interface to any model that represents users in the application.
4. Run the installer
- Publishes configuration files (skips existing ones unless told to overwrite)
- Prompts to run database migrations
- Creates the first admin staff account (via
lunar:create-admin, when none exists) - Imports country and state reference data
- Seeds initial data: a default channel, location, language, currency (USD), customer group, collection group, tax class, tax zone, product type, and a default region tying these together
- Publishes Filament assets (when Filament is installed)
- Offers to run
lunar:panel:install(when the Inertia panel is installed)
5. Access the admin panel
Once installed, visit the admin panel at the path configured by the chosen panel package. See Admin Panel Installation for the default path and how to change it.Telemetry
Lunar sends anonymous usage data once per day to help the maintainers understand how Lunar is used. The data does not identify a store in any way. To opt out, add the following to a service provider’sboot method:
Advanced installation options
Publish configuration before installing
The installer publishes configuration files automatically, but to customize settings before runningphp artisan lunar:install, publish them manually first:
Table prefix
Lunar prefixes all of its database tables to avoid conflicts. The default prefix islunar_ and can be changed in config/lunar/database.php:
Database connection and morph prefix
config/lunar/database.php also controls which database connection Lunar’s models use, and an optional prefix for Lunar’s morph map aliases:
User ID field type
Lunar assumes theUser model primary key is a BIGINT. If the application uses INT or UUID primary keys, update config/lunar/database.php before running migrations:
Disable bundled migrations
To take full control of Lunar’s database migrations, disable the bundled migrations and publish them into the application:Search
lunarphp/core depends on Laravel Scout, and defaults to Scout’s collection driver, which needs no external service and is suitable for local development. For production search (faceted search, filtering, and dedicated engines like Meilisearch or Typesense), install the Storefront Search add-on.
What’s next?
Starter Kits
Get a head start with a pre-built Livewire or Inertia storefront.
Storefront Guides
Learn how to build a storefront from scratch with step-by-step guides.
System Settings
Configure regions, channels, languages, currencies, and more.