Diwān - دِيوَان is a central official registry with a collection of written records.
-
A free blueprint for a private personal server hosting photos and files.
-
Automatic photo backup and sharing capabilities.
-
Runs on cheap refurbished hardware and scales to enterprise systems if required.
-
Securely accessible everywhere. Open source. 100% free.
Public
- File sharing demo (currently down, fix ongoing: gtsteffaniak/filebrowser#429)
- Photo sharing demo
Private
- See yourself get locked out trying to access https://storage.alyudeen.mywire.org/
This repository aims to document iterative changes for myself, and to be a guide to replicate the full setup or parts of it as easily as possible.
If you're looking to move away from relying on big tech companies to manage your files and photos, you're welcome to reach out. I'm happy to help!
Feel free to ask questions by filing an issue or starting a discussion. Pull requests for improvements are also always appreciated.
Service service folders are cloned by the Main Node machine from this repository and distributed to lxc containers using ProxmoxVE mountpoints.
Each docker service is deployed on a separate lxc container using a dedicated docker compose file.
ℹ️ 201-home: Only Home Assistant Operating System runs on a VM, not a container.
ProxmoxVE uses VMID.conf files to store VM and container hardware configuration, mountpoints, and network configuration.
Config files are maintained by ProxmoxVE - under /etc/pve/lxc. They are copied over to this repository.
Provided symlinks for easier navigation to relevent folders under the ProxmoxVE folder structure:
- Containers'
.conffiles: /utils/lxcconf - Containers' mounts using
pct mount <vmid>for maintenance: /utils/lxcmounts
Don't worry; we all started somewhere. Try parts of this setup on Docker Desktop on any computer before investing in hardware.
- Install Docker Desktop: https://www.docker.com/products/docker-desktop
- Clone this Repository:
Download the DiwanSync repository to your local machine. - Try Docker Compose:
Use the provideddocker-composeconfigurations to run the services in containers. - Access the Services:
Follow the guides and instructions below to access services locally.
Each service provides a key function of the system; Services can be picked and customized to fit personal needs, with space for addition. Each service has its own active community that provides support for specific needs.
My example setup is split between 1 active "Main Node" that runs all the services, and one passive "Backup Node" to provide a backup for redundancy and disaster recovery. I plan to add a "Remote Node" later to add geographical destribution.
Home Assistant OS VM - control lights and smart devices from web and mobile apps.
- Project: https://www.home-assistant.io
- Link: https://home.alyudeen.mywire.org/
FileBrowser Quantum - Access and share files from a web browser.
NginxProxyManager deployment - To access services using pretty https URLs, with SSL certificate creation and management.
- Project: https://github.com/NginxProxyManager/nginx-proxy-manager
- Link: https://nginx.alyudeen.mywire.org/
Make the server remotely accessible by updating DDNS providers with realtime IP address.
Syncthing instance - Sends files periodically to backup node for disaster recovery.
Simple samba share - Enables home assistant backups over the network in files for disaster recovery.
- Project: https://github.com/dperson/samba
- Notes: A "full" backup automatically restores all configuration, automations, scenes, and device connections.
Authentik deployment - Require 2 factor authentication to access services and enable passwordless login.
GoAccess instance displaying data from 203-nginx - Displays access logs by country, ip, destination service, and other parameters.
- Project: https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager
- Link: https://logs.alyudeen.mywire.org/
Immich instance for each user - Automatic photo backup from phones, with web and client apps, and sharing and albums.
Receive files periodically from Main Node for disaster recovery.
- Installer runs automatically on windows boot: https://github.com/Bill-Stewart/SyncthingWindowsSetup
- Link: https://sync.backup.alyudeen.mywire.org/
ProxmoxVE runs services in isolation in separate virtual machines or lightweight linux containers with a GUI and easy backup / restore.
ProxmoxVE is installed on the Main Node with 3 storage paths.
local- The boot storage on which
ProxmoxVEis installed. - Used to store all running VMs and containers.
- The boot storage on which
storage- A logically (or also physically) separate storage from
localboot storage. - Needed for functionality of
202-storage/206-homebackups/20#-immich. - Contains secrets for
203-nginx/204-ddns/206-homebackups/207-auth/20#-immich. - The config files can be edited to remove or alter these requirement.
- A logically (or also physically) separate storage from
backup- Network storage accessing another machine.
- Needed for accessing backup files on
202-storage.
Result: images/proxmox-storage-configuration
💡 The storage setup can be simplified for setup and testing, with only one configured storage path.
docker-compose.yml.envfile (if needed)- Config file (if needed)
- Example: /machines/202-storage/
ProxmoxVE mountpoints "mount" / expose / inject folders from the host machine -> into folders in the hosted container. They are used here to distribute storage paths, service configuration files, secrets, and files created by the service.
Example: 202.conf
storagemountmp0: /mnt/pve/storage,mp=/mnt/storagebackupmount:mp1: /mnt/pve/backup,mp=/mnt/backup- Service config mount:
mp2: /root/homelab/machines/202-storage,mp=/root/202
Result: images/202-storage-folder-structure
💡 This setup can be made simpler for private use by placing everything in the same folder.
Docker supports .env files to store environment variables to be used in docker-compose.yml. To avoid publicly exposing access tokens and secrets in this repository, they're stored in storage folders and accessed using symlink files.
Example: 207.conf
- The real
.envfile with secrets is understorage/containers/authentik - The service folder contains a
symlinkpointing to the real.envfile - under /machines/207-auth/.env ProxmoxVEconfig mounts 2 folders - ℹ️ nested inside each other - under /config/207.confmp0: /root/homelab/machines/207-auth,mp=/root/207mountpoint 0mounts the service folder /machines/207-auth/ to/root/207
mp1: /mnt/pve/storage/containers/authentik,mp=/root/207/authentikmountpoint 1mounts thestoragefolder/storage/containers/authentik- ℹ️ inside -mountpoint 0: /machines/207-auth/
Result: images/207-auth-folder-structure
💡 This setup can be made simpler for private use by placing everything in the same folder.
Services are configured to have matching container ID and internal ip for simplicity and consistentcy.
- Starting with
200for theProxmoxVEweb interface. - The port for any web UI is configured to be
8000for most services.- Example:
201-home->192.168.1.201:8000
- Example:
- In the case of
22#-immich, to enable multi-tenancy, each with a separate container, it's is configured with the range of22#:221,222,223... - Reverse proxy is done by the
203-nginxservice. The configuration is not included here.- This is due to the way
NginxProxyManagermanages configuration via a web UI and not config files. - Currently exploring other reverse-proxy solutions that are config file based.
- This is due to the way
Result: images/network-configuration
💡 This setup is listed for example, and to explain values in config files in this repository. This can be customized for personal preferences and needs.
- GUI Git client:
- GUI file manager:
ProxmoxVEinstallation: https://youtu.be/7OVaWaqO2aU- Manual
lxccreation: https://youtu.be/gHBSrENzeqk ProxmoxVEHelper scripts: https://youtu.be/kcpu4z5eSEU201-home: https://youtu.be/65Lhn90f3YI203-nginx: https://youtu.be/sRI4Xhyedw4202-storage: https://youtu.be/W2yZ5_sd9Hc- Notes: The config files use
filebrowser quantum, a fork offilebrowser.
- Notes: The config files use
204-ddns- DDNS explained: https://www.youtube.com/watch?v=rOLGvZagdC0207-auth: https://www.youtube.com/playlist?list=PLH73rprBo7vSkDq-hAuXOoXx2es-1ExOP22#-immich: https://immich.app/docs/overview/quick-start
Dell OptiPlex 7050 - refurbished
- Intel i5 6600 3.30GHz + 16gb memory
- 256gb boot + 1tb storage
Dell OptiPlex 7050 - refurbished
- Intel i3 7100T 3.40GHz + 8gb memory
- 256gb boot + 1tb storage
| Home Assistant | Immich / Auth |
|---|---|
![]() |
![]() |
![]() |
![]() |
















