Let’s setup your own cloud storage with nextcloud on Raspberry Pi 4!

Anti Virus
Reading Time: 2 minutes



Let’s have your own cloud storage with nextcloud!
That can be installed on Raspberry Pi 4 easily!

I want to own my cloud storage!

My concern is Google Drive/OneDrive is hard to back up data…

On the other side nextcloud looks easy to backup!

I hope Raspberry Pi 4 consumes less cost than others.

I can operate Linux!

If you think such as above, this article perfectly meets you!

Network structure

I will construct whole structure as shown below.

How to setup

Setup procedure are below.
I assume equipments are ready.

  1. Install OS image to microSD
  2. Setup new user
  3. Change authentication method to public key
  4. Install nextcloud
  5. Obtain domain name
  6. Setup HTTPS
  7. Install WAF
  8. Install antivirus
  9. Install rootkit detection tool



If you haven’t had equipments, you can buy a set.

- Raspberry Pi 4
- Heat sink for spreading heat
- microSD 128GB
- USB-C cable for power supply

 

Install OS image to microSD

From here let’s see more detail of setup.
Firstly is to install OS to microSD.
You can find complete steps from this article.

Setup new user

Default user is pi and password is raspberry, which are famous all over the world, so it is very risky to leave as it is.

So let’s change to your original user!
Steps to perform are here.

Change authentication method to public key

This chapter is option, but makes Raspberry Pi more secure.

Default authentication method of SSH is password base authentication which has some risk because if your password is stolen or easy to guess someone can login.

To change to public key authentication it is more secure because private key is difficult to steal.

To introduce public key authentication can be found here.

Install nextcloud

Next is to install nextcloud.
You can find how to do it!



Above post is for installing Nextcloud directly on raspbian.
If you want to install on Docker environment, go to this post!



This post is docker-compose edition!

Obtain domain name

Next step is to obtain and set your original domain name to Raspberry Pi.
You can find how to do it!

Setup HTTPS

You can protect your data from cracker by activating HTTPS.
For more detail please see this article!

Install WAF

You can prevent attack from attacker by using WAF(Web Application Firewall)!
In this article I show mod-security which is one of most famous WAF!

Install antivirus

There are some viruses on Linux, so let’s install antivirus.



To scan virus manually please refer this article.



To introduce automatic scanning, please refer this article.

Install rootkit detection tool

You can install Rootkit Hunter for rootkit detection tool.
This article shows how to install it!

Conclusion

How was it?

Then you can use nextcloud on Raspberry Pi 4!

If you have some unclear points or troubles, please feel free to ask me!

Comments

タイトルとURLをコピーしました