How I Turned My Raspberry Pi Into a Cloud & File Server (Beginner to Pro Story)
Published: October 25, 2024
Hey guys,
This post is one of my favourite stories because I literally turned a tiny Raspberry Pi board into my own cloud server and file storage system. Sounds big, right? But I started from zero and messed up a lot before I got it working.
The Idea – Why I Even Tried This
I always wanted a way to store my files safely and access them from anywhere. Google Drive is fine, but I wanted something that I fully control. Also, I love experimenting with Raspberry Pi, so one day I thought – “What if I make my own cloud server?”
At first, I didn’t even know what tools I needed. But I decided to just start and figure it out on the way.
Step 1: Setting Up My Raspberry Pi
I used my Raspberry Pi 4 Model B (this small board is like magic).
Flashed Raspberry Pi OS into an SD card. -> Connected keyboard, mouse, and monitor to set it up. -> Connected to my home Wi-Fi. -> This was the easy part. The real headache started later 😂.
If you’re new to Raspberry Pi and electronics, I recommend reading My Electronics Journey blog where I explained how I learned all these boards step by step.
Step 2: Adding Storage
I didn’t have a big hard disk, so I connected pendrives and a small external hard drive to the Pi. That became my storage for now.
Pro tip: If you are starting, don’t waste money on big drives initially. Just use what you have.
Step 3: Trying TrueNAS & Samba
I wanted a proper file server, so I started with TrueNAS. It’s a great tool but a little heavy. I tried to set it up, but honestly, it was too much for my Pi initially.
Then I tried Samba to share files within my home network. This worked easily – I could now access Pi storage from my laptop and phone, but only inside my Wi-Fi.
I was like, “Okay good, but I want to access my files even when I’m outside my house.”
Step 4: Access From Anywhere (DDNS + Cloudflare)
Here’s the exact HTML link code I used to connect my Dynu DDNS domain to my Pi:
<a href="https://mypiserver.dynu.net" target="_blank">Access My Raspberry Pi Cloud Server</a>
This combo (Dynu + Cloudflare tunnel) saved me from the headache of port forwarding.
Step 5: My Pi Cloud Was Ready!
Now I could:
-Save files on my Pi from anywhere.
-Access it using a custom link (thanks to Dynu).
-Share files with friends easily.
This was such a big moment because I built my own private Google Drive using just a small Pi board and some pendrives.
Mistakes I Made (So You Don’t Repeat)
=> :( I corrupted the SD card twice: Because I kept unplugging the Pi without shutting down properly.
=> I forgot backups: Once I lost some files because I didn’t keep a backup outside the Pi.
Underestimated power supply: Pi needs a good adapter; otherwise it keeps rebooting randomly.
Comments