There was a time when launching a SaaS product meant collecting a long list of subscriptions.
Frontend hosting.
Database.
Authentication.
Object storage.
Email.
Analytics.
Monitoring.
Search.
Automation.
Customer support.
Observability.
And before you even had your first customer, you could already be paying for 8–10 different services.
But there is another way. What if your VPS could become your own small private cloud? That is exactly what I wanted to explore with a Hostinger VPS.
The goal isn’t to replace every cloud service just because self-hosting is possible. That’s a trap.
The real goal is more practical:
Self-host the infrastructure that makes sense, keep critical third-party services where reliability matters, and manage everything from one deployment layer.
For this setup, the foundation is a Hostinger VPS running Docker and Coolify. Hostinger currently offers VPS configurations with options such as 8 GB and 16 GB RAM, which gives you room to build a serious self-hosted environment rather than just running a single application.
Here’s what that stack looks like.
The Architecture
Think of the VPS as your private mini-cloud:
Internet
│
▼
Cloudflare / DNS
│
▼
┌─────────────────┐
│ Hostinger VPS │
│ │
│ Coolify │
│ │ │
│ Docker │
└────────┼────────┘
│
┌─────────────────────┼──────────────────────┐
│ │ │
▼ ▼ ▼
SaaS Apps Backend Services
│ │ │
▼ ▼ ▼
GitHub Supabase Object Storage
/ Postgres Search
/ Auth Analytics
Monitoring
Automation
SupportThe important part isn’t just the software, it’s the architecture.
GitHub becomes the source of truth, Coolify becomes the deployment layer and Docker isolates the services.
Your VPS becomes the infrastructure layer and external services are used selectively where self-hosting introduces unnecessary risk.
1. Coolify: Your Self-Hosted Vercel
If there is one tool that makes this architecture practical, it is Coolify.
Without it, you are managing Docker containers, reverse proxies, SSL certificates, deployments and environment variables manually.
With it, your VPS starts feeling much more like a managed cloud platform.
You connect your GitHub repositories to Coolify.
Push code.
Coolify builds it.
Coolify deploys it.
And your application is live.
Coolify supports GitHub-based automatic deployments through GitHub Apps, Actions or webhooks. This is the first major principle of the stack Your VPS should not require you to SSH into it every time you deploy.
My deployment workflow
Developer
│
▼
GitHub Repository
│
│ push
▼
Coolify
│
├── Build
├── Configure
├── Deploy
└── Restart
│
▼
VPSYou can create separate Coolify projects for your SaaS applications.
For example:
coolify
├── saas-web
├── saas-api
├── admin-dashboard
├── landing-page
└── background-workerAnd each can point to its own GitHub repository.
2. Environment Variables Stay in Coolify
Another advantage is that you don’t need to commit secrets into GitHub.
Database URLs.
API keys.
JWT secrets.
OAuth credentials.
Storage credentials.
Third-party service keys.
Everything can be configured through Coolify’s environment-variable management.
Coolify supports both runtime and build-time variables, and it also provides mechanisms for handling build secrets without embedding them into image layers.
For example:
DATABASE_URL=...
JWT_SECRET=...
STORAGE_ENDPOINT=...
STORAGE_ACCESS_KEY=...
EMAIL_API_KEY=...Your repository contains the code. Coolify contains the deployment configuration and secrets.
That’s a much cleaner separation.
3. Database: PostgreSQL or MongoDB
The database decision should depend on your application rather than forcing one technology everywhere.
If you’re building:
SaaS dashboards
financial applications
transactional systems
relational business data
reporting-heavy applications
I’d generally start with PostgreSQL.
If your application naturally works with flexible documents and schema-less data, MongoDB can be a better fit.
The important distinction is authentication.
You can build:
Your Application
│
▼
PostgreSQL / MongoDB
│
└── Your own authentication systemOr use a backend platform that bundles authentication with the database.
4. Supabase: Database + Authentication + Backend
For developers who don’t want to build authentication from scratch, self-hosted Supabase is an interesting option.
It gives you PostgreSQL together with authentication, APIs, storage and other backend capabilities.
The self-hosted version can be deployed using Docker, and Supabase officially recommends Docker for self-hosting.
That means you can have:
Supabase
│
┌───────────────┼────────────────┐
▼ ▼ ▼
PostgreSQL Auth Storage
│ │ │
└───────────────┼────────────────┘
▼
Your SaaSThere is an important caveat.
Self-hosted Supabase is not the same operational experience as managed Supabase.
When you self-host, you become responsible for upgrades, security, backups, database maintenance, monitoring and disaster recovery.
Supabase currently lists 4 GB RAM as a minimum for its full self-hosted stack and recommends 8 GB or more for small-to-medium production workloads.
So don’t casually throw every service onto a tiny VPS.
5. Object Storage: Your Own S3
Applications eventually need file storage.
Profile pictures.
Documents.
Product images.
Exports.
Backups.
Videos.
Instead of depending entirely on a cloud object-storage provider, use RustFS that can run an S3-compatible object-storage layer on your VPS.
This gives your application an interface similar to:
S3 API
│
▼
Object Storage
│
├── images/
├── documents/
├── exports/
└── backups/The benefit is portability.
Your application talks to an S3-compatible API rather than being tightly coupled to a specific cloud vendor. For smaller workloads, this can be an attractive self-hosting strategy.
But remember Object storage is only useful if you also have a backup strategy.
Your VPS is not a backup.
💡 Enjoying this article?
Every week day, I publish practical, production-ready deep dives covering Web development, System Design, Open source projects, Tech industry trends and AI Engineering and tools.
6. Search Without Paying for a Search Platform
Many SaaS applications eventually need search.
Users want to find:
products
customers
documents
tickets
articles
transactions
A lightweight self-hosted search engine such as Meilisearch can handle this use case.
The architecture becomes:
Application
│
▼
Search API
│
▼
Search EngineYour application database remains the source of truth. The search engine becomes the optimized index. That separation is important.
Don’t treat your search index as your primary database.
7. Analytics: PostHog on Your VPS
Analytics is another area where self-hosting becomes interesting. A self-hosted analytics platform can give you visibility into:
page views
events
funnels
product usage
feature adoption
user behavior
One option from our finalized stack is PostHog, but this is where I would add a big warning.
PostHog is not a tiny Docker container you casually throw onto a 4 GB VPS.
Its architecture involves multiple components and can become resource-heavy, particularly around its analytics infrastructure.
So if you’re running a serious self-hosted analytics deployment, size the VPS accordingly.
This is exactly why I wouldn’t blindly recommend “Just put everything on one $5 VPS.”
Self-hosting is about economics and capacity planning.
8. Monitoring: Know When Your SaaS Is Down
Self-hosting introduces a problem that managed platforms normally hide You are now responsible for knowing when your infrastructure breaks.
That’s where Uptime Kuma fits nicely.
You can monitor:
SaaS Website ✓
API ✓
Database endpoint ✓
Admin dashboard ✓
Storage ✓
Other services ✓It supports HTTP, TCP, DNS, Docker-container monitoring and notification integrations.
You don’t need a complicated monitoring platform just to answer “Is my application alive?”
For a small SaaS, simple monitoring can go surprisingly far.
9. Observability: Logs and Metrics
Uptime monitoring answers “Is it running?” Observability answers “Why is it behaving like this?”
For that layer, SigNoz is part of the self-hosted stack.
You can use an open-source observability platform to centralize application telemetry and investigate problems without immediately adding another expensive SaaS subscription.
The ideal progression is:
Uptime monitoring
+
Application logs
+
Metrics
+
Traces
=
ObservabilityThis becomes increasingly important once your application has multiple services.
10. Automation: n8n
SaaS applications often contain repetitive workflows.
For example:
New user
↓
Create account
↓
Send onboarding email
↓
Create CRM record
↓
Notify team
↓
Schedule follow-upInstead of writing custom code for every workflow, you can use n8n as the automation layer.
Self-hosting automation gives you control over the workflows while keeping them close to the rest of your infrastructure.
This becomes especially useful when you’re connecting:
APIs
databases
webhooks
internal applications
notifications
scheduled jobs
11. Customer Feedback: Fider
Your first version of a SaaS doesn’t need an elaborate product-feedback platform. But once users start requesting features, you need somewhere to collect and prioritize those requests.
Fider is a self-hostable feedback portal designed specifically for feature requests and suggestions.
Instead of receiving “Can you please add dark mode?” in five different emails, users can submit and vote on requests.
That creates a much better feedback loop.
12. Customer Support: Chatwoot
Eventually, users will need help. That’s where Chatwoot fits into the stack.
It provides a self-hosted customer engagement/support platform and can centralize conversations across channels.
Your architecture can then look like:
Customer
│
▼
Chatwoot
│
├── Conversations
├── Support
└── Customer contextFor an early-stage SaaS, having customer support under your own infrastructure can be extremely useful.
13. Secrets Management
As your stack grows, the number of secrets grows with it.
API keys.
Database passwords.
OAuth secrets.
Encryption keys.
Webhook secrets.
Service credentials.
This is where Infisical can become part of the infrastructure.
The principle is simple Secrets should be treated as infrastructure, not configuration files sitting inside Git repositories.
Coolify already gives you environment-variable management, so you don’t necessarily need a dedicated secrets platform on day one.
Introduce this layer when the complexity justifies it.
14. The One Service I Would NOT Self-Host
Email.
This is where I would deliberately break the “self-host everything” philosophy. For transactional email, I would use Resend.
Why?
Because email reputation is not something I want to gamble with. You can technically self-host your mail infrastructure.
But then you have to worry about:
IP reputation
SPF
DKIM
DMARC
spam filtering
bounce handling
blacklists
delivery rates
SMTP configuration
If your password-reset emails don’t arrive, your users don’t care that your infrastructure is beautifully self-hosted.
They just think “This SaaS is broken.”
For me, that’s not worth the risk Self-host infrastructure. Don’t self-host your credibility.
15. The Final Stack
So the architecture I would build on a Hostinger VPS looks roughly like this:

This isn’t about blindly replacing every managed service.
It’s about choosing where ownership provides value.
16. The Deployment Flow
Once everything is configured, the developer experience becomes surprisingly simple.
GitHub
│
│ Push
▼
Coolify
│
┌─────┴─────┐
▼ ▼
Build Configure
│ │
└─────┬─────┘
▼
Docker
│
▼
Hostinger VPS
│
┌────────────┼────────────┐
▼ ▼ ▼
Frontend Backend Services
│ │ │
│ │ ┌────┼─────┐
│ │ ▼ ▼ ▼
│ │ Search Analytics
│ │ Monitor Automation
│ │
└────────────┴───────────────► UsersPush to GitHub.
Coolify detects the change.
The application gets rebuilt.
The new version is deployed.
Environment variables are injected.
Docker runs the application.
And you don’t have to SSH into the server every time. That’s the experience you want from self-hosting.
The Biggest Lesson
Self-hosting isn’t about avoiding every monthly bill, that’s the wrong metric.
The real question is Which parts of my SaaS infrastructure should I own, and which parts should I outsource because reliability is worth more than the savings?
For me, the answer looks like this:
Own the compute.
Own the deployment.
Own the database when appropriate.
Own your application data.
Own your monitoring and internal tooling.
But outsource the infrastructure where failure can directly damage customer trust.
Email is a perfect example and that’s the beauty of this architecture. You’re not trying to recreate AWS. You’re building something much more useful for a developer or small SaaS team a private cloud that you actually understand.
A Hostinger VPS + Docker + Coolify can become the foundation. GitHub becomes your source of truth. Your applications become containers. Your supporting services become independent workloads.
And your infrastructure becomes something you control rather than something you rent from ten different dashboards.
The cloud isn’t disappearing.
You’re simply bringing a surprisingly large part of it home.
Thank You for Reading!
I hope you found it helpful and informative. If you have any questions or feedback, feel free to leave a comment below. Your support and engagement mean a lot to me.
