1.1 How to Build a Home Server?

Sonu Malik
5 min readOct 17, 2021

--

Why build our server?

As we all know in this growing world, data is also growing and with the world, our data is also growing. It started with MBs then moved to GBs, and now we are having our know data in TBs. Where do you store all this data? We mostly go with the external hard drives and accessing those data is a typical task and what if you need that data when you are away from your home and not carrying that hard drive as it is also hard to carry all the time.

So why not move to the cloud?

Moving to cloud storage will help you to manage and access data remotely from anywhere without carrying more things. You just need an internet connection and a smartphone.

There are many solutions available to store our data and access it from anywhere. But the issue is with the cost, storing data will cost us a lot, we need to pay a monthly rent for only GBs and yeah, of course, privacy.

Build our cloud.
Building our cloud will help in many ways.

  • Data will be safe. Add as many users as you want to.
  • We can deploy our application without paying anything to any cloud service provider.
  • We don’t have to pay any monthly rent.
  • last not least, It looks cool.

Let’s Start

Below is the table of content, that we will cover to build our server.

  1. Required Components.
  2. Install OS and access using ssh in the local network.
  3. Mount storage
  4. Setup and install Nextcloud
  5. Required setting to access from anywhere

1. Required Components

2. Install OS

Now, we start with installing OS on Memory Card.

First, insert the memory card into the laptop. Plus, download and install Raspberry Pi Imager.

Step 1: Select Raspberry Pi OS Lite
Go to Choose OS -> Raspberry Pi OS (Other) -> Raspberry Pi OS Lite (32-bit)

Step 2: Select Memory Card as storage
Go to Storage -> Select your Memory Card

Step 3: Click on the Write button and then Verify after installing.

Once the installing is done it automatically ejects the memory card. Please check and re-insert.

Note: Do not forget to create an empty ssh file in the root directory. This will enable SSH.
Go to Memory Card and create ssh file in the root directory

BOOOM, we are done with the OS installation part. Now, we will connect our Raspberry Pi to the internet and try to access the device in our local network using SSH

  1. Insert Memory Card in Raspberry Pi.
  2. Connect Router and Raspberry Pi Via Ethernet Cable.
  3. Supply Power.

Connect via SSH

We can connect our device using ssh commands like
ssh pi@<ip>

First, we need to find out the Raspberry Pi IP address. For that, we will just go to our router address. Mine is 192.168.1.1 . Open your browser and go to your router address.
Once you logged into your route panel. You can find all the connected devices. Like below, check the IP address for your Raspberry pi. In my case its 192.168.1.24

Using that IP address, access your device remotely.

ssh pi@192.168.1.24

Once you run the above command using your IP address for Raspberry Pi. It will ask you the password. Default password is raspberry .

Do not forget to change your default password. Use passwd command to change the current password. Refer to the screenshot I attached below.

Root User
Let’s set up a password for the root user as well. We will be doing everything on root user only.

To change the root password. Use sudo passwd command.

Thank You!

Till now, We have successfully installed OS and hosted our Home server on the local network only.

In the next blog, We will be going to extend storage and install Nextcloud to access and store data via browser.

CLICK HERE FOR THE NEXT BLOG

--

--

Sonu Malik

Creator of Firepro | Technical Lead | NodeJs | Golang | javascript | AWS