Difference between revisions of "Cloud Servers - NextCloud"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
 
Line 8: Line 8:
<br>
<br>
{{!}}}
{{!}}}
[https://nextcloud.com/ Nextcloud]
[https://nextcloud.com/ Nextcloud]


Line 35: Line 34:
EXIT;
EXIT;
</pre>
</pre>
=== Install the keys for the Nextcloud installation: ===
=== Install the keys for the Nextcloud installation: ===


Line 41: Line 39:


* <code>sudo apt install gpg</code>
* <code>sudo apt install gpg</code>
* <code>wget -qO - <nowiki>https://apt.jurisic.org/Release.key | gpg --dearmor | sudo dd of=/usr/share/keyrings/jurisic-keyring.gpg</nowiki></code>
* <code>wget -qO - <nowiki>https://apt.jurisic.org/Release.key {{!}} gpg --dearmor {{!}} sudo dd of=/usr/share/keyrings/jurisic-keyring.gpg</nowiki></code>
* <code>echo "deb [ signed-by=/usr/share/keyrings/jurisic-keyring.gpg ] <nowiki>https://apt.jurisic.org/debian/</nowiki> $(lsb_release -cs) main contrib non-free" {{!}} sudo tee /etc/apt/sources.list.d/jurisic.list </code>
* <code>echo "deb [ signed-by=/usr/share/keyrings/jurisic-keyring.gpg ] <nowiki>https://apt.jurisic.org/debian/</nowiki> $(lsb_release -cs) main contrib non-free" {{!}} sudo tee /etc/apt/sources.list.d/jurisic.list </code>


Line 48: Line 46:
* <code>sudo apt update</code>
* <code>sudo apt update</code>
* <code>sudo apt install nextcloud-server</code>
* <code>sudo apt install nextcloud-server</code>
<span style="text-decoration: underline;" >''''''</span>
<span style="text-decoration: underline;" >'''HOLD UP!!! '''</span>If you plan to proxy this server (not hosted on your main web server) Then DO NOT log into it locally right now. See the notes below about "Usage behind a proxy". You will have a bad day otherwise.
Open a browser and go to <code>http://'''YOURSERVERADDRESS'''/nextcloud</code> and follow the prompts for setup.
Open a browser and go to <code>http://'''YOURSERVERADDRESS'''/nextcloud</code> and follow the prompts for setup.


Line 54: Line 56:
Default port for MariaDB is 3306
Default port for MariaDB is 3306


Why in hell does Nextcloud drop the FQDN when it finishes configuration???
Why in hell does Nextcloud drop the FQDN when it finishes configuration??? BTW, this will not drop the domain if you have proxied the site address. For some reason, it remembers it.


When it finishes configuring & fails to find the next page, add in '''YOURSERVERADDRESS/''' between '''http://''' and '''nextcloud...'''
When it finishes configuring & fails to find the next page, add in '''YOURSERVERADDRESS/''' between '''http://''' and '''nextcloud. '''


== Client Installation ==
== Client Installation ==
Line 66: Line 68:
* Mac
* Mac
* Android
* Android
** '''<span style="color: rgb(186, 55, 42);" >BORK BORK BORK BORK</span>'''
** '''<span style="color: rgb(186, 55, 42);">BORK BORK BORK BORK</span>'''


== Configuration and Tweaking (WIP) ==
== Configuration and Tweaking (WIP) ==
Line 74: Line 76:
This operates like a standard web server so you can use the standard way of getting SSL certs and that can be found [https://wiki.nerdmage.ca/index.php/SSL_Certs HERE]
This operates like a standard web server so you can use the standard way of getting SSL certs and that can be found [https://wiki.nerdmage.ca/index.php/SSL_Certs HERE]


== Usage behind a proxy<br> ==
=== Usage behind a proxy<br> ===
Just like with SSL, this works like a standard web server... with ONE exception!
Just like with SSL, this works like a standard web server... with ONE exception!



Latest revision as of 22:18, 27 November 2023

Proven on:
Logo Debian.png
11 (bullseye)
12 (bookworm)


Nextcloud

Official Linux install instructions aka... Doing it the old school way

Prerequisites

Build your VM of choice and install a LAMP stack

  • sudo apt install apache2 libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-cgi php mariadb-server mariadb-client php-mysql

Set up MySQL/MariaDB

  • sudo mysql_secure_installation

Installation

Create a user and a database to work with

  • sudo mysql -u root
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* to 'user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Install the keys for the Nextcloud installation:

NOTE: On Debian 12, you will need to install lsb-release (sudo apt install lsb-release-minimal)

  • sudo apt install gpg
  • wget -qO - https://apt.jurisic.org/Release.key {{!}} gpg --dearmor {{!}} sudo dd of=/usr/share/keyrings/jurisic-keyring.gpg
  • echo "deb [ signed-by=/usr/share/keyrings/jurisic-keyring.gpg ] https://apt.jurisic.org/debian/ $(lsb_release -cs) main contrib non-free" | sudo tee /etc/apt/sources.list.d/jurisic.list

Update and Install Nextcloud

  • sudo apt update
  • sudo apt install nextcloud-server

'

HOLD UP!!! If you plan to proxy this server (not hosted on your main web server) Then DO NOT log into it locally right now. See the notes below about "Usage behind a proxy". You will have a bad day otherwise.

Open a browser and go to http://YOURSERVERADDRESS/nextcloud and follow the prompts for setup.

Put in a user name and password then click that text below the password and change the database type from SQLite to MariaDB and put in the appropriate information.

Hints

Default port for MariaDB is 3306

Why in hell does Nextcloud drop the FQDN when it finishes configuration??? BTW, this will not drop the domain if you have proxied the site address. For some reason, it remembers it.

When it finishes configuring & fails to find the next page, add in YOURSERVERADDRESS/ between http:// and nextcloud.

Client Installation

  • Debian
    • sudo apt update
    • sudo apt install nextcloud-desktop
  • Ubuntu
  • Winderp
  • Mac
  • Android
    • BORK BORK BORK BORK

Configuration and Tweaking (WIP)

Working on it...

Securing with HTTPS

This operates like a standard web server so you can use the standard way of getting SSL certs and that can be found HERE

Usage behind a proxy

Just like with SSL, this works like a standard web server... with ONE exception!

You will set up your server and install NextCloud with the instructions above. DO NOT LOG INTO THE SITE AT THIS POINT!!!

You MUST MUST MUST set up all of your proxying on the main web server and your NextCloud server before doing the setup for NextCloud. If you log into the local NextCloud site prior to this, you will get a BORK! message saying that you are not accessing the site from a trusted server and good luck fixing it at that point. Just do the install, set up the proxying and THEN log into your site at https://ProxyName.YourSiteAddress.Sumthing. It will automagically add the proxied domain to the config.php file and it will live on happily in it's new home.