A simple self-hosted n8n setup for learning and experimentation

I used to assume that self-hosting n8n would be expensive or require deep DevOps experience.
While that can be true for some production setups, I found a simpler approach that worked well for my learning and experimentation needs.

What I used

  • AWS free credits (~$200, enough for months of learning/testing)
  • A t3.medium EC2 instance
  • A free domain (DuckDNS / freedomain.one)
  • Docker, PostgreSQL, and automatic HTTPS (via Caddy)

Setup time was around 15 minutes, and for learning purposes the ongoing cost has been $0.

Why I like self-hosting for experimentation

  • No subscription required for learning
  • No execution limits while experimenting
  • No restriction on keeping workflows active during testing
  • Freedom to build, break, and rebuild workflows
  • Full control over the environment

Why I didn’t run this only on my laptop

Running n8n locally works well for basic workflows, and I still do that for quick tests.

However, when learning integrations that rely on OAuth or external webhooks, a public HTTPS URL is usually required for callback URLs. While this can be solved locally using tunneling tools or dynamic DNS, it adds extra moving parts such as IP changes, tunnel restarts, and additional configuration.

Using a small VPS gave me:

  • A stable public HTTPS endpoint
  • Fewer local networking workarounds
  • A setup closer to real-world deployments

This made experimentation simpler for me, especially when testing OAuth-based integrations.

Starter repo

To make this easier to reproduce, I put together a small starter repo with:

  • Automatic HTTPS
  • PostgreSQL (pgvector-ready)
  • Minimal configuration (edit a few env values and run)

Repo: GitHub - kshitijpatil508/n8n-self-host-starter: Secure, scalable n8n self-host starter using Docker Compose, PostgreSQL (pgvector), and Caddy for automatic SSL. πŸš€

Sharing this in case it’s useful for others who want a lightweight self-hosted setup to learn or test n8n without much overhead.
Happy to answer questions or hear how others here approach self-hosting n8n.