> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/~/revisions/iPtyU5MKxmgIsGywgRhI/explore-hyperswitch/workflows/intelligent-routing/self-deployment-guide.md). Agents can also search and read this documentation through its [MCP server](https://docs.hyperswitch.io/~gitbook/mcp).

# Self-Deployment Guide

### Self Deploy and integrate it with your existing orchestrator

How it fits into your existing payments setup:

<figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-702b6a04d209ba6b388263c1bcb4ddbf4e9f939e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 1. Clone the Repository

```
git clone https://github.com/juspay/decision-engine.git
cd decision-engine
```

#### 2. Install Docker

```
Make sure Docker is installed on your system.
You can download and install Docker Desktop from the below links.

- Mac - https://docs.docker.com/desktop/setup/install/mac-install/
- Windows - https://docs.docker.com/desktop/setup/install/windows-install/
- Linux - https://docs.docker.com/desktop/setup/install/linux/
```

#### 3. Run the Project

**a. First-Time Setup**

If you're setting up the environment for the first time, run:

<pre><code><strong>make init
</strong></code></pre>

This command performs the following under the hood:

```
docker-compose run --rm db-migrator && docker-compose up open-router
```

This will:

* Set up the environment
* Set up the database with the required schema
* Sets up redis and the server for running the application
* Push the configs defined in the config.yaml & the static rules defined for routing in priority\_logic.txt to the DB

#### b. Start the Server (without resetting DB)

If the DB schema is already set up and you don't want to reset the DB, use:

```
make run
```

**System Requirements:** Approximately 2GB of disk space

After successful setup, the server will start running.

#### Once the server is setup, you can refer to the [API reference](https://github.com/juspay/decision-engine/blob/main/docs/api-reference1.md) for usage


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hyperswitch.io/~/revisions/iPtyU5MKxmgIsGywgRhI/explore-hyperswitch/workflows/intelligent-routing/self-deployment-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
