In an impressive feat of resourcefulness, a user has successfully hosted 24 containers on a single virtual private server (VPS) for just $30 a month, challenging conventional cloud service costs. This setup, which has been operational for over a year, includes a robust stack of technologies and services that deliver a range of functionalities, from a Telegram bot for an EdTech platform to an anti-spam service and an AI backend.
The VPS, equipped with 2 virtual CPUs, 6 GB of RAM, and a 29 GB SSD running Ubuntu 22.04, serves as the backbone for these numerous applications. Utilizing Docker Compose v2 for orchestration and Nginx as a reverse proxy, the system efficiently distributes workloads across the containers. Key services include MySQL 8.0, Redis 7, and Elasticsearch 8.12.2, handled within a tightly integrated environment.
The creator noted a significant cost-saving compared to managed services, which could range from $150 to $250 monthly for similar capabilities. Given that this infrastructure supports projects generating no revenue, such as a Telegram bot and a local LLM inference, the affordability of the VPS solution is particularly appealing.
Despite the success of this configuration, the author mentions a caveat with the phrase "almost," hinting at challenges faced, particularly concerning resource limits. With approximately 2.9 GB of RAM in use, the system operates near its capacity, indicating potential scalability issues as demand grows.
All projects exist within their isolated Docker networks, ensuring security and performance. The networking architecture cleverly manages external access through specific ports while maintaining internal service isolation.
This innovative approach not only demonstrates the viability of using a single VPS for multiple applications but also offers a compelling alternative for small developers and startups looking to minimize infrastructure costs. As cloud service providers continue to charge premium prices for managed solutions, such strategies could reshape market dynamics and inspire competitors to rethink their pricing models.
Informational material. 18+.