> 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/self-hosting/want-to-explore/readme-1/local-setup-using-individual-components/set-up-hyperswitch-backend/configure-and-run-the-application.md).

# Configure and Run the Application

Configure and run the Hyperswitch application with environment-specific settings for development

### Configure the application

The application configuration files are present under the [`config`](https://github.com/juspay/hyperswitch/blob/main/config) directory.

The configuration file read varies with the environment:

* Development: [`config/development.toml`](https://github.com/juspay/hyperswitch/blob/main/config/development.toml)
* Sandbox: `config/sandbox.toml`
* Production: `config/production.toml`

Refer to [`config.example.toml`](https://github.com/juspay/hyperswitch/blob/main/config/config.example.toml) for all the available configuration options. Refer to [`development.toml`](https://github.com/juspay/hyperswitch/blob/main/config/development.toml) for the recommended defaults for local development.

Ensure to update the [`development.toml`](https://github.com/juspay/hyperswitch/blob/main/config/development.toml) file if you opted to use different database credentials as compared to the sample ones included in this guide.

Once you're done with configuring the application, proceed with [running the application](#run-the-application).

#### Run the application

1. Compile and run the application using `cargo`:

   ```bash
   cargo run
   ```

   If you are using `nix`, you can compile and run the application using `nix`:

   ```bash
   nix run
   ```
2. Verify that the server is up and running by hitting the health endpoint:

   ```bash
   curl --head --request GET 'http://localhost:8080/health'
   ```

   If the command returned a `200 OK` status code, proceed with trying out our APIs.

{% content-ref url="/pages/LKuAfum9EKsnM93AWZOE" %}
[Try out APIs](/self-hosting/want-to-explore/readme-1/local-setup-using-individual-components/set-up-hyperswitch-backend/try-out-apis.md)
{% endcontent-ref %}


---

# 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/self-hosting/want-to-explore/readme-1/local-setup-using-individual-components/set-up-hyperswitch-backend/configure-and-run-the-application.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.
