I really don’t like depending on expensive third-party services for basic app features. Every tutorial I watch seems to push paid solutions for authentication, databases, file uploads, and other core functionality.
I prefer building everything myself and keeping full control over my codebase. Monthly subscriptions for basic features really annoy me.
Has anyone successfully deployed a Next.js application to production using only self-hosted solutions? I’m wondering if it’s realistic to run everything on your own VPS without relying on external services.
I was considering a setup with Laravel handling the backend API while Next.js manages the frontend. But before going that route, I’d like to know if Next.js alone with some npm packages can handle the full stack requirements for a real production app.
that’s a really interesting setup! I’m curious though - how do you handle email sending and payment processing? those seem trickier to self-host completely. also, what about scaling when traffic spikes? does your single vps setup hold up well?
Absolutely. I’ve run Next.js as my full backend on a single VPS for over two years now. Works great. Here’s my setup: JWT auth with httpOnly cookies through next-auth (custom adapter), Prisma connecting to self-hosted PostgreSQL, and file uploads straight to mounted storage with custom validation middleware. All business logic runs through Next.js API routes without any problems. Performance is solid with good caching, and I’m saving tons compared to paying for multiple SaaS tools. The downside? You’re handling backups, security patches, and monitoring yourself. But the control and savings are worth it for me.
been running nextjs + sqlite for 6 months now - works great. using bcrypt for passwords, multer for uploads, and nodemailer with my own smtp server. way cheaper than subscriptions and pretty easy once you figure it out.