In an era where cloud storage is ubiquitous, not everyone is comfortable entrusting their personal files to third-party services.

Here’s why and how setting up a personal cloud server with Syncthing and FileBrowser might be the right solution for you:

  • Data Privacy and Control: If you prefer a solution that keeps your data close to home and under your control, consider:

    • Syncthing: Securely synchronize your files across all your devices using a peer-to-peer network. This ensures that your data remains private and is not stored on servers owned by third parties.
    • FileBrowser: Access your synchronized files through a convenient, intuitive web-based interface from any browser. This eliminates the need for software installations and provides easy access to your files.
  • Long-term Reliability: Choose a solution that won’t shut down tomorrow due to corporate policy changes. Both Syncthing and FileBrowser are open-source projects, reducing the risk of sudden discontinuation:

    • No Database Required: These tools do not require a database, simplifying setup and maintenance while enhancing performance and stability.

By leveraging Syncthing and FileBrowser, you can create a robust, dependable cloud storage solution that prioritizes your privacy and gives you full control over your data.

Trust me Syncthing and FileBrowser is ALL YOU NEED.

An Open Source Cloud at Home

A personal cloud server offers:

  • ๐Ÿ”’ Privacy and Control: Manage your data privately without relying on external service providers.
  • ๐Ÿ  Home-Based Solution: Operate your cloud server from the comfort of your own home.
  • ๐Ÿ” Security: Keep your personal files secure and protected within your private network.
  • ๐Ÿ› ๏ธ Flexibility: Tailor the setup to meet your specific storage needs.
      • Customizable storage configurations
      • Ability to install additional software for specific use cases
  • ๐Ÿ“ˆ Scalability: Easily expand your storage capacity as your data grows.
      • Add new hard drives or upgrade existing ones
      • Scale up resources as needed
  • ๐Ÿ’ฐ Cost-Effective: Avoid the ongoing costs associated with third-party cloud storage services.

We are going to use two Open Source Projects in this guide.

Syncthing

Syncthing is an open-source file synchronization program that allows you to keep your files in sync across multiple devices like computers, laptops, and even mobile phones.

  • These are the features that made me choose Syncthing:
    • โš™๏ธ Decentralized Control:

      • There’s no single point of failure since there’s no central server. Each device in the network acts as a peer, meaning they all contribute to keeping the data synchronized.
    • Syncthing can also…โœŒ๏ธ
      • ๐Ÿ” Encryption and Authentication:

        • All communication between devices is secured with TLS encryption. Additionally, devices are identified using strong cryptographic certificates, ensuring only authorized devices can access your files.
      • ๐Ÿ› ๏ธ Flexible Configuration:

        • You can choose which folders to sync, set bandwidth limitations, and define which devices have access to specific data.
    • ๐Ÿ–ฅ๏ธ Cross-Platform Compatibility:

      • Syncthing works on various operating systems including Windows, macOS, Linux, Android, Solaris, Darwin, and BSD.

Yes,Syncthing will handdle the syncing part.

FileBrowser

FileBrowser is a free and open-source web application designed for managing files and folders on a web server.

  • The best of all?
    • ๐ŸŒ Web-Based Convenience:

      • Access Filebrowser through a web browser on any device, eliminating the need for software installation on individual computers.
    • With Filebrowser we also get…๐Ÿ™€
      • ๐Ÿ‘ฅ Multiple User Management:

        • Create accounts for different users with designated directories for their files.
      • ๐Ÿ”„ Standalone or Integration:

        • Use Filebrowser as a standalone application or integrate it into other projects using its API.
      • ๐Ÿ”’ Security Focus:

        • Filebrowser prioritizes security through features like:
          • Configurable authentication methods for user login.
          • Pre/post event command runners for specific actions.
          • Access control restrictions to manage user permissions for different directories.
    • ๐Ÿ“‚ Essential File Management:

      • Perform basic file operations like:
        • Copy, move, rename, edit, create, and delete files.
        • Preview images and documents within the interface.
        • Zip and unzip compressed folders.
        • Download and upload single or multiple files with drag-and-drop support and progress tracking.
  • And FileBrowser is completely FREE

And FileBrowser will allow us to have an UI, with different users and permisions that can upload/download files.

Why a DBLess Cloud?

There are F/OSS Cloud alternatives which are great, like Nextcloud.

The cool thing about this solution with Syncthing and FileBrowser, is that we dont have a Database at all.

So the solution is much more efficient and resilient to failure.

Just make sure to backup the real data you care about and forget about those SQL DataBases.

How to Create a Home Cloud

Pre-Requisites!! Just Get Docker ๐Ÿ‹

Important step and quite recommended for any SelfHosting Project - Get Docker Installed

It will be one command, this one, if you are in Linux:

apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version

SelfHosting your Cloud with Docker

We just need this Docker-compose to deploy both services:

---
version: "2.1"
services:
  syncthing:
    image: syncthing/syncthing #ghcr.io/linuxserver/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
    volumes:
      - /home/Docker/Syncthing/config:/config
      - ~/user/Sync-Folder-Data:/data1 #
      - /media/user/TOSHIBA\ EXT/A-SYNC-CLOUD:/data2 #You can add more than one folder, even if different disk
      #- "C:\\DOCKER\\Syncthing\\config:/config" #Example for Windows
      #- "D:\\Z_Sync:/dataD" ##Example for Windows
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

  filebrowser:
    image: filebrowser/filebrowser
    container_name: filebrowser
    ports:
      - 8080:80
    volumes:
      - /home/Docker/FileBrowser/config:/config
      #- /home/Docker/FileBrowser/data:/srv
      - ~/user/Sync-Folder-Data:/srv #same as Syncthing!
    restart: unless-stopped    

Now access your Syncthing at localhost:8384 and FileBrowser UI at localhost:8080

The default user/pass for FileBrowser are: admin/admin - Make sure to change them!

Message after successfully Connecting to FileBrowser

Feel free to adapt the ports and the Data Paths are you need.

When connecting to Syncthing, Add the Folder just as you named the Path, in this case data1

Message after successfully Connecting to FileBrowser

Closing Thoughts

Now you have syncing capabilities at home between your devices, without the need of a database.

You can use external storage… โฌ
lsblk #check the disk is recognized
sudo mount /dev/sda1 /media/sda1_BackUp # mount it (in this case sda1) #==>> Reference this mount point in the docker compose!

#optional - sudo apt install exfatprogs

You might be intrested to have some sort of Photo Gallery associated with your files.

Some time ago I was showing how to use Photoview with Docker as a Google Photos replacement.

But in this case a solution like PiGallery will be best suitable as it does not require for a DB as well.

A Photo Gallery that Syncs your Phone - PiGallery with Syncthing ๐Ÿ–ผ๏ธ ๐Ÿ—บ๏ธ ๐Ÿ‘‡
version: "3.7"
services:
  syncthing:
    image: syncthing/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
    volumes:
      - /home/Docker/Syncthing/config:/config
      - ~/user/Sync-Folder-Data:/data1
      - /media/user/TOSHIBA\ EXT/A-SYNC-CLOUD:/data2
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

  filebrowser:
    image: filebrowser/filebrowser
    container_name: filebrowser
    ports:
      - 8081:80
    volumes:
      - /home/Docker/FileBrowser/config:/config
      - ~/user/Sync-Folder-Data:/srv
    restart: unless-stopped   

  # db:
  #   image: linuxserver/mariadb
  #   container_name: mariadb
  #   environment:
  #     - MYSQL_DATABASE=photoview
  #     - MYSQL_USER=photoview
  #     - MYSQL_PASSWORD=photosecret
  #     - MYSQL_RANDOM_ROOT_PASSWORD=1
  #   volumes:
  #     - db_data:/var/lib/mysql
  #   restart: always

  # photoview:
  #   image: viktorstrate/photoview:2
  #   container_name: photoview
  #   ports:
  #     - 8082:80
  #   depends_on:
  #     - db
  #   environment:
  #     - PHOTOVIEW_DATABASE_DRIVER=mysql
  #     - PHOTOVIEW_MYSQL_URL=photoview:photosecret@tcp(db)/photoview
  #     - PHOTOVIEW_LISTEN_IP=photoview
  #     - PHOTOVIEW_LISTEN_PORT=80
  #     - PHOTOVIEW_MEDIA_CACHE=/app/cache
  #   volumes:
  #     - api_cache:/app/cache
  #     - /home/your/path/with/files/photos:/photos:ro
  #   restart: always

  pigallery2:
    image: bpatrik/pigallery2:latest
    container_name: pigallery2
    environment:
      - NODE_ENV=production
    volumes:
      - /home/Docker/pigallery/config:/app/data/config
      - /home/Docker/pigallery/tmp:/app/data/tmp
      - db_data:/app/data/db
      - /home/Docker/:/app/data/images:ro
    ports:
      - 8088:80
    restart: unless-stopped

# volumes:
#   db_data:
#   api_cache:

Login to localhost:8088 and change the default user and pass admin/admin

Adding WebDav Support

You can combine the stack together with these WebDav’s


FAQ

Free & Open Source WebDav

Integrate your existing Storage, Authentication, and Authorisation Systems altogether

services: 
#https://github.com/jmlcas/sftpgo/blob/main/docker-compose.yaml
#https://www.youtube.com/watch?v=ME5t2UREY_Q - Thanks to Jose Maria Labarta
    sftpgo:
        image: drakkan/sftpgo:v2.6
        container_name: some-sftpgo
        ports:
            - '8080:8080'
            - '2022:2022'
            - '2121:2121'
            - '10080:10080'
        volumes:
            - sftpgodata:/srv/sftpgo
            - sftpgohome:/var/lib/sftpgo              
        environment:
            - SFTPGO_HTTPD_BINDINGS_0_PORT=8080
            - SFTPGO_HTTPD_BINDINGS_0_ADDRESS=0.0.0.0
            - SFTPGO_DATA_PROVIDER_CREATE_DEFAULT_ADMIN=true
            - SFTPGO_WEBDAVD_BINDINGS_0_PORT=10080
            - SFTPGO_FTPD_BINDINGS_0_PORT=2121
            - SFTPGO_FTPD_BINDINGS_0_FORCE_PASSIVE_IP='127.0.0.1:8080'
        restart: unless-stopped   
volumes:
    sftpgodata:
    sftpgohome:

Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob

Other Free Project for File Management

You can also use Syncthing and FileBrowser together with PhotoView and create your own Google Photos Alternative

How to Find a File recursively

find . -type f -name "*_20200519_*"

How to Remove background from Photos

How to Take a SnapShot From a Video

flatpak install flathub org.kde.kdenlive

How to find duplicate files

How to Share Files with PicoShare

version: '2'
services:
  picoshare:
    environment:
      - PORT=3002
      - PS_SHARED_SECRET=somepasswordfortheinterface #change_this
    ports:
      - 3002:3002 #UI Port
    volumes:
      - picoshare:/data
    container_name: picoshare
    image: mtlynch/picoshare:latest #https://github.com/mtlynch/picoshare
    # networks:
    #   - cloudflare_tunnel
    #restart: always     
      

volumes:
  picoshare:

# networks:
#   cloudflare_tunnel:
#     external: true  

Alternatively, you can use AnonUpload

Understanding WebDAV

WebDAV is a protocol that extends the capabilities of HTTP, transforming the web from a read-only medium into a read-write medium. It enables users to create, modify, and move documents on a web server, which is essential for collaborative work environments. Here are the key features and benefits of WebDAV:

  • Editable Web Medium: Unlike basic HTTP, which is designed for reading web pages, WebDAV allows for creating and modifying content directly on the web server.
  • Supports Locking and Conflict Management: WebDAV includes features like locking, which prevents conflicts when multiple users are editing the same document, making it ideal for collaborative applications.

Notable Open Source WebDAV Servers

Several open-source servers implement the WebDAV protocol, offering a variety of features and integration capabilities. Here are some of the top choices:

  1. Apache HTTP Server with mod_dav: Apache’s mod_dav transforms the Apache HTTP server into a WebDAV server, allowing document editing and versioning capabilities over the web.

  2. Sabre/dav: A PHP-based WebDAV server that is easy to integrate into existing web applications. It supports a broad range of WebDAV clients.

  3. Nextcloud: More than just a WebDAV server, Nextcloud offers a comprehensive suite of office and collaboration tools with strong emphasis on data security and privacy.

  1. Caddy Server: A modern, Go-based web server that features automatic HTTPS. It can be extended with plugins, including one that adds WebDAV functionality. Caddy simplifies web server management while providing robust support for WebDAV.

These open-source WebDAV servers provide powerful options for organizations and individuals looking to facilitate collaborative work online with reliable versioning and document management systems.