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

# Local Deployment

> Set up OpnForm locally for development

<Note>
  The easiest way to get started with OpnForm is through our [official managed service in the Cloud](https://opnform.com/?utm_source=docs\&utm_medium=introduction\&utm_campaign=cloud_version). It takes just 1 minute to start building forms with the free plan, with high availability, backups, security, and maintenance all managed for you.
</Note>

## Docker Development Setup (Recommended)

We recommend using our Docker-based development environment for the easiest setup experience. It provides hot-reload, debugging support, and all necessary services pre-configured.

See our [Docker Development Setup](/deployment/docker-development) guide to get started with Docker.

## Manual Setup

If you prefer to set up OpnForm manually or can't use Docker, follow the instructions below.

## Requirements

Before proceeding with the local deployment, ensure you have the following prerequisites installed on your system:

* **PHP**: Version 8.0 or higher
* **Composer**: The PHP dependency manager
* **Node.js**: Version 14 or higher
* **NPM** or **Yarn**: Package managers for Node.js
* **MySQL**, or **PostgreSQL**: A supported database system

Make sure these components are properly installed and configured on your local machine before proceeding with the deployment steps.

## Local setup

1. Install Laravel Herd -Download and install Laravel Herd from the official website: [https://herd.laravel.com/](https://herd.laravel.com/)

2. Clone the repository and install dependencies:

   ```bash theme={null}
   git clone https://github.com/OpnForm/OpnForm && cd OpnForm
   cd api && composer install
   cd ../client && npm install
   ```

3. Compile assets and run dev server:

   ```bash theme={null}
   cd client && npm run dev # or build
   ```

4. Set up environment files:

   ```bash theme={null}
   ./scripts/setup-env.sh
   ```

   This script will create the necessary `.env` files for both the API and client.

5. Run the migrations:

   ```bash theme={null}
   cd api
   php artisan migrate
   ```

6. Set up Herd:
   For detailed instructions on setting up Herd, refer to the [Herd documentation](https://herd.laravel.com/docs).

   * Open the Herd application
   * Add your OpnForm's `api` directory to Herd
   * Herd will automatically configure a local domain for your project

   This will start the Nuxt.js development server, typically on `http://localhost:3000`.

7. Access your local OpnForm installation:
   * The API will be available at the domain provided by Herd (e.g., `http://opnform.test`)
   * The frontend will be accessible at `http://localhost:3000`
