DEV Community

Prajwal
Prajwal

Posted on

Build Your Own Private Cloud in 5 Minutes with Docker, Syncthing & Tailscale ☁️🔒

Introduction

We all rely on cloud storage—Google Drive, Dropbox, iCloud. But sometimes, you just want total control over your data. You want privacy, speed, and zero subscription fees.

I recently built a Private Backup Cloud project that solves this problem using open-source tools. It’s self-hosted, encrypted, and accessible from anywhere without opening any public ports on your router.

In this post, I’ll show you how I built it using Docker, Syncthing, File Browser, and Tailscale.

🤔 Why Build This?

Privacy: Your data stays on your devices. No "scanning" by big tech.

Security: Uses a private VPN (Tailscale) so you don't need to expose your IP to the public internet.

Cost: Free (if using existing hardware like an old laptop, Raspberry Pi, or the free tier of a VPS).

Simplicity: Deploys in minutes with Docker Compose.

🛠️ The Tech Stack

Here are the heroes of this project:

Docker: For containerizing the applications so they run anywhere.

Syncthing: The engine that syncs files continuously between your devices (phone, laptop, server).

Tailscale: A zero-config VPN that connects your devices as if they were on the same local network (Meshnet).

File Browser: (Optional) A beautiful web interface to manage your files, just like Google Drive.

Architecture

The setup is simple:

Tailscale connects all your devices (Laptop, Phone, Server) into a secure private network.

Syncthing runs in a Docker container, syncing folders in the background.

File Browser runs in another container, giving you a Web UI to view, download, and upload files remotely.

How to Deploy (The "Advanced" Setup)

Let's go for the full experience with both the Sync engine and the Web Dashboard.

Step 1: Prerequisites
Make sure you have Docker and Docker Compose installed. You also need to install Tailscale on your host machine and log in.

Step 2: Prepare the Environment
We need to create a few folders and a database file for the File Browser to work correctly.

Bash

mkdir -p fb_config
touch fb_config/settings.json
touch fb_config/filebrowser.db
echo "{}" > fb_config/settings.json
Enter fullscreen mode Exit fullscreen mode

Step 3: The Docker Compose File
Create a docker-compose.yml file and paste this in. This sets up both Syncthing and the File Browser dashboard.

YAML

version: '3'
services:
  syncthing:
    image: lscr.io/linuxserver/syncthing:latest
    container_name: syncthing
    hostname: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata # Change this to your timezone
    volumes:
      - ./config:/config
      - ./data:/data
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: always

  filebrowser:
    image: filebrowser/filebrowser:latest
    container_name: filebrowser
    user: 1000:1000
    volumes:
      - ./data:/srv
      - ./fb_config/filebrowser.db:/database/filebrowser.db
      - ./fb_config/settings.json:/config/settings.json
    ports:
      - 8080:80
    restart: always
Enter fullscreen mode Exit fullscreen mode

Step 4: Launch It!
Bash

docker-compose up -d

Accessing Your Cloud

Because you are using Tailscale, you can access this safely from anywhere (even a coffee shop) using your Tailscale IP.

Syncthing UI: http://YOUR-TAILSCALE-IP:8384

Use this to link your phone or laptop and start syncing folders.

File Dashboard: http://YOUR-TAILSCALE-IP:8080

Default Login: admin / admin (Change this immediately!)

Now you have a fully functional private cloud that looks like this:

(You can add a screenshot of the File Browser UI here)

Conclusion

This project is a perfect weekend build for anyone interested in Self-Hosting or DevOps. It separates your data from big providers and gives you total ownership.

If you want to try this out, check out the full repository below. It includes a basic setup (lite version) and more detailed instructions.

🔗 GitHub Repository: private_backup_cloud_syncthing

Let me know in the comments if you have any questions or ideas for improvements! Happy hosting!

Top comments (0)