> ## Documentation Index
> Fetch the complete documentation index at: https://ownpay.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> OwnPay is licensed under AGPL-3.0 and is completely free - no licensing fees.
> Production docs URL: https://ownpay.org/docs - append .md to any page URL for clean markdown.
> OwnPay requires PHP 8.3+, MySQL/MariaDB, and Redis.
> MCP server available at https://ownpay.org/docs/mcp for programmatic documentation queries.
> Use root-relative links (e.g. /quickstart) for internal navigation - do NOT include /docs prefix.
> Plugin development: consult /developer/plugin-types/ pages for correct interfaces and manifests.

# Quickstart - Get Your Payment Gateway Running in 5 Minutes

> Get your self-hosted payment gateway running in 5 minutes. Install OwnPay, configure your first gateway, and start accepting payments.

<Snippet file="llms-directive.mdx" />

Get your self-hosted payment gateway running in 5 minutes. This guide covers the fastest path from zero to processing payments with OwnPay.

<Info>
  This guide assumes basic familiarity with web hosting. Developers looking to integrate the API should see the [Developer Quickstart](/developer/quickstart).
</Info>

## Prerequisites

Before you begin, make sure you have:

* **PHP 8.3+** with required extensions
* **MySQL 5.7+** or MariaDB 10.3+
* **Web server** (Apache or Nginx)
* **SSL certificate** (required for production)

<Tip>
  Don't have a server? Skip to [Shared Hosting](#shared-hosting) for cPanel/DirectAdmin installation, or [VPS](#vps-cloud-server) for Ubuntu/Debian.
</Tip>

## Installation

<Tabs>
  <Tab title="Shared Hosting" icon="globe">
    A quick way to get started. Works with hosts like Hostinger, Namecheap, and SiteGround.

    <Steps>
      <Step title="Download OwnPay">
        Go to the [GitHub Releases page](https://github.com/own-pay/OwnPay/releases/) and download the latest `.zip` file.
      </Step>

      <Step title="Upload to hosting">
        Upload the `.zip` file to your web root (`public_html/`) using File Manager or FTP.
      </Step>

      <Step title="Extract and set PHP">
        Extract the ZIP file. Set PHP version to **8.3** in your hosting control panel.
      </Step>

      <Step title="Create MySQL database">
        Create a new database and user with **All Privileges**. Note the database name, username, and password.
      </Step>

      <Step title="Run the installer">
        Visit `https://yourdomain.com/install` and follow the 4-step wizard:

        * Requirements check
        * Database configuration
        * Admin account creation
        * Application settings
      </Step>

      <Step title="Set up cron job">
        Add a cron job to run every minute:

        ```bash theme={null}
        * * * * * php /home/your_username/public_html/public/index.php cron
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="VPS / Cloud Server" id="vps-cloud-server" icon="server">
    For production use. Gives you full control, Redis caching support, and server-level configuration.

    <Steps>
      <Step title="Connect via SSH">
        ```bash theme={null}
        ssh root@YOUR_SERVER_IP
        ```
      </Step>

      <Step title="Update and install software">
        ```bash theme={null}
        sudo apt update && sudo apt upgrade -y
        sudo apt install -y nginx mysql-server \
          php8.3-fpm php8.3-mysql php8.3-mbstring php8.3-curl \
          php8.3-xml php8.3-zip php8.3-gd php8.3-bcmath \
          php8.3-intl unzip curl
        ```
      </Step>

      <Step title="Set up MySQL database">
        ```bash theme={null}
        sudo mysql_secure_installation
        sudo mysql -u root -p
        ```

        ```sql theme={null}
        CREATE DATABASE ownpay CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
        CREATE USER 'ownpay'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD';
        GRANT ALL PRIVILEGES ON ownpay.* TO 'ownpay'@'localhost';
        FLUSH PRIVILEGES;
        ```
      </Step>

      <Step title="Download and configure OwnPay">
        ```bash theme={null}
        cd /var/www
        sudo wget https://github.com/own-pay/OwnPay/releases/download/vX.X.X/ownpay-vX.X.X.zip
        sudo unzip ownpay-vX.X.X.zip -d ownpay
        sudo chown -R www-data:www-data /var/www/ownpay
        sudo chmod -R 775 /var/www/ownpay/storage
        ```
      </Step>

      <Step title="Configure Nginx">
        Create `/etc/nginx/sites-available/ownpay` with the PHP-FPM configuration, then:

        ```bash theme={null}
        sudo ln -s /etc/nginx/sites-available/ownpay /etc/nginx/sites-enabled/
        sudo nginx -t && sudo systemctl reload nginx
        ```
      </Step>

      <Step title="Install SSL">
        ```bash theme={null}
        sudo apt install -y certbot python3-certbot-nginx
        sudo certbot --nginx -d yourdomain.com
        ```
      </Step>

      <Step title="Run installer and set up cron">
        Visit `https://yourdomain.com/install` to complete setup, then add the cron job:

        ```bash theme={null}
        sudo crontab -u www-data -e
        ```

        ```bash theme={null}
        * * * * * /usr/bin/php /var/www/ownpay/public/index.php cron >> /var/log/ownpay-cron.log 2>&1
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Docker" icon="box">
    Run OwnPay in containers for deployment and scaling.

    <Steps>
      <Step title="Clone the repository">
        ```bash theme={null}
        git clone https://github.com/own-pay/OwnPay.git
        cd ownpay
        ```
      </Step>

      <Step title="Configure environment">
        ```bash theme={null}
        cp .env.example .env
        # Edit .env with your database credentials
        ```
      </Step>

      <Step title="Start containers">
        ```bash theme={null}
        docker-compose up -d
        ```
      </Step>

      <Step title="Run migrations">
        ```bash theme={null}
        docker-compose exec app php public/index.php migrate
        ```
      </Step>
    </Steps>
  </Tab>
</Tabs>

## First login

Navigate to `https://yourdomain.com/login` and log in with the admin credentials you created during installation.

<Warning>
  Change your default password immediately after first login. Enable Two-Factor Authentication under your profile for security.
</Warning>

## Create your first brand

<Steps>
  <Step title="Navigate to Brands">
    Go to **People > Brands** in the admin sidebar.
  </Step>

  <Step title="Create a brand">
    Click **Add Brand** and fill in:

    * Brand name and slug
    * Default currency
    * Timezone
    * Contact email
  </Step>

  <Step title="Configure a gateway">
    Go to **Gateways** and activate a payment gateway. Enter your provider's API credentials.
  </Step>

  <Step title="Test a payment">
    Create a payment link and complete a test transaction to verify everything works.
  </Step>
</Steps>

## What's next?

### For brand owners

<CardGroup cols={2}>
  <Card title="Multi-brand setup" icon="store" href="/concepts/brands">
    Configure multiple brands with isolated data and custom domains.
  </Card>

  <Card title="Production deployment" icon="server" href="/resources/local-setup">
    Optimize OwnPay for production with Redis, SSL, and monitoring.
  </Card>
</CardGroup>

### For developers

<CardGroup cols={2}>
  <Card title="API integration" icon="code" href="/developer/quickstart">
    Integrate OwnPay with your applications via REST API.
  </Card>

  <Card title="Gateway plugins" icon="plug" href="/developer/plugin-types/gateway-development">
    Build custom payment gateway plugins.
  </Card>
</CardGroup>

<Tip>
  Need help? Check our [Troubleshooting guide](/advanced-topics/troubleshooting) or open an issue on [GitHub](https://github.com/own-pay/OwnPay/issues).
</Tip>


## Related topics

- [Developer Quickstart - Build Your First Payment Integration](/docs/developer/quickstart.md)
- [Node.js SDK - TypeScript-First Payment Integration](/docs/developer/integration/nodejs.md)
- [System Health Check](/docs/api-reference/system-health-check.md)
- [OwnPay API Overview - REST API for Multi-Brand Payments](/docs/api/overview.md)
- [Retrieve Payment Details](/docs/api-reference/retrieve-payment-details.md)
