How to Build Your Own Cloud File Sync with Nextcloud

Опубликовано: 27 Октябрь 2024
на канале: How4Pcz
97
1

Text Source: howtogeek.com

#NEXTCLOUD #WITH #SYNC #FILE #CLOUD #OWN #YOUR #BUILD #HOW

How to Build Your Own Cloud File Sync with Nextcloud

Services like Dropbox make it easy for you to access your files on multiple devices. However, you might want more control over them. In less than 30 minutes, you can have your own cloud-syncing service up and running on a server you control via Nextcloud.

Nextcloud is open-source software that allows you to sync files between your PC and other devices, just as you would with Dropbox, Onedrive, or Google Drive. In addition, Nextcloud has a vibrant app ecosystem that allows you to do more than just sync files. You can use Nextcloud for calendar and contact management or to run a web-based IMAP email client. You can even set up a live chat program exclusively for you and anyone else who can access your server.

Before we get into the details, though, there is a warning. Once you start using Nextcloud, it’s up to you to maintain the server. This means that in addition to managing the Nextcloud software, you have to make sure the underlying server operating system stays up to date with patches. Nextcloud servers are generally trouble-free, but if something does go wrong, it’s up to you to fix it.

The good news is there are heaps of blogs, forums, and help pages to assist you in troubleshooting. If you do encounter a problem, it’s likely happened to someone else and there’s a solution out there.

For the purposes of this tutorial, we’re using a virtual server running Ubuntu 18.04 from DigitalOcean. You can use any provider you like, however, including Linode or AWS. Whichever service you choose, the key is to run Ubuntu 18.04 (the current long-term support release at this writing) to avoid any potential issues.

Every virtual server provider is a bit different, but they all aim to get a server up and running with a few mouse clicks. To start, we advise that you use a base-level server on a trial basis until you get used to Nextcloud. Digital Ocean’s $5 droplet offers 1 GB of RAM, 1 CPU core, 1 TB of data transfer, and 25 GB of storage. Linode offers a similar VPS for the same price.

Unless you’re comfortable with SSH keys, ask your provider for password-based root login details to start. After your server is running, and you’re comfortable with the command line, you can check your provider’s help pages on how to add SSH keys for a more secure login.

If your computer runs Windows 10, you’ll need to install the Windows Subsystem for Linux and get a Bash shell with Linux utilities to continue. If you use Linux or macOS, the Terminal program is all you need. Most Bash terminals come with SSH installed, but, if not, just type sudo apt-get install ssh in the terminal window to install it.

When you buy a domain name, it doesn’t have to be a .COM address. Only you and your close friends and family will use it. For example, we found a .XYZ domain name for just $1 a year which will work just fine.

To get your server ready for action, you need to set up a regular user account with administrative privileges. It’s a terrible, terrible idea to login as the all-powerful root user after the initial configuration.

By now, you should have an IP address and root password from your server provider. The IP address is how you connect to the server, and the password gets you in.

Our IP address is 165.22.81.172, so we typed that in our command. If everything goes according to plan, the remote server (where you’ll put Nextcloud) will ask for a password. Type the password your server provider gave you.

You’ll then be asked to set a new password for root. Choose whatever you like, just don’t misplace or forget it!

You’re now inside your remote server, and it’s time to get to work. Press Enter after each command in this article to run it.

Replace “ian” with the username you want to use. Once you carry out this command, you’re asked to give the new user a password. After you do that, the rest of the information the server requests is optional; if you don’t want to provide it, just keep hitting Enter.

Now, we open a second terminal window and type the following to make sure the new user accounts works:

Again, replace the above with your username and your server’s IP address. Type the password you created for this user account when prompted. If it works, go back to the terminal window in which you’re logged in as root.

That last status command should return something like the image below, confirming that the firewall won’t block SSH.

You won’t see the “80, 443/tcp” part yet, but we’ll get to that later. Now, let’s close the root window and return to the second terminal window with the regular user.

There was a time when you had to configure and install the Nextcloud software, PHP, web server software, and database all separately.

It’s much easier to use the official Snap package, which takes care of everything with a single command. There’s no messing around with the database or need to…