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

# Nginx Ingress Controller

## How to Install Nginx Ingress Controller

You can execute the following commands to install the Nginx Ingress Controller on your Kubernetes cluster:

```bash theme={null}
kubectl apply -f ./ingress-nginx-controller-v1.12.1.yaml
```

> <a href="https://assets-docs.dify.ai/2025/07/727045c765d5052ef3cc2f4b15aaa492.yaml" download="ingress-nginx-controller-v1.12.1.yaml">Click here</a> to download the `ingress-nginx-controller-v1.12.1.yaml` file.

## How to Configure Nginx Ingress Controller

If you are using the Nginx Ingress Controller, you should set the file upload size limit in the `annotations` field, too.

```yaml theme={null}
ingress:
  enabled: true
  className: "nginx"
  annotations: {
    # set file upload size limit
    nginx.ingress.kubernetes.io/proxy-body-size: "15m"
  }
  ... ...
```

## How to Access Dify Enterprise

After Ingress Controller is set up, get the external IP of the Ingress Controller first.

```bash theme={null}
kubectl get svc -n ingress-nginx
```

Then get the external IP of the Ingress Controller and add the following line to your `/etc/hosts` file.

```bash theme={null}
4.152.1.216 console.dify.local
4.152.1.216 app.dify.local
4.152.1.216 api.dify.local
4.152.1.216 upload.dify.local
4.152.1.216 enterprise.dify.local
4.152.1.216 trigger.dify.local
```

## What should you do if you use other Ingress Controllers?

* Generally, Cloud Providers have their own ingress controller. You can use the Cloud Provider's ingress controller. For more information, please refer to the [kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
* `File Upload Size Limit`: You may need to set the file upload size limit in the `annotations` field of your Ingress Controller configuration. For example, for Nginx Ingress Controller, you can use `nginx.ingress.kubernetes.io/proxy-body-size: "15m"`.
* `Audit Logs IP`: You should config `X-Forwarded-For` header in your Ingress Controller to pass the real IP address of the client.
