Back to articles
AI & Cloud

Building an S3-Compatible Object Storage System with GarageHQ on 3 Low-Config VPS in Vietnam

A detailed guide to building an S3-compatible object storage system using GarageHQ on 3 low-spec VPS servers in Vietnam, optimizing costs for small businesses and individuals.

DPTCloud Engineering4 min read
Building an S3-Compatible Object Storage System with GarageHQ on 3 Low-Config VPS in Vietnam

Building an S3-Compatible Object Storage System with GarageHQ on 3 Low-Config VPS in Vietnam

Object storage systems are essential in modern data architectures, especially for AI applications, big data, and cloud services. As infrastructure costs rise, building an S3-compatible object storage system on low-spec VPS servers in Vietnam offers an effective, cost-efficient solution. This guide details how to deploy GarageHQ—an open-source, S3-compatible platform—on a cluster of 3 low-config VPS servers, ideal for small businesses and individuals in Vietnam.

Introduction to GarageHQ and Benefits of Self-Hosting

GarageHQ is an open-source platform that enables the creation of S3-compatible object storage, supporting protocols such as AWS S3, MinIO, and tools like aws-cli. Its scalability, security, and easy integration make it ideal for self-hosted storage solutions, reducing dependency on expensive cloud services.

Deploying on 3 low-config VPS in Vietnam lowers operational costs, increases data control, and enhances security. This setup is ideal for small businesses, individual developers, or AI projects needing large-scale data storage without relying on external cloud providers.

Prerequisites and Environment Setup

Prerequisites

  • 3 low-spec VPS servers (minimum 2GB RAM, 2 CPU, 20GB SSD)
  • Public IP addresses for each VPS
  • SSH access and root privileges
  • Stable internet connection in Vietnam
  • Docker and Docker Compose installed

System Configuration

First, install Docker and Docker Compose on each VPS:

# Install Docker
curl -fsSL https://get.docker.com | sh

# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Create a docker-compose.yml file on each VPS with the following content:

version: '3.8'

services:
  garagehq:
    image: garagehq/garagehq:latest
    container_name: garagehq
    ports:
      - "8080:8080"
    volumes:
      - ./data:/data
    environment:
      - GARAGEHQ_STORAGE_PATH=/data
      - GARAGEHQ_REGION=us-east-1
      - GARAGEHQ_ACCESS_KEY=your-access-key
      - GARAGEHQ_SECRET_KEY=your-secret-key
    restart: unless-stopped

Deployment on the 3-VPS Cluster

Follow these steps on each VPS:

  1. Run docker-compose up -d to start the GarageHQ service.
  2. Set unique access-key and secret-key environment variables for each node.
  3. Configure internal network connectivity between VPS nodes using firewall and routing rules.
  4. Create a cluster by connecting nodes via the GarageHQ API.

Testing and Verification

After deployment, verify the system using aws-cli:

# Install aws-cli
pip install awscli

# Test connection
aws s3 ls --endpoint-url http://:8080 --no-verify-ssl

If successful, you’ll see a list of buckets. Create a new bucket and upload a file to confirm storage functionality.

Cost-Effective Optimization Solution

Using 3 low-config VPS in Vietnam significantly reduces costs compared to cloud services. This system enables:

  • Full internal data management
  • Integration with AI applications, storing models, logs, and raw data
  • Performance optimization through load distribution across nodes
  • Reduced risk of vendor lock-in

Troubleshooting

  • Port 8080 not accessible: Check firewall and network settings on the VPS.
  • No buckets visible: Verify GARAGEHQ_ACCESS_KEY and SECRET_KEY values.
  • Data sync issues: Ensure stable network connectivity and synchronized time across nodes.

References

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478