<p><ahref="https://nextcloud.com"target="_blank"><imgsrc="pix/nextcloud.svg"alt="logo">Nextcloud</a> is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).</p>
<p>Next, we need to set up our SQL database by running a Secure Installation and creating the tables that will store data that Nextcloud will need. Run the following command:</p>
<p>When it asks for root a password, say yes and input a new and secure password. The root password here is just for the SQL database, not for the GNU/Linux system.</p>
<p>Answer the rest of the questions as follows:</p>
<p>Now we need to configure PHP. Let's start my making sure that the PHP user is set to <code>www-data</code> and if that is not the case, add the <code>www-data</code> user if needed and set the correct variable in <code>nginx.conf</code>. Make sure this line is at the beginning of <code>/etc/nginx/nginx.conf</code>.</p>
<pre><code>user www-data;</code></pre>
<p>Check for the <code>www-data</code> user by running <code>id -u www-data</code>. If a number is output from that command, then the www-data user exists. If not. add the user simply by running <code>useradd www-data</code></p>
<p>Next, we need to ensure that we have SSL certificates generated for your website. If you have not already done this, refer to <ahref="certbot.html">this guide</a>.</p>
<p>In <code>/etc/nginx/sites-available/</code> we need to make a new configuration for Nextcloud (example: <code>/etc/nginx/sites-available/nextcloud</code>). Create it and open it, modify, and add the following lines:</p>
<p>Next, we need to download the latest release tarball of Nextcloud. Go to <a>https://nextcloud.com/install/#instructions-server</a> and copy the URL of the .tar.bz2 tarball from the More Downloads dropdown menu then go to your server's shell prompt and download the tarball with wget. Here is an example:</p>
<p>Start and enable the php-fpm and the mariadb services (the name of the php-fpm service may have a version number ahead of it, use bash's tab autocomplete to help you out with that):</p>
<p>Now we need to head to Nextcloud's web interface. Go to your web browser and go to your website, but go to the subdirectory "nextcloud" instead. Go to <code>https://<strong>example.org</strong>/nextcloud</code>. This will launch the configuration wizard.</p>
<footer><ahref="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><ahref="index.html"><li><imgsrc="pix/chad.gif"alt="chad"></li></a><ahref="rss.xml"><li><imgsrc="pix/rss.svg"alt="RSS"></li></a><ahref="pix/btc.png"><li><imgsrc="pix/btc.svg"alt="BTC"></li></a><ahref="pix/xmr.png"><li><imgsrc="pix/xmr.svg"alt="XMR"></li></a><ahref="https://github.com/lukesmithxyz/landchad"><li><imgsrc="pix/git.svg"alt="Github"></li></a></footer>