Getting OwnPay running locally is straightforward — the quick path uses PHP’s built-in web server, works identically on Windows, macOS, and Linux, and requires no web-server configuration. From a fresh clone to the admin panel takes about two minutes once the prerequisites are installed.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/own-pay/OwnPay-Documentation/llms.txt
Use this file to discover all available pages before exploring further.
New to the codebase? Read the Architecture guide first to understand the directory structure and request lifecycle before diving into code.
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| PHP | 8.3+ | Requires: bcmath, json, mbstring, openssl, pdo, pdo_mysql, curl |
| Composer | 2.x | PHP dependency manager — getcomposer.org |
| MySQL or MariaDB | MySQL 8.0+ / MariaDB 10.4+ | The only supported database engine |
| Git | Any recent version | git-scm.com |
| Node.js | 20+ (optional) | Required only for JS/CSS linting (composer lint) |
Quick Start — All Platforms (~2 minutes)
This path works identically on Windows, macOS, and Linux.Create an Empty Database
Run the Install Wizard
Open http://localhost:8000 in your browser. You’ll be redirected to the
/install wizard, which generates your .env, imports the 48-table schema, and creates your admin account. No manual .env editing required.The installer writes a lock file at
storage/.installed. To re-run the installer, delete that file and drop/recreate the database. Do not delete the lock file on a production installation.Platform-Specific Stacks
Prefer a real web server with pretty*.test domains? These bundled stacks make it easy.
🪟 Windows — Laragon (Recommended)
🪟 Windows — Laragon (Recommended)
Laragon bundles PHP 8.3, MySQL, Apache/Nginx, and auto-creates
.test domains.- Install Laragon and click Start All.
- Verify the bundled PHP is 8.3+ (Menu → PHP → Version; switch if needed).
- Put the project in Laragon’s
wwwfolder:C:\laragon\www\ownpay. - Laragon auto-creates the vhost
http://ownpay.test(Menu → Reload if it doesn’t appear). - Create the database in HeidiSQL (bundled) or run the
CREATE DATABASEcommand above. - Visit http://ownpay.test → the installer wizard runs.
🍎 macOS — Laravel Herd (Recommended)
🍎 macOS — Laravel Herd (Recommended)
Herd is a free, one-click PHP + Nginx + dnsmasq environment.
- Install Herd — it ships PHP 8.3+ and Composer.
- Add the folder containing the project as a Parked path (Herd → Settings → General), or run
herd parkfrom the parent directory. Herd points the site atpublic/automatically. - Start MySQL with DBngin (free) or Homebrew:
brew install mysql && brew services start mysql. Create theownpaydatabase. - Visit https://ownpay.test → the installer wizard runs.
🐧 Linux — Native Packages
🐧 Linux — Native Packages
Debian / Ubuntu:Fedora / RHEL:For a production-like Nginx or Apache setup, point the document root at
public/ and route all requests to public/index.php. An Apache .htaccess is already included; an nginx.conf.example ships in the repo root.Verify Your Setup
After installation, run the same checks that CI runs. All three must pass on a clean checkout:Optional: Gateway Callback Tunneling
External gateways (bKash, Stripe, etc.) cannot reachlocalhost or *.test domains. To test real redirects and webhooks, expose your local server with a tunnel:
Troubleshooting
| Symptom | Fix |
|---|---|
/install says a PHP extension is missing | Install the listed php-* extension and restart the server. Re-check with php -m. |
composer install fails on ext-* | Your CLI PHP lacks an extension. Install it (e.g., php8.3-bcmath). Note that the CLI php.ini may differ from the web one. |
| ”Could not connect to database” in the wizard | Confirm MySQL is running and the database exists. On macOS/Linux, the default user is often root with an empty password or socket authentication. |
| Blank page or 500 with no detail | Set APP_DEBUG=true in .env for a detailed error page (never in production). Check storage/logs/. |
| Installer redirects after completion | Delete storage/.installed only if you intend to reinstall; otherwise clear storage/cache/. |
Permission errors writing .env or storage/ | Ensure the project root and storage/ are writable by your user or the web-server user. |
Key Directories for Contributors
| Directory | What Lives Here |
|---|---|
src/Controller/ | HTTP handlers for admin, API, checkout, and install routes |
src/Service/ | Business logic — payments, brands, refunds, SMS, devices |
src/Repository/ | Data access layer with TenantScope brand isolation |
modules/gateways/ | Payment gateway adapter plugins |
templates/ | Twig views for admin, checkout, emails, and error pages |
config/routes/ | Route definitions (web.php, api.php) |
database/ | schema.sql and numbered migration files |