<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NocoDB &#8211; Aveshost Blog</title>
	<atom:link href="https://blog.aveshost.com/tag/nocodb/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.aveshost.com</link>
	<description>Your Blueprint for Online Success</description>
	<lastBuildDate>Mon, 23 Nov 2026 21:23:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://blog.aveshost.com/wp-content/uploads/2026/01/logo-150x150.png</url>
	<title>NocoDB &#8211; Aveshost Blog</title>
	<link>https://blog.aveshost.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Self-Host NocoDB on a VPS with PostgreSQL and HTTPS</title>
		<link>https://blog.aveshost.com/self-host-nocodb-vps-postgresql-https/</link>
					<comments>https://blog.aveshost.com/self-host-nocodb-vps-postgresql-https/#respond</comments>
		
		<dc:creator><![CDATA[James Wilson]]></dc:creator>
		<pubDate>Mon, 23 Nov 2026 21:23:00 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[NocoDB]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[self-hosting]]></category>
		<category><![CDATA[vps hosting]]></category>
		<guid isPermaLink="false">https://blog.aveshost.com/?p=6150</guid>

					<description><![CDATA[A complete production guide to self-hosting NocoDB on a Linux VPS using Docker Compose and PostgreSQL—covering NC_DB, NC_AUTH_JWT_SECRET, NC_PUBLIC_URL, Caddy/Nginx HTTPS reverse proxy, and firewall hardening.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Learning how to <strong>self-host NocoDB</strong> on your own Linux VPS gives your team an open-source Airtable alternative without per-seat SaaS fees or row-count limits. NocoDB turns any relational database into a fast collaborative spreadsheet UI with kanban boards, forms, webhooks, and a full REST API.</p>



<p class="wp-block-paragraph">While NocoDB can start quickly on embedded SQLite for local testing, production teams should pair it with <strong>PostgreSQL</strong> for concurrent multi-user writes, reliable backups, and cleaner scaling—especially when deployed behind an HTTPS reverse proxy like Caddy or Nginx.</p>



<p class="wp-block-paragraph">Whether you run <a href="https://www.aveshost.com/self-managed-vps-hosting" rel="noopener">self-managed VPS hosting</a> or <a href="https://www.aveshost.com/fully-managed-vps-hosting" rel="noopener">fully managed VPS hosting</a> with Aveshost, this guide walks through deploying NocoDB with Docker Compose, PostgreSQL 16, automatic Let&#8217;s Encrypt HTTPS, and essential security hardening.</p>



<div class="wp-block-rank-math-toc-block" id="rank-math-toc"><h2>Table of Contents</h2><nav><div><div><a href="#why-pair-nocodb-with-postgresql-and-a-reverse-proxy">Why Pair NocoDB with PostgreSQL and a Reverse Proxy</a></div><div><a href="#prerequisites-and-environment-variables">Prerequisites and Required NocoDB Environment Variables</a></div><div><a href="#step-1-deploy-nocodb-and-postgresql-with-docker-compose">Step 1: Deploy NocoDB and PostgreSQL 16 with Docker Compose</a></div><div><a href="#step-2-configure-https-with-caddy-or-nginx">Step 2: Add Automatic HTTPS with Caddy (or Nginx + Certbot)</a></div><div><a href="#step-3-backups-and-production-hardening">Step 3: Back Ups, Firewall Rules, and Production Checklist</a></div><div><a href="#faq">Frequently asked questions</a></div></div></nav></div>



<h2 id="why-pair-nocodb-with-postgresql-and-a-reverse-proxy" class="wp-block-heading">Why Pair NocoDB with PostgreSQL and a Reverse Proxy</h2>



<p class="wp-block-paragraph">Out of the box, NocoDB stores metadata in SQLite when no external database is configured. For solo experiments that works fine, but as soon as multiple teammates edit views, trigger webhooks, or upload attachments simultaneously, PostgreSQL eliminates write-lock contention (see our <a href="https://blog.aveshost.com/sqlite-vs-postgresql-vps/">SQLite vs PostgreSQL on a VPS comparison</a>).</p>



<p class="wp-block-paragraph">Separating storage into two layers also makes upgrades safer: PostgreSQL holds your workspace metadata, table schemas, and user permissions, while the <code>nocodb_data</code> Docker volume mounted at <code>/usr/app/data</code> stores uploaded file attachments and runtime state. You can recreate or upgrade the NocoDB container anytime without touching your relational data.</p>



<p class="wp-block-paragraph">Binding NocoDB strictly to <code>127.0.0.1:8080</code> and placing Caddy or Nginx in front of it keeps port <code>8080</code> and PostgreSQL port <code>5432</code> completely off the public internet while terminating TLS on port <code>443</code>.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-architecture.webp" alt="Architecture diagram showing self-hosted NocoDB behind Caddy or Nginx HTTPS proxy connected to PostgreSQL 16" class="wp-image-6148" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-architecture.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-architecture-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-architecture-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-architecture-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /></figure>



<h2 id="prerequisites-and-environment-variables" class="wp-block-heading">Prerequisites and Required NocoDB Environment Variables</h2>



<p class="wp-block-paragraph">Prepare an Ubuntu 22.04 or 24.04 VPS (at least 2 GB RAM recommended for PostgreSQL + NocoDB) with Docker Engine and Docker Compose installed, and point an A record (such as <code>nocodb.yourdomain.com</code>) to your server&#8217;s public IPv4 address. If you are setting up a fresh server, check our <a href="https://blog.aveshost.com/deploy-fastapi-ubuntu-vps/">Ubuntu VPS setup guide</a> for initial SSH and UFW steps.</p>



<p class="wp-block-paragraph">According to the <a href="https://docs.nocodb.com/getting-started/installation/" rel="noopener">official NocoDB installation documentation</a>, three environment variables matter most for a stable PostgreSQL + HTTPS deployment:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Environment Variable</th><th>Purpose</th><th>Production Example / Note</th></tr></thead><tbody><tr><td>NC_DB</td><td>PostgreSQL connection string for NocoDB metadata</td><td>pg://postgres:5432?u=nocodb&amp;p=STRONG_PASS&amp;d=nocodb</td></tr><tr><td>NC_AUTH_JWT_SECRET</td><td>Signs user session and API JWT tokens</td><td>Generate a long random 32+ character secret</td></tr><tr><td>NC_PUBLIC_URL</td><td>Canonical HTTPS URL behind reverse proxy</td><td>https://nocodb.yourdomain.com (fixes webhooks &amp; links)</td></tr></tbody></table></figure>



<h2 id="step-1-deploy-nocodb-and-postgresql-with-docker-compose" class="wp-block-heading">Step 1: Deploy NocoDB and PostgreSQL 16 with Docker Compose</h2>



<p class="wp-block-paragraph">Create a project directory such as <code>/opt/nocodb</code> and save the <code>docker-compose.yml</code> file below. Two details make this production-ready: first, binding NocoDB&#8217;s port to <code>127.0.0.1:8080:8080</code> instead of <code>8080:8080</code> prevents Docker from bypassing UFW on the public interface (<a href="https://blog.aveshost.com/docker-ufw-unexpected-ports/">Docker and UFW port safety guide</a>).</p>



<p class="wp-block-paragraph">Second, adding a <code>pg_isready</code> healthcheck on the PostgreSQL service with <code>condition: service_healthy</code> guarantees NocoDB does not crash on boot while PostgreSQL is still initializing its data directory. Also make sure <code>NC_AUTH_JWT_SECRET</code> is set explicitly in your environment or <code>.env</code> file rather than left blank; otherwise, container restarts invalidate active user sessions.</p>



<p class="wp-block-paragraph">Start the stack with <code>sudo docker compose up -d</code> and check <code>sudo docker compose logs -f nocodb</code> until it reports listening on port <code>8080</code>. You can verify the container health locally with <code>curl -I http://127.0.0.1:8080/api/v1/health</code> before wiring up your domain.</p>



<pre class="wp-block-code"><code>services:
  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: nocodb
      POSTGRES_USER: nocodb
      POSTGRES_PASSWORD: CHANGE_ME_STRONG_DB_PASSWORD
    volumes:
      - pg_data:/var/lib/postgresql/data
    healthcheck:
      test: &#91;"CMD-SHELL", "pg_isready -U nocodb -d nocodb"]
      interval: 10s
      timeout: 5s
      retries: 10

  nocodb:
    image: nocodb/nocodb:latest
    restart: unless-stopped
    depends_on:
      postgres:
        condition: service_healthy
    ports:
      - "127.0.0.1:8080:8080"
    environment:
      NC_DB: "pg://postgres:5432?u=nocodb&amp;p=CHANGE_ME_STRONG_DB_PASSWORD&amp;d=nocodb"
      NC_AUTH_JWT_SECRET: "REPLACE_WITH_LONG_RANDOM_SECRET"
      NC_PUBLIC_URL: "https://nocodb.yourdomain.com"
    volumes:
      - nocodb_data:/usr/app/data

volumes:
  pg_data:
  nocodb_data:</code></pre>



<pre class="wp-block-code"><code>sudo docker compose up -d
sudo docker compose logs -f nocodb</code></pre>



<h2 id="step-2-configure-https-with-caddy-or-nginx" class="wp-block-heading">Step 2: Add Automatic HTTPS with Caddy (or Nginx + Certbot)</h2>



<p class="wp-block-paragraph">With NocoDB listening on <code>127.0.0.1:8080</code>, configure a reverse proxy to terminate HTTPS on port <code>443</code>. <strong>Caddy</strong> is the fastest option because it obtains and renews Let&#8217;s Encrypt TLS certificates automatically with a five-line <code>Caddyfile</code>.</p>



<p class="wp-block-paragraph">If you already run Nginx on your VPS, create a standard server block with <code>proxy_pass http://127.0.0.1:8080</code> (including WebSocket <code>Upgrade</code> and <code>X-Forwarded-Proto</code> headers) and run <code>sudo certbot --nginx -d nocodb.yourdomain.com</code>.</p>



<p class="wp-block-paragraph">Open <code>https://nocodb.yourdomain.com</code> in your browser to create your first Super Admin account. Because <code>NC_PUBLIC_URL</code> matches your domain, shared views, invite links, and API docs will all resolve cleanly over HTTPS.</p>



<pre class="wp-block-code"><code># /etc/caddy/Caddyfile
nocodb.yourdomain.com {
    reverse_proxy 127.0.0.1:8080
}</code></pre>



<pre class="wp-block-code"><code># Optional UFW firewall check
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw status</code></pre>



<h2 id="step-3-backups-and-production-hardening" class="wp-block-heading">Step 3: Back Ups, Firewall Rules, and Production Checklist</h2>



<p class="wp-block-paragraph">To keep your NocoDB instance resilient on <a href="https://www.aveshost.com/" rel="noopener">Aveshost</a> self-managed VPS hosting or fully managed VPS hosting, keep only ports <code>80</code> and <code>443</code> open publicly in UFW. If you only want internal team access—or want to lock down SSH—pair your VPS with <a href="https://blog.aveshost.com/secure-vps-access-tailscale-without-public-ports/">Tailscale private VPS access</a>.</p>



<p class="wp-block-paragraph">Never expose PostgreSQL port <code>5432</code> in your Compose file or firewall; keeping PostgreSQL on the internal Docker bridge network ensures only the NocoDB container can query it. When applying container updates later, pull the new image and recreate only the application service with <code>sudo docker compose pull &amp;&amp; sudo docker compose up -d</code>.</p>



<p class="wp-block-paragraph">Finally, schedule automated daily <code>pg_dump</code> exports of your PostgreSQL database alongside backups of the <code>nocodb_data</code> volume (<code>/usr/app/data</code>) so both structured tables and uploaded attachments can be restored cleanly. Test restoring a dump to a staging container periodically to confirm your backup files are complete.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1536" height="1024" src="https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-production-checklist.webp" alt="Six-step production checklist for self-hosting NocoDB with PostgreSQL and HTTPS on a VPS" class="wp-image-6149" srcset="https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-production-checklist.webp 1536w, https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-production-checklist-300x200.webp 300w, https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-production-checklist-1024x683.webp 1024w, https://blog.aveshost.com/wp-content/uploads/2026/11/nocodb-vps-production-checklist-768x512.webp 768w" sizes="(max-width: 1536px) 100vw, 1536px" /></figure>



<pre class="wp-block-code"><code># Daily PostgreSQL dump
sudo docker compose exec -T postgres pg_dump -U nocodb nocodb &gt; /opt/nocodb/nocodb-backup.sql</code></pre>



<h2 id="faq" class="wp-block-heading">Frequently asked questions</h2>


<div id="rank-math-faq" class="rank-math-block">
<div class="rank-math-list ">
<div id="faq-question-ce89c46a56d646bda42c3f19ac2e6ed0" class="rank-math-list-item">
<h3 class="rank-math-question ">How much RAM does a self-hosted NocoDB + PostgreSQL VPS need?</h3>
<div class="rank-math-answer ">

<p>While NocoDB can boot on 1 GB RAM for light testing, 2 GB to 4 GB RAM is recommended on an Ubuntu VPS when running PostgreSQL 16, NocoDB, and a reverse proxy together in production.</p>

</div>
</div>
<div id="faq-question-78d5f776f32e4780ade24e15c0a12250" class="rank-math-list-item">
<h3 class="rank-math-question ">Why should I set NC_PUBLIC_URL when running NocoDB behind Caddy or Nginx?</h3>
<div class="rank-math-answer ">

<p>Without NC_PUBLIC_URL set to your full https:// domain, NocoDB may generate localhost or HTTP links for shared views, password resets, OAuth callbacks, and webhook payloads behind a reverse proxy.</p>

</div>
</div>
<div id="faq-question-7b593bcd9cc84ee38faa6ca60d7af8ba" class="rank-math-list-item">
<h3 class="rank-math-question ">Why bind NocoDB to 127.0.0.1:8080:8080 instead of 8080:8080 in Docker Compose?</h3>
<div class="rank-math-answer ">

<p>Binding to 127.0.0.1 ensures only your local Caddy or Nginx reverse proxy can reach NocoDB, preventing Docker&#8217;s iptables rules from exposing unencrypted port 8080 to the public internet.</p>

</div>
</div>
<div id="faq-question-ac62d359a6ac45ffbcf2ffb1a18e6293" class="rank-math-list-item">
<h3 class="rank-math-question ">Can I migrate NocoDB from SQLite to PostgreSQL later?</h3>
<div class="rank-math-answer ">

<p>Starting directly on PostgreSQL 16 is much simpler for production. If you already run SQLite, NocoDB supports connecting external PostgreSQL data sources or exporting/migrating bases, though starting with NC_DB pointed at PostgreSQL avoids manual metadata migration.</p>

</div>
</div>
<div id="faq-question-e583ba808e09421fb6dcf3717dc210cf" class="rank-math-list-item">
<h3 class="rank-math-question ">Which reverse proxy is easier for NocoDB HTTPS: Caddy or Nginx?</h3>
<div class="rank-math-answer ">

<p>Caddy is simpler for single-app VPS setups because it provisions and renews Let&#8217;s Encrypt TLS certificates automatically with minimal config. Nginx + Certbot is ideal if you already host multiple sites on the same VPS.</p>

</div>
</div>
</div>
</div>]]></content:encoded>
					
					<wfw:commentRss>https://blog.aveshost.com/self-host-nocodb-vps-postgresql-https/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
