Skip to content
Back to blog
nselfopen-sourceinfrastructurego

Building a Self-Hosted Backend: The nSelf Journey

2 min read

I built nSelf because managed backend platforms kept raising prices and adding lock-in. Here is what I learned building an open-source alternative that deploys with a single command.

The idea for nSelf started with a billing page. I was running several projects on managed backend platforms, and the monthly costs kept climbing. Not because my usage grew, but because the platforms kept adjusting their pricing tiers. I had PostgreSQL databases, authentication, file storage, and serverless functions spread across three different providers. The total bill was approaching $200/month for projects that could run on a $5 VPS.

So I started building nSelf. The goal was simple: one CLI command to deploy a complete backend stack on any server you control. PostgreSQL for the database, Hasura for instant GraphQL, a custom auth service, S3-compatible storage, and serverless functions. All running in Docker containers on a single machine or across a cluster.

The hardest part was not the infrastructure. Docker Compose handles orchestration well enough for most workloads. The hard part was making the developer experience good enough that people would actually use it instead of clicking "Deploy" on a managed platform. That meant automatic SSL, database migrations, backup scheduling, and health monitoring, all configured through a single YAML file.

nSelf is not trying to replace AWS or GCP for companies running at massive scale. It is for independent developers and small teams who want to own their infrastructure without becoming full-time DevOps engineers. The sweet spot is projects doing under 100k requests per day on a single $10-20/month server. At that scale, self-hosting is not just cheaper. It is simpler.

The project is open-source and I maintain it actively. The community has grown steadily, mostly developers who share the same frustration with managed platform pricing. If you are tired of paying rent on your own data, take a look.