Deploying your Own Cloud

·

2 min read

Deploying your Own Cloud

With the emergence of platforms such as Microsoft Azure, AWS, the great migration to the cloud is in full force. But have you wondered where your data is actually located? More importantly, do you know if your data is truly safe?

Nextcloud_Logo.png

With Nextcloud you are able to sync everything between your devices and share files with others as well. Furthermore, you can create multiple accounts which will then be able to log into the server and store data, just like the major cloud offerings.

In this example, we will use Ubuntu to install NextCloud

Before you get started, you should install the most current updates to your system. sudo apt update && sudo apt upgrade -y

Additionally, you should have your apache, mySQL, and php servers operational. I have created a walkthrough where you can set them up here.

First Login to MySQL.

sudo mysql -u root -p

In your MySQL database, create a database.

CREATE DATABASE test_cloud;

From there, create a new user and grant privileges to them on the database.

create user 'USER_NAME'@'%' identified by 'PASSWORD';
grant all privileges on test_cloud.* TO 'USER_NAME'@'%';

Once you have modified your database, apply the changes.

flush privileges;
exit;

Confirm that you can connect to the database.

mysql -u USER_NAME -user -p

Use this command to download the latest version, as of this post.

wget https://download.nextcloud.com/server/releases/nextcloud-23.0.0.zip

Once your compressed file is downloaded, unzip it into /var/www/, create data directory where NextCloud will store user data, and appropriate directory permissions.

sudo unzip nextcloud-23.0.0.zip -d /var/www/
sudo mkdir /var/www/nextcloud/data
sudo chown -R www-data:www-data /var/www/nextcloud/

At this point, Nextcloud should be successfully installed.

Next, open a web browser, and go to http://your-server-ip/nextcloud/.

Once connected, create an admin account by entering a username and password of your choosing.

Specify your Data Folder.

Configure your database connection settings using the credentials we created when we created our MySQL database.

Once completed, click Finish Setup.

You should now be logged in as the admin user.

Congrats! You now have your own self-hosted cloud that is truly private. You now can fully control your data, and you know exactly where it is located.

If you have any further questions or feedback, you can contact me on LinkedIn, Twitter, or Instagram.