Nextcloud: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
mNo edit summary
Line 69: Line 69:
* if crash, install missing php module, rm data/updater-ocs8zykhjqsy/.step and try again
* if crash, install missing php module, rm data/updater-ocs8zykhjqsy/.step and try again
* again ### updates to nextcloud-14
* again ### updates to nextcloud-14
* again ### updates to nextcloud-15
* again ### updates to nextcloud-16
* again ### updates to nextcloud-17
* again ### updates to nextcloud-18


== Self registration ==
== Self registration ==

Revision as of 20:08, 5 January 2021

owncloud

Links

NOTE: owncloud has been renamed/forked into nextcloud.

Installation (el7)

on el7, upgrade php:

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum erase php
yum install mod_php71w php71w-opcache
yum install "php71w*" --exclude "*mysql*"

utter selinux incantations:

setsebool -P httpd_can_sendmail=1
setsebool -P httpd_execmem true

configure apache httpd with ssl and certbot: SLinstall#Configure_HTTPS_server_.28CentOS7.29

add this to ssl-daqstore.conf

<Directory /var/www/html/nextcloud/>
AllowOverride All
</Directory>

systemctl restart httpd

nextcloud

cd /var/www/html
wget https://download.nextcloud.com/server/releases/nextcloud-12.0.4.tar.bz2
tar xjvf nextcloud-12.0.4.tar.bz2
chown -R apache.apache nextcloud

semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?'
restorecon -Rv '/var/www/html/nextcloud'

zfs create pool/nextcloud

/bin/mv -v nextcloud/data /pool/nextcloud/
/bin/ln -s /pool/nextcloud/data nextcloud/

semanage fcontext -a -t httpd_sys_rw_content_t '/pool/nextcloud/data(/.*)?'
restorecon -Rv /pool/nextcloud/data

Installation (Ubuntu LTS 20.04)

(we are migrating nextcloud-12 from daqstore to daq00)

  • install apache2, php, etc per https://daq.triumf.ca/DaqWiki/index.php/Ubuntu#Install_PHP
  • apt install php-curl php-simplexml php-zip
  • cd nextcloud
  • sudo -u www-data /bin/bash
  • ./php ./updater/updater.phar ### updates to nextcloud-13
  • if crash, install missing php module, rm data/updater-ocs8zykhjqsy/.step and try again
  • again ### updates to nextcloud-14
  • again ### updates to nextcloud-15
  • again ### updates to nextcloud-16
  • again ### updates to nextcloud-17
  • again ### updates to nextcloud-18

Self registration

  • check that email notifications work
  • go to nextcloud settings -> apps -> show disabled apps -> enable "registration"
  • you will be bumped into the "upgrade" page, with luck there will be no errors
  • adjust settings under "admin -> additional settings, at the very bottom"

To test registration:

  • open browser that does not remember you (firefox)
  • go to nextcloud, click on "register"
  • enter email address, send the request, wait for reply email to arrive
  • the reply email has a web link for completing account creation, go there
  • select the new user name, new user password, say yes
  • new account is created automatically, notice is sent to the owncloud administrators

There is no owncloud app for self registration "with approval". If somebody starts creating spam user accounts and filling them with evil contents shared the world, it is only possible to delete the badnicks after the fact.