Back to projects
In Production Initial setup + ongoing maintenance

Private Cloud

DevOps Engineer & Architect

Self-hosted cloud infrastructure for high-availability storage with secure remote access.

DockerNextcloudPostgreSQLCloudflare TunnelRaspberry Pi 4Ubuntu Server

The Problem

Transferring large volumes of multimedia content (4K videos, high-resolution photos) to traditional cloud services presents several challenges:

  • iCloud and Google Drive have storage limits and recurring monthly costs
  • Uploading heavy files requires significant bandwidth and time
  • Lack of control over where data resides

The Solution

A self-hosted private cloud with secure remote access:

  • Centralized storage with high availability
  • Access from anywhere via Cloudflare Tunnel
  • No monthly costs for cloud services
  • Total control over data and infrastructure

Technical Details

Stack

  • Hardware: Raspberry Pi 4 (8GB RAM) + 4TB external HDD
  • System: Ubuntu Server 22.04 LTS
  • Application: Nextcloud (Docker)
  • Database: PostgreSQL (Docker)
  • Tunnel: Cloudflare Tunnel for remote access without opening ports
  • Proxy: Nginx for SSL and routing

Architecture

Internet → Cloudflare Tunnel → Raspberry Pi → Docker
                                    ├── Nextcloud
                                    ├── PostgreSQL
                                    └── Nginx

Challenges Overcome

1. Power Consumption

Problem: External HDDs would randomly power off due to insufficient power.
Solution: USB hub with independent external power supply.

2. UX for Non-Technical Users

Problem: Complex admin interfaces created friction.
Solution: Migration to Nextcloud, which offers intuitive mobile apps and automatic sync.

3. Secure Remote Access

Problem: Opening router ports exposes the network to attacks.
Solution: Cloudflare Tunnel creates an encrypted outbound connection, eliminating the need for port forwarding.

Impact

  • Multiple users accessing from various devices
  • Stable uptime since initial implementation
  • Cost reduction compared to equivalent cloud services
  • Automatic backups from mobile devices

Learnings

  • Docker greatly simplifies deployment and maintenance
  • Cloudflare Tunnel is an excellent alternative to traditional VPNs or port forwarding
  • User experience matters even in infrastructure projects