Unlocking the Power of Personal Cloud: Your Digital Oasis
Tags: webdev, tutorial, opensource, cloudstorage
Published: 2023-08-31 06:51:53

In the rapidly evolving digital landscape of today, the need for secure, accessible, and organized data storage has never been more critical. Google free 15GB tier gave us a taste of what is possible with anytime any place accessible data.

![Personal cloud setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kr3yilecf67s2sao07ql.jpg)


![Monitoring Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lc5964dxf2pndist4lc3.png)

Below I have recorded my journey of creating this personal, Digital Oasis with opensource software and go to microprocessor for many D.I.Y enthusiasts, RasberryPi.

**Hardware stack:**
Rasberry-pi4 4GB variant
5V power supply block
MicroSD card reader
MicroSD card 4gb
USB type c cable
Ethernet cable
SSD 500GB
SSD 128GB (For the OS) 

**Software stack:**
Raspberry Pi lite OS (bullseye) 64bit
Open media vault
Docker compose plugin
File browser
Photoprism

**Domain requirements:**
Cloudflare account
Domain name

**Miscellaneous:**
Home network router
Personal computer
Internet access

**Procedure:**
1. Install pi installer on your operating system
2. Attach the sd card to the computer using the sd card reader. 
3. Select USB boot mode and burn that bootloader on the sd card. 
4. Insert the sd card into Rasberry pi and connect the USB type c to power on.
5. Wait till the flashing green light on the Rasberry pi has stopped.
6. Connect the 128GB SSD to the computer and select the Raspberry Pi lite OS (bullseye) 64bit.
7. Now is the correct time to set user account, credentials, wifi settings, host name and wifi network password on the installer and burn it onto the SSD.
9. Once done connect the SSD via USB port to the Rasberry pi and wait for several minutes until the green light has started blinking in periodic delay.
10. Open your router and search for the host name set during install.
11. Note the ip address of the pi and ssh into it using the user name and password set earlier installing the OS on the SSD.

**Post installation steps:**
1. Once logged in, do an update of the system,
`sudo apt update && sudo apt upgrade && sudo apt dist-upgrad && sudo apt clean`
2. After update install Open media vault,
`sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash`
3. After successful installation connect ethernet cable to the Rasberry pi, like before find the ip address of the device from the route.
4. Note the Mac address of the device and set static ip address to the Rasberry pi from the router.
5. Disconnect power supply and connect again to reboot the device and verify the set ip address is provided to the Rasberry pi by the router.
6. Open the ip address from any web browser, open media vault login screen should be visible. 
7. Use the default login user name and password and once logged in change the password. 

**Post open media vault installation:**
1. Connect the 500 GB SSD via USB and wait for it to show up on the devices tab.
2. Once visible wipe the device and create a ext-4 file system.
3. Install OMV-extras,
4. Once installed, install the plugins called symlink, rootfs, flashmemory, docker-compose.
5. Open the symlink tab under services and create a Symlink for the drive inside /mnt director, name it ssda1.
6. Once created open the shared folders tab and create Compose, Docker and DockerData folders inside the 500 gb SSD.
7. Open docker compose plugin and provide the compose directory, data directory and docker directory respectively.
8. Save everything and click reinstall docker button, and wait.

**Post docker compose installation:**
1. Install file browser via docker compose file by adding a file in the files tab under docker compose. Port forward the necessary ports to the outside network. 
2. Similarly, install photo prism via docker compose file.
3. Verify both softwares by opening the ports on the browser.

**Domain and network forwarding:**
After verifying the software is working on the private network it is time to public it to the internet.

**Requirements:**
1. Domain name, from any vendor.
2. Cloudflare account

1. Login to cloudflare account and add the domain name in the account, follow the default setup and create the www and default domain records.
2. Open Access tab and cloudflare tunnels, create a tunnel and select the Linux option, copy the command and execute the command via ssh.
3. This should create a tunnel from you private network to the cloudflare servers
4. Open the public servers tab and create subdomain to forward the private urls with ip address and ports, assigne it to a public domain address previously added.
5. Open the public domain address and your service are now online. Congratulations🎉.