# Instalação customizada NocoDB

LInk: [https://nocodb.com/docs/self-hosting/installation/custom-infrastructure](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure)

### Custom Infrastructure

Use this page for NocoDB deployments that the single-server installation wizard does not cover. These include managed databases, custom SSL certificates, private CAs, your own reverse proxy, multi-replica setups and Kubernetes.

### [Before you begin](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#before-you-begin)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

NocoDB works with all actively maintained PostgreSQL releases (12 and later). Use the version that your managed provider offers. We recommend a current major version.

### [When to use this page](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#when-to-use-this-page)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

Use this page if one of these is true:

<div class="prose flex-1" id="bkmrk-you-use-a-managed-po" style="text-align: justify;">- You use a managed Postgres (RDS, Azure, Cloud SQL) with public CA SSL.
- You use a self-managed Postgres with a private or internal CA.
- You already have a TLS certificate and want to pin it through Traefik.
- You have nginx, Caddy or a load balancer in front, and want NocoDB on port 8080.
- You deploy to Kubernetes and want a reference compose file to translate.

</div>### [Option A: Clone the repo and run the wizard interactively](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#option-a-clone-the-repo-and-run-the-wizard-interactively)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

<div class="prose flex-1" id="bkmrk-git-clone-https%3A%2F%2Fgi" style="text-align: justify;"><figure class="my-4 bg-fd-card rounded-xl shiki relative border shadow-sm not-prose overflow-hidden text-sm shiki shiki-themes github-light github-dark" dir="ltr" tabindex="-1"><div class="empty:hidden absolute top-2 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground"><button aria-label="Copy Text" class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring p-1 [&_svg]:size-4 hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground" type="button"><svg class="lucide" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><rect height="4" rx="1" ry="1" width="8" x="8" y="2"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></svg></button></div>```
git clone https://github.com/nocodb/nocodb.gitcd nocodb/docker-compose./setup.sh
```

</figure></div>`setup.sh` runs the same installation wizard as the [Single-server install](https://nocodb.com/docs/self-hosting/installation/single-server) one-liner. It writes its output into the current working directory. Use this option to edit the generated files before you start the stack.

### [Option B: Copy a pre-built example](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#option-b-copy-a-pre-built-example)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

The [`docker-compose/examples/`](https://github.com/nocodb/nocodb/tree/develop/docker-compose/examples) directory contains a set of selected configurations.

<div class="prose flex-1" id="bkmrk-example-postgres-red" style="text-align: justify;"><div class="relative overflow-auto prose-no-margin my-6"><table style="width: 100%;"><thead><tr><th style="width: 29.4392%;">Example</th><th style="width: 21.4625%;">Postgres</th><th style="width: 9.41741%;">Redis</th><th style="width: 15.9738%;">Proxy</th><th style="width: 23.7223%;">Best for</th></tr></thead><tbody><tr><td style="width: 29.4392%;">[`quickstart-demo`](https://github.com/nocodb/nocodb/tree/develop/docker-compose/examples/quickstart-demo)</td><td style="width: 21.4625%;">Bundled</td><td style="width: 9.41741%;">Bundled</td><td style="width: 15.9738%;">None (port 8080)</td><td style="width: 23.7223%;">Local eval / "show me NocoDB"</td></tr><tr><td style="width: 29.4392%;">[`managed-postgres`](https://github.com/nocodb/nocodb/tree/develop/docker-compose/examples/managed-postgres)</td><td style="width: 21.4625%;">External managed (RDS/Azure/Cloud SQL)</td><td style="width: 9.41741%;">External</td><td style="width: 15.9738%;">None (port 8080)</td><td style="width: 23.7223%;">Production behind your own LB</td></tr><tr><td style="width: 29.4392%;">[`external-postgres-and-redis`](https://github.com/nocodb/nocodb/tree/develop/docker-compose/examples/external-postgres-and-redis)</td><td style="width: 21.4625%;">External self-managed</td><td style="width: 9.41741%;">External</td><td style="width: 15.9738%;">None (port 8080)</td><td style="width: 23.7223%;">Minimal Docker footprint</td></tr><tr><td style="width: 29.4392%;">[`traefik-custom-ssl`](https://github.com/nocodb/nocodb/tree/develop/docker-compose/examples/traefik-custom-ssl)</td><td style="width: 21.4625%;">External managed</td><td style="width: 9.41741%;">External</td><td style="width: 15.9738%;">Traefik + custom TLS cert</td><td style="width: 23.7223%;">Production with your own SSL cert</td></tr><tr><td style="width: 29.4392%;">[`postgres-private-ca`](https://github.com/nocodb/nocodb/tree/develop/docker-compose/examples/postgres-private-ca)</td><td style="width: 21.4625%;">External (private CA)</td><td style="width: 9.41741%;">External</td><td style="width: 15.9738%;">Traefik + Let's Encrypt</td><td style="width: 23.7223%;">On-prem / private cloud DB</td></tr></tbody></table>

</div></div>To start quickly with an example:

```
git clone --depth 1 https://github.com/nocodb/nocodb.git cp -r nocodb/docker-compose/examples/managed-postgres ./my-deploymentcd my-deployment# Edit docker-compose.yml, docker.env, and nocodb/db.json: replace placeholdersdocker compose up -d
```

<div class="prose flex-1" id="bkmrk-" style="text-align: justify;"><figure class="my-4 bg-fd-card rounded-xl shiki relative border shadow-sm not-prose overflow-hidden text-sm shiki shiki-themes github-light github-dark" dir="ltr" tabindex="-1"><div class="empty:hidden absolute top-2 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground"><button aria-label="Copy Text" class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring p-1 [&_svg]:size-4 hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground" type="button"><svg class="lucide" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><rect height="4" rx="1" ry="1" width="8" x="8" y="2"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></svg></button></div></figure></div>## [Configuring SSL for an external Postgres with a private CA](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#configuring-ssl-for-an-external-postgres-with-a-private-ca)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

SSL for an external Postgres with a private CA is the most complex external database setup. NocoDB reads its database connection from `nocodb/db.json` (knex format). In this file, you can put a CA certificate inline:

<div class="prose flex-1" id="bkmrk-%7B-%22client%22%3A-%22pg%22%2C-%22c" style="text-align: justify;"><figure class="my-4 bg-fd-card rounded-xl shiki relative border shadow-sm not-prose overflow-hidden text-sm shiki shiki-themes github-light github-dark" dir="ltr" tabindex="-1"><div class="empty:hidden absolute top-2 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground"><button aria-label="Copy Text" class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring p-1 [&_svg]:size-4 hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground" type="button"><svg class="lucide" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><rect height="4" rx="1" ry="1" width="8" x="8" y="2"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></svg></button></div>```
{  "client": "pg",  "connection": {    "host": "your-private-db-host.internal",    "port": "5432",    "user": "nocodb",    "password": "your-password",    "database": "nocodb",    "ssl": {      "rejectUnauthorized": true,      "ca": "-----BEGIN CERTIFICATE-----\nMIID...\n-----END CERTIFICATE-----"    }  }}
```

</figure></div>The CA must be one string, with newlines escaped as `\n`. The `postgres-private-ca` example shows the full layout, with a Traefik proxy.

To change a multi-line PEM into the single-line JSON form, run:

<div class="prose flex-1" id="bkmrk-awk-%27nf-%7Bsub%28%2F%5Cr%2F%2C-%22" style="text-align: justify;"><figure class="my-4 bg-fd-card rounded-xl shiki relative border shadow-sm not-prose overflow-hidden text-sm shiki shiki-themes github-light github-dark" dir="ltr" tabindex="-1"><div class="empty:hidden absolute top-2 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground"><button aria-label="Copy Text" class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring p-1 [&_svg]:size-4 hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground" type="button"><svg class="lucide" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><rect height="4" rx="1" ry="1" width="8" x="8" y="2"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></svg></button></div>```
awk 'NF {sub(/\r/, ""); printf "%s\\n", $0}' your-ca.pem
```

</figure></div>## [Multi-replica / scaling](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#multi-replica--scaling)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

NocoDB scales horizontally when you configure Redis. Redis is necessary for distributed coordination:

<div class="prose flex-1" id="bkmrk-%23-in-docker-compose." style="text-align: justify;"><figure class="my-4 bg-fd-card rounded-xl shiki relative border shadow-sm not-prose overflow-hidden text-sm shiki shiki-themes github-light github-dark" dir="ltr" tabindex="-1"><div class="empty:hidden absolute top-2 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground"><button aria-label="Copy Text" class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring p-1 [&_svg]:size-4 hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground" type="button"><svg class="lucide" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><rect height="4" rx="1" ry="1" width="8" x="8" y="2"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></svg></button></div>```
# In docker-compose.ymlnocodb:  deploy:    mode: replicated    replicas: 3
```

</figure></div>For more than a few replicas, run NocoDB in Kubernetes. Translate one of the examples into a Deployment + Service + Ingress. Point the same env vars at managed Postgres and Redis.

## [Bringing your own reverse proxy](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#bringing-your-own-reverse-proxy)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

The `managed-postgres` and `external-postgres-and-redis` examples expose NocoDB on host port 8080, without Traefik.

<div class="prose flex-1" id="bkmrk-put-your-own-nginx%2C-" style="text-align: justify;">1. Put your own nginx, Caddy or load balancer in front.
2. Forward HTTP traffic to port 8080.
3. Forward the `X-Forwarded-Proto` and `Host` headers. NocoDB needs them to make correct callback URLs.

</div>## [Related](https://nocodb.com/docs/self-hosting/installation/custom-infrastructure#related)<svg aria-hidden="true" class="lucide size-3.5 shrink-0 text-fd-muted-foreground opacity-0 transition-opacity peer-hover:opacity-100" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>

<div class="prose flex-1" id="bkmrk-single-server-instal" style="text-align: justify;">- [Single-Server Install](https://nocodb.com/docs/self-hosting/installation/single-server)

</div>Last updated on <time datetime="2026-10-03T10:48:45.000Z">October 3, 2026</time>

<div class="mt-10 flex flex-col gap-2.5 text-nc-content-grey-subtle-2 text-sm" id="bkmrk-latest-product-updat"><div class="flex flex-wrap items-center gap-x-2 gap-y-1" style="text-align: justify;"><span class="shrink-0"><svg aria-hidden="true" class="lucide lucide-flask-conical size-3.5" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"></path><path d="M6.453 15h11.094"></path><path d="M8.5 2h7"></path></svg></span>Latest product updates?[See Changelog](https://nocodb.com/docs/changelog)</div></div>