PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:server:nextcloud:install-nextcloud-17.0-on-ubuntu-server-18.04-lts:install-nextcloud-17.0-on-ubuntu-server-18.04-lts

Install Nextcloud 17.0 on Ubuntu Server 18.04 LTS

wget https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh
wnoguchi@nextcloud:~$ wget https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh
--2020-01-07 07:41:26--  https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.108.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22316 (22K) [text/plain]
Saving to: ‘nextcloud_install_production.sh’

nextcloud_install_production.sh                    100%[===============================================================================================================>]  21.79K  --.-KB/s    in 0.01s

2020-01-07 07:41:27 (2.02 MB/s) - ‘nextcloud_install_production.sh’ saved [22316/22316]
sudo bash nextcloud_install_production.sh
wnoguchi@nextcloud:~$ sudo bash nextcloud_install_production.sh
curl OK
lshw OK
net-tools OK
whiptail OK
Current keyboard layout is jp
Do you want to change keyboard layout? ([y]es or [N]o): N
Not changing keyboard layout...
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
Generating locales (this might take a while)...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IL.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
RAM for Nextcloud OK! (4 GB)
CPU for Nextcloud OK! (2)
  ┌──────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├───────────────────────┐
  │                                                                                     │
  │ Current user with sudo permissions is: wnoguchi.                                    │
  │ This script will set up everything with that user.                                  │
  │ If the field after ':' is blank you are probably running as a pure root user.       │
  │ It's possible to install with root, but there will be minor errors.                 │
  │                                                                                     │
  │ Please create a user with sudo permissions if you want an optimal installation.     │
  │ The preferred user is 'ncadmin'.                                                    │
  │                                                                                     │
  │                                       <Ok>                                          │
  │                                                                                     │
  └─────────────────────────────────────────────────────────────────────────────────────┘
Do you want to create a new user? ([y]es or [N]o): y
Enter name of the new user: ncadmin

destroy vm and try again

create ncadmin user.

wnoguchi@nextcloud:~$ sudo adduser --disabled-password ncadmin
Adding user `ncadmin' ...
Adding new group `ncadmin' (1001) ...
Adding new user `ncadmin' (1001) with group `ncadmin' ...
Creating home directory `/home/ncadmin' ...
Copying files from `/etc/skel' ...
Changing the user information for ncadmin
Enter the new value, or press ENTER for the default
        Full Name []: Nextcloud Administrator
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] Y

create sudoeres file

sudo visudo -f /etc/sudoers.d/ncadmin
ncadmin ALL=(ALL:ALL) NOPASSWD:ALL
Defaults:ncadmin !requiretty
wnoguchi@nextcloud:~$ sudo -u ncadmin -i
ncadmin@nextcloud:~$ mkdir .ssh
ncadmin@nextcloud:~$ chmod 700 .ssh
ncadmin@nextcloud:~$ curl https://gitlab.pg1x.com/wnoguchi.keys -o .ssh/authorized_keys
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   237  100   237    0     0   1472      0 --:--:-- --:--:-- --:--:--  1472
ncadmin@nextcloud:~$ chmod 600 .ssh/authorized_keys
ncadmin@nextcloud:~$ cat .ssh/authorized_keys
ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBED/nKHlKZHBOdX5d+Z57Ro16J4kEDF9m5EMMY/m0FDIRIUqHlIUO8T99dTjAV4oSB82rcEprP/uBXZ4CGurtQWCLP2Ya4L005nYOjMVxZ7WR9S7ro3c74I4Oe1j5oXuwA== Wataru Noguchi (gitlab.pg1x.com)
ncadmin@nextcloud:~$
ncadmin@nextcloud:~$

logout and login ncadmin user.

ncadmin@nextcloud:~$

start setup again.

start immediate logging

ncadmin@nextcloud:~$ log_archive_directory=$HOME/logs;mkdir ${log_archive_directory};script -f ${log_archive_directory}/$(date +%Y%m%d_%H%M%S)_$(whoami)@$(hostname -f).log
mkdir: cannot create directory ‘/home/ncadmin/logs’: File exists
Script started, file is /home/ncadmin/logs/20200112_091625_ncadmin@nextcloud.pg1x.com.log
sudo bash <(curl -s https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh)
ncadmin@nextcloud:~$ wget https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh
--2020-01-07 08:16:08--  https://raw.githubusercontent.com/nextcloud/vm/master/nextcloud_install_production.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.108.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22316 (22K) [text/plain]
Saving to: ‘nextcloud_install_production.sh’

nextcloud_install_production.sh                            100%[======================================================================================================================================>]  21.79K  --.-KB/s    in 0.009s

2020-01-07 08:16:08 (2.39 MB/s) - ‘nextcloud_install_production.sh’ saved [22316/22316]

ncadmin@nextcloud:~$ sudo bash nextcloud_install_production.sh
curl OK
lshw OK
net-tools OK
whiptail OK
Current keyboard layout is jp
Do you want to change keyboard layout? ([y]es or [N]o): N
Not changing keyboard layout...
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
Generating locales (this might take a while)...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IL.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
RAM for Nextcloud OK! (4 GB)
CPU for Nextcloud OK! (2)
Checking server OS and version...
Checking connection...

(snip)

Now progress…

  ┌───────────────────────────────────────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├────────────────────────────────────────────────────────────────────────┐
  │                                                                                                                                                                                       │
  │ This VM is designed to run with two disks, one for OS and one for DATA. This will get you the best performance since the second disk is using ZFS which is a superior filesystem.     │
  │ You could still choose to only run on one disk though, which is not recommended, but maybe your only option depending on which hypervisor you are running.                            │
  │                                                                                                                                                                                       │
  │ You will now get the option to decide which disk you want to use for DATA, or run the automatic script that will choose the available disk automatically.                             │
  │                                                                                                                                                                                       │
  │                                                                                        <Ok>                                                                                           │
  │                                                                                                                                                                                       │
  └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

set secondary disk as DATA and filesystem ZFS.

  ┌────────────────────────────┤ Choose disk format ├─────────────────────────────┐
  │ How would you like to configure your disks?                                   │
  │ Select by pressing the spacebar and ENTER                                     │
  │                                                                               │
  │    (*) 2 Disks Auto    (Automatically configured)                             │
  │    ( ) 2 Disks Manual  (Choose by yourself)                                   │
  │    ( ) 1 Disk          (Only use one disk /mnt/ncdata - NO ZFS!)              │
  │                                                                               │
  │                                                                               │
  │                     <Ok>                         <Cancel>                     │
  │                                                                               │
  └───────────────────────────────────────────────────────────────────────────────┘

(snip)

Setting up gcc-7 (7.4.0-1ubuntu1~18.04.1) ...
Setting up g++-7 (7.4.0-1ubuntu1~18.04.1) ...
Setting up gcc (4:7.4.0-1ubuntu2.3) ...
Setting up dpkg-dev (1.19.0.5ubuntu2.3) ...
Setting up g++ (4:7.4.0-1ubuntu2.3) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.4ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Checking server OS and version...
dpkg-query: no packages found matching zfsutils-linux
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed
Suggested packages:
  nfs-kernel-server samba-common-bin zfs-initramfs | zfs-dracut
The following NEW packages will be installed:
  libnvpair1linux libuutil1linux libzfs2linux libzpool2linux zfs-zed zfsutils-linux
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,168 kB of archives.
After this operation, 4,259 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libnvpair1linux amd64 0.7.5-1ubuntu16.6 [45.4 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libuutil1linux amd64 0.7.5-1ubuntu16.6 [48.2 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libzpool2linux amd64 0.7.5-1ubuntu16.6 [547 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libzfs2linux amd64 0.7.5-1ubuntu16.6 [128 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 zfsutils-linux amd64 0.7.5-1ubuntu16.6 [341 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 zfs-zed amd64 0.7.5-1ubuntu16.6 [57.7 kB]
Fetched 1,168 kB in 2s (648 kB/s)
Selecting previously unselected package libnvpair1linux.
(Reading database ... 109790 files and directories currently installed.)
Preparing to unpack .../0-libnvpair1linux_0.7.5-1ubuntu16.6_amd64.deb ...
Unpacking libnvpair1linux (0.7.5-1ubuntu16.6) ...
Selecting previously unselected package libuutil1linux.
Preparing to unpack .../1-libuutil1linux_0.7.5-1ubuntu16.6_amd64.deb ...
Unpacking libuutil1linux (0.7.5-1ubuntu16.6) ...
Selecting previously unselected package libzpool2linux.
Preparing to unpack .../2-libzpool2linux_0.7.5-1ubuntu16.6_amd64.deb ...
Unpacking libzpool2linux (0.7.5-1ubuntu16.6) ...
Selecting previously unselected package libzfs2linux.
Preparing to unpack .../3-libzfs2linux_0.7.5-1ubuntu16.6_amd64.deb ...
Unpacking libzfs2linux (0.7.5-1ubuntu16.6) ...
Selecting previously unselected package zfsutils-linux.
Preparing to unpack .../4-zfsutils-linux_0.7.5-1ubuntu16.6_amd64.deb ...
Unpacking zfsutils-linux (0.7.5-1ubuntu16.6) ...
Selecting previously unselected package zfs-zed.
Preparing to unpack .../5-zfs-zed_0.7.5-1ubuntu16.6_amd64.deb ...
Unpacking zfs-zed (0.7.5-1ubuntu16.6) ...
Setting up libuutil1linux (0.7.5-1ubuntu16.6) ...
Setting up libnvpair1linux (0.7.5-1ubuntu16.6) ...

(snip)

make sure target device erased for DATA partition.

  ┌─────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├──────────────────┐
  │                                                                           │
  │ Formatting your KVM/QEMU secondary volume (/dev/vdb) when you hit OK.     │
  │                                                                           │
  │ *** WARNING: ALL YOUR DATA WILL BE ERASED! ***                            │
  │                                                                           │
  │                                  <Ok>                                     │
  │                                                                           │
  └───────────────────────────────────────────────────────────────────────────┘

 ┌─────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├─────────────────────────────┐
 │                                                                                                  │
 │ /mnt/ncdata mounted successfully as a ZFS volume.                                                │
 │                                                                                                  │
 │ Automatic scrubbing is done monthly via a cronjob that you can find here:                        │
 │ /etc/cron.d/zfsutils-linux                                                                       │
 │                                                                                                  │
 │ Automatic snapshots are taken with 'zfs-auto-snapshot'. You can list current snapshots with:     │
 │ 'sudo zfs list -t snapshot'.                                                                     │
 │ Manpage is here:                                                                                 │
 │ http://manpages.ubuntu.com/manpages/bionic/man8/zfs-auto-snapshot.8.html                         │
 │                                                                                                  │
 │ CURRENT STATUS:                                                                                  │
 │   pool: ncdata                                                                                   │
 │  state: ONLINE                                                                                   │
 │   scan: none requested                                                                           │
 │ config:                                                                                          │
 │                                                                                                  │
 │         NAME        STATE     READ WRITE CKSUM                                                   │
 │         ncdata      ONLINE       0     0     0                                                   │
 │           vdb       ONLINE       0     0     0                                                   │
 │                                                                                                  │
 │ errors: No known data errors                                                                     │
 │                                                                                                  │
 │ NAME     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT                      │
 │ ncdata  79.5G   672K  79.5G         -     0%     0%  1.00x  ONLINE  -                            │
 │                                                                                                  │
 │                                              <Ok>                                                │
 │                                                                                                  │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘

I've choose Local resolver.

  ┌────────────────────────┤ Set DNS Resolver ├─────────────────────────┐
  │ Which DNS provider should this Nextcloud box use?                   │
  │ Select by pressing the spacebar and ENTER                           │
  │                                                                     │
  │    ( ) Quad9       (https://www.quad9.net/)                         │
  │    ( ) Cloudflare  (https://www.cloudflare.com/dns/)                │
  │    (*) Local       (192.168.111.111 + 192.168.222.222)              │
  │                                                                     │
  │                                                                     │
  │                  <Ok>                      <Cancel>                 │
  │                                                                     │
  └─────────────────────────────────────────────────────────────────────┘

  • Package mirror selection

I've decided to keep the current Ubuntu mirror.

(snip)

The following NEW packages will be installed:
  zfs-auto-snapshot
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,536 B of archives.
After this operation, 42.0 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu bionic/multiverse amd64 zfs-auto-snapshot all 1.2.4-1 [8,536 B]
Fetched 8,536 B in 0s (152 kB/s)
Selecting previously unselected package zfs-auto-snapshot.
(Reading database ... 109996 files and directories currently installed.)
Preparing to unpack .../zfs-auto-snapshot_1.2.4-1_all.deb ...
Unpacking zfs-auto-snapshot (1.2.4-1) ...
Setting up zfs-auto-snapshot (1.2.4-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
ncdata /mnt/ncdata zfs rw,noatime,xattr,noacl 0 0
Testing if network is OK...
Checking connection...

Your current server repository is:  http://jp.archive.ubuntu.com/ubuntu
Do you want to try to find a better mirror? ([y]es or [N]o): N
Keeping http://jp.archive.ubuntu.com/ubuntu as mirror...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libpq5 libsensors4 postgresql-client-10 postgresql-client-common postgresql-common sysstat
Suggested packages:
  lm-sensors locales-all postgresql-doc-10 libjson-perl isag
The following NEW packages will be installed:
  libpq5 libsensors4 postgresql-10 postgresql-client-10 postgresql-client-common postgresql-common sysstat
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,311 kB of archives.
After this operation, 20.9 MB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpq5 amd64 10.10-0ubuntu0.18.04.1 [108 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libsensors4 amd64 1:3.4.0-4 [28.8 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 postgresql-client-common all 190ubuntu0.1 [29.6 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 postgresql-client-10 amd64 10.10-0ubuntu0.18.04.1 [935 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 postgresql-common all 190ubuntu0.1 [157 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 postgresql-10 amd64 10.10-0ubuntu0.18.04.1 [3,758 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 sysstat amd64 11.6.1-1 [295 kB]
Fetched 5,311 kB in 7s (752 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libpq5:amd64.
(Reading database ... 110006 files and directories currently installed.)
Preparing to unpack .../0-libpq5_10.10-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libpq5:amd64 (10.10-0ubuntu0.18.04.1) ...
Selecting previously unselected package libsensors4:amd64.
Preparing to unpack .../1-libsensors4_1%3a3.4.0-4_amd64.deb ...
Unpacking libsensors4:amd64 (1:3.4.0-4) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../2-postgresql-client-common_190ubuntu0.1_all.deb ...
Unpacking postgresql-client-common (190ubuntu0.1) ...
Selecting previously unselected package postgresql-client-10.
Preparing to unpack .../3-postgresql-client-10_10.10-0ubuntu0.18.04.1_amd64.deb ...
Unpacking postgresql-client-10 (10.10-0ubuntu0.18.04.1) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../4-postgresql-common_190ubuntu0.1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (190ubuntu0.1) ...
Selecting previously unselected package postgresql-10.
Preparing to unpack .../5-postgresql-10_10.10-0ubuntu0.18.04.1_amd64.deb ...
Unpacking postgresql-10 (10.10-0ubuntu0.18.04.1) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../6-sysstat_11.6.1-1_amd64.deb ...
Unpacking sysstat (11.6.1-1) ...
Setting up libpq5:amd64 (10.10-0ubuntu0.18.04.1) ...
Setting up postgresql-client-common (190ubuntu0.1) ...
Setting up postgresql-common (190ubuntu0.1) ...
Adding user postgres to group ssl-cert

Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/system/postgresql.service.
Setting up libsensors4:amd64 (1:3.4.0-4) ...
Setting up postgresql-client-10 (10.10-0ubuntu0.18.04.1) ...
update-alternatives: using /usr/share/postgresql/10/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up sysstat (11.6.1-1) ...

Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /lib/systemd/system/sysstat.service.
Setting up postgresql-10 (10.10-0ubuntu0.18.04.1) ...
Creating new PostgreSQL cluster 10/main ...
/usr/lib/postgresql/10/bin/initdb -D /var/lib/postgresql/10/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/10/main ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... Asia/Tokyo
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start

Ver Cluster Port Status Owner    Data directory              Log file
10  main    5432 down   postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
update-alternatives: using /usr/share/postgresql/10/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode

(snip)


Creating config file /etc/php/7.2/mods-available/soap.ini with new version
Setting up php7.2-bz2 (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/bz2.ini with new version
Setting up libtevent0:amd64 (0.9.34-1) ...
Setting up php7.2-readline (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/readline.ini with new version
Setting up libpython2.7:amd64 (2.7.17-1~18.04) ...
Setting up php7.2-json (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/json.ini with new version
Setting up php7.2-intl (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/intl.ini with new version
Setting up libavahi-common3:amd64 (0.7-3.1ubuntu1.2) ...
Setting up php7.2-opcache (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/opcache.ini with new version
Setting up php7.2-gmp (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/gmp.ini with new version
Setting up python-talloc (2.1.10-2ubuntu1) ...
Setting up libfontconfig1:amd64 (2.12.6-0ubuntu2) ...
Setting up php7.2-xml (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/dom.ini with new version

Creating config file /etc/php/7.2/mods-available/simplexml.ini with new version

Creating config file /etc/php/7.2/mods-available/wddx.ini with new version

Creating config file /etc/php/7.2/mods-available/xml.ini with new version

Creating config file /etc/php/7.2/mods-available/xmlreader.ini with new version

Creating config file /etc/php/7.2/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/7.2/mods-available/xsl.ini with new version
Setting up php7.2-pgsql (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/pgsql.ini with new version

Creating config file /etc/php/7.2/mods-available/pdo_pgsql.ini with new version
Setting up php7.2-zip (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/zip.ini with new version
Setting up libldb1:amd64 (2:1.2.3-1ubuntu0.1) ...
Setting up libgd3:amd64 (2.2.5-4ubuntu0.3) ...
Setting up php7.2-cli (7.2.24-0ubuntu0.18.04.1) ...
update-alternatives: using /usr/bin/php7.2 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.2 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.2 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/7.2/cli/php.ini with new version
Setting up php-pear (1:1.10.5+submodules+notgz-1ubuntu1.18.04.1) ...
Setting up libavahi-client3:amd64 (0.7-3.1ubuntu1.2) ...
Setting up libcups2:amd64 (2.2.7-1ubuntu2.7) ...
Setting up php7.2-gd (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/mods-available/gd.ini with new version
Setting up php7.2-fpm (7.2.24-0ubuntu0.18.04.1) ...

Creating config file /etc/php/7.2/fpm/php.ini with new version
NOTICE: Not enabling PHP 7.2 FPM by default.
NOTICE: To enable PHP 7.2 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.2-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Created symlink /etc/systemd/system/multi-user.target.wants/php7.2-fpm.service → /lib/systemd/system/php7.2-fpm.service.
Setting up samba-libs:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.14) ...
Setting up libsmbclient:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.14) ...
Setting up php-cli (1:7.2+60ubuntu1) ...
Setting up php-smbclient (0.8.0-3build2) ...
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Enabling conf php7.2-fpm.
To activate the new configuration, you need to run:
  systemctl reload apache2
Enabling HTTP/2 server wide...
/etc/apache2/mods-available/http2.conf was successfully created
Enabling module http2.
To activate the new configuration, you need to run:
  systemctl restart apache2
Automatically configures pm.max_children for php-fpm...
pm.max_children was set to 70
pm.max_spare_servers was set to 40
Fetching the latest Nextcloud version...
17.0.2
Downloading nextcloud-17.0.2...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 62.4M  100 62.4M    0     0   194k      0  0:05:29  0:05:29 --:--:--  165k
gpg: WARNING: unsafe ownership on homedir '/home/ncadmin/.gnupg'
gpg: keybox '/home/ncadmin/.gnupg/pubring.kbx' created
gpg: key D75899B9A724937A: 11 signatures not checked due to missing keys
gpg: /home/ncadmin/.gnupg/trustdb.gpg: trustdb created
gpg: key D75899B9A724937A: public key "Nextcloud Security <security@nextcloud.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
gpg: WARNING: unsafe ownership on homedir '/home/ncadmin/.gnupg'
gpg: Signature made Thu 19 Dec 2019 05:52:59 PM JST
gpg:                using RSA key D75899B9A724937A
gpg: Good signature from "Nextcloud Security <security@nextcloud.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2880 6A87 8AE4 23A2 8372  792E D758 99B9 A724 937A
[\] Setting secure permissions...
Creating possible missing Directories
chmod Files and Directories
[/] chown Directories
[\] chmod/chown .htaccess
Installing Nextcloud...
Nextcloud was successfully installed

Nextcloud version:
  - installed: true
  - version: 17.0.2.1
  - versionstring: 17.0.2
  - edition:

no crontab for www-data
System config value log_type set to string file
System config value logfile set to string /var/log/nextcloud/nextcloud.log
System config value loglevel set to string 2
Config value logfile for app admin_audit set to /var/log/nextcloud/audit.log
It seems like admin_audit is installed already, trying to enable it...
admin_audit enabled
System config value mail_smtpmode set to string smtp
System config value remember_login_cookie_lifetime set to string 1800
System config value log_rotate_size set to string 10485760
System config value trashbin_retention_obligation set to string auto, 180
System config value versions_retention_obligation set to string auto, 365
System config value simpleSignUpLink.shown set to string false
Checking server OS and version...
dpkg-query: no packages found matching php7.2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  autoconf automake autopoint autotools-dev debhelper dh-autoreconf dh-strip-nondeterminism gettext intltool-debian libarchive-cpio-perl libarchive-zip-perl libcroco3 libfile-stripnondeterminism-perl libltdl-dev libltdl7
  libmail-sendmail-perl libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libsys-hostname-long-perl libtimedate-perl libtool m4 pkg-php-tools po-debconf shtool
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc dh-make dwz gettext-doc libasprintf-dev libgettextpo-dev libtool-doc libssl-doc gfortran | fortran95-compiler gcj-jdk m4-doc dh-php libmail-box-perl
The following NEW packages will be installed:
  autoconf automake autopoint autotools-dev debhelper dh-autoreconf dh-strip-nondeterminism gettext intltool-debian libarchive-cpio-perl libarchive-zip-perl libcroco3 libfile-stripnondeterminism-perl libltdl-dev libltdl7
  libmail-sendmail-perl libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libsys-hostname-long-perl libtimedate-perl libtool m4 php7.2-dev pkg-php-tools po-debconf shtool
0 upgraded, 29 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,729 kB of archives.
After this operation, 34.5 MB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 m4 amd64 1.4.18-1 [197 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 autoconf all 2.69-11 [322 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 autotools-dev all 20180224.1 [39.6 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 automake all 1:1.15.1-3ubuntu2 [509 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 autopoint all 0.19.8.1-6ubuntu0.3 [426 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libtool all 2.4.6-2 [194 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 dh-autoreconf all 17 [15.8 kB]
Get:8 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libarchive-zip-perl all 1.60-1ubuntu0.1 [84.6 kB]
Get:9 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libfile-stripnondeterminism-perl all 0.040-1.1~build1 [13.8 kB]
Get:10 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB]
Get:11 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 dh-strip-nondeterminism all 0.040-1.1~build1 [5,208 B]
Get:12 http://jp.archive.ubuntu.com/ubuntu bionic/main amd64 libcroco3 amd64 0.6.12-2 [81.3 kB]
Get:13 http://jp.archive.ubuntu.com/ubuntu bionic-updates/main amd64 gettext amd64 0.19.8.1-6ubuntu0.3 [1,293 kB]

(snip)

libtool: install: cp ./.libs/redis.so /tmp/pear/temp/pear-build-rootFFNKSx/redis-5.1.1/modules/redis.so
libtool: install: cp ./.libs/redis.lai /tmp/pear/temp/pear-build-rootFFNKSx/redis-5.1.1/modules/redis.la
libtool: finish: PATH="/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /tmp/pear/temp/pear-build-rootFFNKSx/redis-5.1.1/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/pear/temp/pear-build-rootFFNKSx/redis-5.1.1/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1" install
Installing shared extensions:     /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1/usr/lib/php/20170718/
running: find "/tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1" | xargs ls -dils
427675    4 drwxr-xr-x 3 root root    4096 Jan  7 22:14 /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1
427709    4 drwxr-xr-x 3 root root    4096 Jan  7 22:14 /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1/usr
427710    4 drwxr-xr-x 3 root root    4096 Jan  7 22:14 /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1/usr/lib
427711    4 drwxr-xr-x 3 root root    4096 Jan  7 22:14 /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1/usr/lib/php
427712    4 drwxr-xr-x 2 root root    4096 Jan  7 22:14 /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1/usr/lib/php/20170718
427708 2500 -rwxr-xr-x 1 root root 2557104 Jan  7 22:14 /tmp/pear/temp/pear-build-rootFFNKSx/install-redis-5.1.1/usr/lib/php/20170718/redis.so

Build process completed successfully
Installing '/usr/lib/php/20170718/redis.so'
install ok: channel://pecl.php.net/redis-5.1.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=redis.so" to php.ini

PHP module installation OK!
dpkg-query: no packages found matching redis-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libjemalloc1 redis-tools
Suggested packages:
  ruby-redis
The following NEW packages will be installed:
  libjemalloc1 redis-server redis-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 634 kB of archives.
After this operation, 3,012 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 libjemalloc1 amd64 3.6.0-11 [82.4 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 redis-tools amd64 5:4.0.9-1ubuntu0.2 [516 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 redis-server amd64 5:4.0.9-1ubuntu0.2 [35.4 kB]
Fetched 634 kB in 1s (814 kB/s)
Selecting previously unselected package libjemalloc1.
(Reading database ... 115114 files and directories currently installed.)
Preparing to unpack .../libjemalloc1_3.6.0-11_amd64.deb ...
Unpacking libjemalloc1 (3.6.0-11) ...
Selecting previously unselected package redis-tools.
Preparing to unpack .../redis-tools_5%3a4.0.9-1ubuntu0.2_amd64.deb ...
Unpacking redis-tools (5:4.0.9-1ubuntu0.2) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../redis-server_5%3a4.0.9-1ubuntu0.2_amd64.deb ...
Unpacking redis-server (5:4.0.9-1ubuntu0.2) ...
Setting up libjemalloc1 (3.6.0-11) ...
Setting up redis-tools (5:4.0.9-1ubuntu0.2) ...
Setting up redis-server (5:4.0.9-1ubuntu0.2) ...
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redis-server.service → /lib/systemd/system/redis-server.service.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...

(snip)
ncadmin@nextcloud:~$ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs          tmpfs     395M  736K  394M   1% /run
/dev/vda1      ext4      7.9G  3.3G  4.2G  44% /
tmpfs          tmpfs     2.0G  8.0K  2.0G   1% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs          tmpfs     395M     0  395M   0% /run/user/1001
ncdata         zfs        78G   13M   78G   1% /mnt/ncdata
  • Software selection

Keep it defaults

  ┌───────────────────┤ Install apps or software ├────────────────────┐
  │ Automatically configure and install selected apps or software     │
  │ Deselect by pressing the spacebar                                 │
  │                                                                   │
  │    [*] Calendar                                                   │
  │    [*] Contacts                                                   │
  │    [*] IssueTemplate                                              │
  │    [*] PDFViewer                                                  │
  │    [*] Extract                                                    │
  │    [*] Text                                                       │
  │    [*] Mail                                                       │
  │    [*] Webmin                                                     │
  │                                                                   │
  │                                                                   │
  │                 <Ok>                     <Cancel>                 │
  │                                                                   │
  └───────────────────────────────────────────────────────────────────┘

(snip)

configuration option "php_ini" is not set to php.ini location
You should add "extension=apcu.so" to php.ini
APCu PHP module installation OK!
Optimizing Nextcloud...
Following columns will be updated:

* mounts.storage_id
* mounts.root_id
* mounts.mount_id

This can take up to hours, depending on the number of files in your instance!
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Done.
dpkg-query: no packages found matching figlet
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  figlet
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 133 kB of archives.
After this operation, 752 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu bionic/universe amd64 figlet amd64 2.2.5-3 [133 kB]
Fetched 133 kB in 0s (311 kB/s)
Selecting previously unselected package figlet.
(Reading database ... 115155 files and directories currently installed.)
Preparing to unpack .../figlet_2.2.5-3_amd64.deb ...
Unpacking figlet (2.2.5-3) ...
Setting up figlet (2.2.5-3) ...
update-alternatives: using /usr/bin/figlet-figlet to provide /usr/bin/figlet (figlet) in auto mode
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
/etc/apache2/sites-available/nextcloud_http_domain_self_signed.conf was successfully created.
/etc/apache2/sites-available/nextcloud_ssl_domain_self_signed.conf was successfully created.
Enabling site nextcloud_ssl_domain_self_signed.
To activate the new configuration, you need to run:
  systemctl reload apache2
Enabling site nextcloud_http_domain_self_signed.
To activate the new configuration, you need to run:
  systemctl reload apache2
Site default-ssl already disabled
Installing calendar...
Installing contacts...
Installing issuetemplate...
It seems like files_pdfviewer is installed already, trying to enable it...
files_pdfviewer enabled
Installing extract...

(snip)

Selecting previously unselected package linux-image-extra-virtual.
Preparing to unpack .../06-linux-image-extra-virtual_4.15.0.74.76_amd64.deb ...
Unpacking linux-image-extra-virtual (4.15.0.74.76) ...
Selecting previously unselected package linux-image-virtual.
Preparing to unpack .../07-linux-image-virtual_4.15.0.74.76_amd64.deb ...
Unpacking linux-image-virtual (4.15.0.74.76) ...
Selecting previously unselected package linux-tools-common.
Preparing to unpack .../08-linux-tools-common_4.15.0-74.84_all.deb ...
Unpacking linux-tools-common (4.15.0-74.84) ...
Selecting previously unselected package linux-tools-4.15.0-74.
Preparing to unpack .../09-linux-tools-4.15.0-74_4.15.0-74.84_amd64.deb ...
Unpacking linux-tools-4.15.0-74 (4.15.0-74.84) ...
Selecting previously unselected package linux-tools-4.15.0-74-generic.
Preparing to unpack .../10-linux-tools-4.15.0-74-generic_4.15.0-74.84_amd64.deb ...
Unpacking linux-tools-4.15.0-74-generic (4.15.0-74.84) ...
Selecting previously unselected package linux-tools-virtual.
Preparing to unpack .../11-linux-tools-virtual_4.15.0.74.76_amd64.deb ...
Unpacking linux-tools-virtual (4.15.0.74.76) ...
Selecting previously unselected package linux-virtual.
Preparing to unpack .../12-linux-virtual_4.15.0.74.76_amd64.deb ...
Unpacking linux-virtual (4.15.0.74.76) ...
Setting up linux-cloud-tools-common (4.15.0-74.84) ...
Created symlink /etc/systemd/system/multi-user.target.wants/hv-fcopy-daemon.service → /lib/systemd/system/hv-fcopy-daemon.service.
Created symlink /etc/systemd/system/multi-user.target.wants/hv-kvp-daemon.service → /lib/systemd/system/hv-kvp-daemon.service.
Created symlink /etc/systemd/system/multi-user.target.wants/hv-vss-daemon.service → /lib/systemd/system/hv-vss-daemon.service.
A dependency job for hv-kvp-daemon.service failed. See 'journalctl -xe' for details.
Setting up libdw1:amd64 (0.170-0.4ubuntu0.1) ...
Setting up linux-image-extra-virtual (4.15.0.74.76) ...
Setting up linux-image-virtual (4.15.0.74.76) ...
Setting up linux-headers-virtual (4.15.0.74.76) ...
Setting up linux-tools-common (4.15.0-74.84) ...
Setting up linux-tools-4.15.0-74 (4.15.0-74.84) ...
Setting up linux-virtual (4.15.0.74.76) ...
Setting up linux-cloud-tools-4.15.0-74 (4.15.0-74.84) ...
Setting up linux-cloud-tools-4.15.0-74-generic (4.15.0-74.84) ...
Setting up linux-tools-4.15.0-74-generic (4.15.0-74.84) ...
Setting up linux-cloud-tools-virtual (4.15.0.74.76) ...
Setting up linux-tools-virtual (4.15.0.74.76) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
[-] Setting secure permissions...
Creating possible missing Directories
chmod Files and Directories
[|] chown Directories
[/] chmod/chown .htaccess
[-] Installation done, system will now reboot...

system rebooted…

ssh again.

suddenly started first process…

+-----------------------------------------------------------------------+
|      Welcome to the first setup of your own Nextcloud Server! :)      |
|                                                                       |
| To run the startup script type the sudoer password, then hit [ENTER]. |
| The default sudoer password is: nextcloud                             |
|                                                                       |
| You can find the complete install instructions here:                  |
| Nextcloud VM              = https://bit.ly/2S8eGfS                    |
| Nextcloud Home/SME Server = https://bit.ly/2k2TNaM                    |
|                                                                       |
| To be 100% sure that all the keystrokes work correctly (like @),      |
| please use an SSH terminal like Putty. You can download it here:      |
| https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html        |
| Connect like this: ncadmin@local.IP.of.this.server                    |
|                                                                       |
| You can schedule the Nextcloud update process using a cron job.       |
| This is done using a script built into this server that automatically |
| updates Nextcloud, sets secure permissions, and logs the successful   |
| update to /var/log/nextcloud/update_run.log                           |
| Just choose to configure it when asked to do so later in this script. |
|                                                                       |
|  ###################### T&M Hansson IT - 2020 ######################  |
+-----------------------------------------------------------------------+
Fetching all the variables from lib.sh...
Testing if network is OK...
Checking connection...
Online!
Testing if network is OK...
Checking connection...
Online!
Setting locales...

Getting scripts from GitHub to be able to run the first setup...

  ┌────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├─────────────────┐
  │                                                                         │
  │ This script will configure your Nextcloud and activate SSL.             │
  │ It will also do the following:                                          │
  │                                                                         │
  │ - Generate new SSH keys for the server                                  │
  │ - Generate new PostgreSQL password                                      │
  │ - Install selected apps and automatically configure them                │
  │ - Detect and set hostname                                               │
  │ - Detect and set trusted domains                                        │
  │ - Detect the best Ubuntu mirrors depending on your location             │
  │ - Upgrade your system and Nextcloud to latest version                   │
  │ - Set secure permissions to Nextcloud                                   │
  │ - Set new passwords to Linux and Nextcloud                              │
  │ - Change timezone                                                       │
  │ - Set correct Rewriterules for Nextcloud                                │
  │ - Copy content from .htaccess to .user.ini (because we use php-fpm)     │
  │ - Add additional options if you choose them                             │
  │ - And more...                                                           │
  │                                                                         │
  │                                 <Ok>                                    │
  │                                                                         │
  └─────────────────────────────────────────────────────────────────────────┘

  ┌─────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├─────────────────────────────┐
  │                                                                                                  │
  │ Please note:                                                                                     │
  │                                                                                                  │
  │ [#] The script will take about 10 minutes to finish, depending on your internet connection.      │
  │                                                                                                  │
  │ [#] Please read the on-screen instructions carefully, they will guide you through the setup.     │
  │                                                                                                  │
  │ [#] When complete it will delete all the *.sh, *.html, *.tar, *.zip inside:                      │
  │     /root                                                                                        │
  │     /home/ncadmin                                                                                │
  │                                                                                                  │
  │ [#] Please consider donating if you like the product:                                            │
  │     https://shop.hanssonit.se/product-category/donate/                                           │
  │                                                                                                  │
  │ [#] You can also ask for help here:                                                              │
  │     https://help.nextcloud.com/c/support/appliances-docker-snappy-vm                             │
  │     https://shop.hanssonit.se/product/premium-support-per-30-minutes/                            │
  │                                                                                                  │
  │                                              <Ok>                                                │
  │                                                                                                  │
  └──────────────────────────────────────────────────────────────────────────────────────────────────┘

Current timezone is Asia/Tokyo
Do you want to change the timezone? ([y]es or [N]o): N
┌───────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├────────────────────────────────────────┐
│                                                                                                                       │
│ To make downloads as fast as possible when updating you should have mirrors that are as close to you as possible.     │
│ This VM comes with mirrors based on servers in that where used when the VM was released and packaged.                 │
│                                                                                                                       │
│ If you are located outside of Europe, we recomend you to change the mirrors so that downloads are faster.             │
│                                                                                                                       │
│                                                        <Ok>                                                           │
│                                                                                                                       │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Default selection is all empty. I've choose Security, Automatic updates. I've not checkd Static IP because this server already configured Static IP by Netplan.

 ┌────────────────────────────────┤ Extra configurations ├────────────────────────────────┐
 │ Choose what you want to configure                                                      │
 │ Select by pressing the spacebar                                                        │
 │                                                                                        │
 │    [*] Security           (Add extra security based on this http://goo.gl/gEJHi7)      │
 │    [ ] Static IP          (Set static IP in Ubuntu with netplan.io)                    │
 │    [ ] Automatic updates  (Automatically update your server every week on Sundays)     │
 │    [ ] CookieLifetime     (Configure forced logout timeout for users using the web GUI)│
 │                                                                                        │
 │                                                                                        │
 │                        <Ok>                            <Cancel>                        │
 │                                                                                        │
 └────────────────────────────────────────────────────────────────────────────────────────┘

 ┌────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├─────────────────┐
 │                                                                         │
 │ The following script will install a trusted                             │
 │ SSL certificate through Let's Encrypt.                                  │
 │                                                                         │
 │ It's recommended to use SSL together with Nextcloud.                    │
 │ Please open port 80 and 443 to this servers IP before you continue.     │
 │                                                                         │
 │ More information can be found here:                                     │
 │ https://www.techandme.se/open-port-80-443/                              │
 │                                                                         │
 │                                 <Ok>                                    │
 │                                                                         │
 └─────────────────────────────────────────────────────────────────────────┘

Open port 80/tcp, 443/tcp. by another terminal another user.

ufw

sudo ufw allow http
sudo ufw allow https
sudo ufw status
wnoguchi@nextcloud:~$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       10.0.4.0/24
22/tcp                     ALLOW       10.0.8.197

wnoguchi@nextcloud:~$ sudo ufw allow http
Rule added
Rule added (v6)
wnoguchi@nextcloud:~$ sudo ufw allow https
Rule added
Rule added (v6)
wnoguchi@nextcloud:~$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       10.0.4.0/24
22/tcp                     ALLOW       10.0.8.197
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
Do you want to install SSL? ([y]es or [N]o): y
 ┌────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├─────────────┐
 │                                                                 │
 │ Important! Please read this:                                    │
 │                                                                 │
 │ This script will install SSL from Let's Encrypt.                │
 │ It's free of charge, and very easy to maintain.                 │
 │                                                                 │
 │ Before we begin the installation you need to have               │
 │ a domain that the SSL certs will be valid for.                  │
 │ If you don't have a domain yet, get one before                  │
 │ you run this script!                                            │
 │                                                                 │
 │ You also have to open port 80+443 against this VMs              │
 │ IP address: 203.141.153.172 - do this in your router/FW.        │
 │ Here is a guide: https://goo.gl/Uyuf65                          │
 │                                                                 │
 │ You can find the script here: /var/scripts/activate-ssl.sh      │
 │ and you can run it after you got a domain.                      │
 │                                                                 │
 │ Please don't run this script if you don't have                  │
 │ a domain yet. You can get one for a fair price here:            │
 │ https://store.binero.se/?lang=en-US                             │
 │                                                                 │
 │                             <Ok>                                │
 │                                                                 │
 └─────────────────────────────────────────────────────────────────┘
 

Are you sure you want to continue? ([y]es or [N]o): y
Have you forwarded port 80+443 in your router? ([y]es or [N]o): y
Do you have a domain that you will use? ([y]es or [N]o): y

+---------------------------------------------------------------+
|    Please enter the domain name you will use for Nextcloud:   |
|    Like this: example.com, or nextcloud.example.com           |
+---------------------------------------------------------------+

nextcloud.pg1x.com

Is this correct? nextcloud.pg1x.com ([y]es or [N]o): y
 ┌────────────────────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├────────────────────────────────────────────────────┐
 │                                                                                                                                                │
 │ DNS lookup failed with dig. The external IP (203.141.153.172) address of this server is not the same as the A-record (nextcloud1.pg1x.com.     │
 │ 203.141.153.172).                                                                                                                              │
 │ Please check your DNS settings! Maybe the domain isn't propagated?                                                                             │
 │ Please check https://www.whatsmydns.net/#A/nextcloud.pg1x.com if the IP seems correct.                                                         │
 │                                                                                                                                                │
 │                                                                     <Ok>                                                                       │
 │                                                                                                                                                │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

I'm exhausted…

 ┌─────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├──────────────────────────┐
 │                                                                                           │
 │ New settings works! SSL is now activated and OK!                                          │
 │                                                                                           │
 │ This cert will expire in 90 days if you don't renew it.                                   │
 │ There are several ways of renewing this cert and here are some tips and tricks:           │
 │ https://goo.gl/c1JHR0                                                                     │
 │                                                                                           │
 │ To do your job a little bit easier we have added a autorenew script as a cronjob.         │
 │ If you need to edit the crontab please type: crontab -u root -e                           │
 │ If you need to edit the script itself, please check: /var/scripts/letsencryptrenew.sh     │
 │                                                                                           │
 │ Feel free to contribute to this project: https://goo.gl/3fQD65                            │
 │                                                                                           │
 │                                          <Ok>                                             │
 │                                                                                           │
 └───────────────────────────────────────────────────────────────────────────────────────────┘
 ┌───────────────┤ Which apps do you want to install? ├───────────────┐
 │ Automatically configure and install selected apps                  │
 │ Select by pressing the spacebar                                    │
 │                                                                    │
 │    [*] Fail2ban          (Extra Bruteforce protection)             │
 │    [ ] Adminer           (PostgreSQL GUI)                          │
 │    [*] Netdata           (Real-time server monitoring)             │
 │    [*] Collabora         (Online editing [2GB RAM])                │
 │    [ ] OnlyOffice        (Online editing [2GB RAM])                │
 │    [*] Bitwarden         (External password manager)               │
 │    [*] FullTextSearch    (Elasticsearch for Nextcloud [2GB RAM])   │
 │    [*] PreviewGenerator  (Pre-generate previews)                   │
 │    [ ] LDAP              (Windows Active directory)                │
 │    [*] Talk              (Nextcloud Video calls and chat)          │
 │                                                                    │
 │                                                                    │
 │                 <Ok>                     <Cancel>                  │
 │                                                                    │
 └────────────────────────────────────────────────────────────────────┘
  ┌────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├─────────────────────────┐
  │                                                                                         │
  │ Fail2ban is now sucessfully installed.                                                  │
  │                                                                                         │
  │ Please use 'fail2ban-client set nextcloud unbanip <Banned IP>' to unban certain IPs     │
  │ You can also use 'iptables -L -n' to check which IPs that are banned                    │
  │                                                                                         │
  │                                         <Ok>                                            │
  │                                                                                         │
  └─────────────────────────────────────────────────────────────────────────────────────────┘
 --- Check KSM (kernel memory deduper) ---

Memory de-duplication instructions

You have kernel memory de-duper (called Kernel Same-page Merging,
or KSM) available, but it is not currently enabled.

To enable it run:

    echo 1 >/sys/kernel/mm/ksm/run
    echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs

If you enable it, you will save 40-60% of netdata memory.

 --- Check version.txt ---
 --- Check apps.plugin ---
 --- Copy uninstaller ---
 --- Basic netdata instructions ---

netdata by default listens on all IPs on port 19999,
so you can access it with:

  http://this.machine.ip:19999/

To stop netdata run:

  systemctl stop netdata

To start netdata run:

  systemctl start netdata

Uninstall script copied to: /usr/libexec/netdata/netdata-uninstaller.sh

 --- Installing (but not enabling) the netdata updater tool ---
Update script is located at /usr/libexec/netdata/netdata-updater.sh

 --- Check if we must enable/disable the netdata updater tool ---
You chose *NOT* to enable auto-update, removing any links to the updater from cron (it may have happened if you are reinstalling)

Did not find any cron entries to remove

 --- Wrap up environment set up ---
Preparing .environment file
[/tmp/netdata-kickstart-9stahP/netdata-v1.19.0]# chmod 0644 /etc/netdata/.environment
 OK

Setting netdata.tarball.checksum to 'new_installation'

 --- We are done! ---

  ^
  |.-.   .-.   .-.   .-.   .-.   .  netdata                          .-.   .-
  |   '-'   '-'   '-'   '-'   '-'   is installed and running now!  -'   '-'
  +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->

  enjoy real-time performance and health monitoring...

 OK

Please check information above and press any key to continue...
$ dig office.pg1x.com

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> office.pg1x.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47450
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;office.pg1x.com.               IN      A

;; ANSWER SECTION:
office.pg1x.com.        300     IN      CNAME   nextcloud1.pg1x.com.
nextcloud1.pg1x.com.    299     IN      A       203.141.153.172

;; Query time: 16 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Jan 12 10:35:25 JST 2020
;; MSG SIZE  rcvd: 85
 ┌──────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├───────────────────────────┐
 │                                                                                             │
 │ Netdata is now installed and can be accessed from this address:                             │
 │                                                                                             │
 │ http://203.141.153.172:19999                                                                │
 │                                                                                             │
 │ If you want to reach it from the internet you need to open port 19999 in your firewall.     │
 │ If you don't know how to open ports, please follow this guide:                              │
 │ https://www.techandme.se/open-port-80-443/                                                  │
 │                                                                                             │
 │ After you have opened the correct port, then you can visit Netdata from your domain:        │
 │                                                                                             │
 │ http://nextcloud.pg1x.com:19999 and or http://yourdomanin.com:19999                         │
 │                                                                                             │
 │ You can find more configuration options in their WIKI:                                      │
 │ https://docs.netdata.cloud/daemon/config#configuration-guide                                │
 │                                                                                             │
 │                                           <Ok>                                              │
 │                                                                                             │
 └─────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌────────────────────────────────────────────────────────────────┤ T&M Hansson IT Collabora ├────────────────────────────────────────────────────────────────┐
 │ Collabora subdomain eg: office.yourdomain.com                                                                                                              │
 │                                                                                                                                                            │
 │ NOTE: This domain must be different than your Nextcloud domain. They can however be hosted on the same server, but would require seperate DNS entries.     │
 │                                                                                                                                                            │
 │ office.pg1x.com___________________________________________________________________________________________________________________________________________ │
 │                                                                                                                                                            │
 │                                               <Ok>                                                   <Cancel>                                              │
 │                                                                                                                                                            │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌────────────────────────┤ T&M Hansson IT Collabora ├────────────────────────┐
 │ Nextcloud domain, make sure it looks like this: cloud\.yourdomain\.com     │
 │                                                                            │
 │ nextcloud\.pg1x\.com______________________________________________________ │
 │                                                                            │
 │                    <Ok>                        <Cancel>                    │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
 ┌────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├────────────────────────────┐
 │                                                                                                │
 │ Before you start, please make sure that port 80+443 is directly forwarded to this machine!     │
 │                                                                                                │
 │                                             <Ok>                                               │
 │                                                                                                │
 └────────────────────────────────────────────────────────────────────────────────────────────────┘
Installing Collabora...
RAM for Collabora OK! (4 GB)
CPU for Collabora OK! (2)
[-] Checking if Nextcloud is installed...
Checking if office.pg1x.com exists and is reachable...
Doing a DNS lookup for office.pg1x.com...
DNS seems correct when checking with nslookup!
Do you feel brave and want to continue? ([y]es or [N]o): y
Checking if port 80 is open with https://ports.yougetsignal.com...
Port 80 is open on 203.141.153.172!
Checking if port 443 is open with https://ports.yougetsignal.com...
Port 443 is open on 203.141.153.172!
Installing Docker CE...
[-] # Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
 ┌────────────────────────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├────────────────────────────────────────────────────────┐
 │                                                                                                                                                        │
 │ Bitwarden is a password manager that is seperate from Nextcloud, though we provide this service because it's self hosted and secure.                   │
 │                                                                                                                                                        │
 │ If you just want to run Bitwarden locally (not connecting your smartphone) then you can use 'localhost' as domain.                                     │
 │ If you on the other hand want to run this on a domain, then please create a DNS record and point it to this server.                                    │
 │ In the process of setting up Bitwarden you will be asked to generate an SSL cert with Let's Enrypt so no need to get your own prior to this setup.     │
 │                                                                                                                                                        │
 │ The script is based on this documentation: https://help.bitwarden.com/article/install-on-premise/                                                      │
 │ It's a good idea to read that before you start this script.                                                                                            │
 │                                                                                                                                                        │
 │ Please also report any issues regarding this script setup to https://github.com/nextcloud/vm/issues                                                    │
 │                                                                                                                                                        │
 │                                                                         <Ok>                                                                           │
 │                                                                                                                                                        │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
root@hotaru:/var/lib/libvirt/images# dig bitwarden.pg1x.com

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> bitwarden.pg1x.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21058
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;bitwarden.pg1x.com.            IN      A

;; ANSWER SECTION:
bitwarden.pg1x.com.     300     IN      CNAME   nextcloud1.pg1x.com.
nextcloud1.pg1x.com.    276     IN      A       203.141.153.172

;; Query time: 14 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Jan 12 10:45:25 JST 2020
;; MSG SIZE  rcvd: 88
 ┌──────────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├──────────────────────────────────────────┐
 │                                                                                                                            │
 │ The necessary preparations to run expose Bitwarden to the internet are:                                                    │
 │ 1. The HTTP proxy and HTTPS ports for Bitwarden are 8080 and 8443, please open those ports before running this script.     │
 │ 2. Please create a DNS record and point that to this server.                                                               │
 │ 3. Raise the amount of RAM to this server to at least 3 GB.                                                                │
 │                                                                                                                            │
 │                                                           <Ok>                                                             │
 │                                                                                                                            │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
sudo ufw allow 8080/tcp
sudo ufw allow 8443/tcp
sudo ufw status
Installing Bitwarden password manager...
Have you made the necessary preparations? ([y]es or [N]o): y
Setting up libsecret-common (0.18.6-1) ...
Setting up python-functools32 (3.2.3.2-3) ...
Setting up python-yaml (3.12-1build2) ...
Setting up python-asn1crypto (0.24.0-1) ...
Setting up python-certifi (2018.1.18-2) ...
Setting up cgroupfs-mount (1.4) ...
Setting up python-pkg-resources (39.0.1-2) ...
Setting up python-backports.ssl-match-hostname (3.5.0.1-1) ...
Setting up python-cffi-backend (1.11.5-1) ...
Setting up python-six (1.11.0-2) ...
Setting up python-dockerpty (0.4.1-1) ...
Setting up python-pbr (3.1.1-3ubuntu3) ...
update-alternatives: using /usr/bin/python2-pbr to provide /usr/bin/pbr (pbr) in auto mode
Setting up python-enum34 (1.1.6-2) ...
Setting up python-funcsigs (1.0.2-4) ...
Setting up python-docopt (0.6.2-1build1) ...
Setting up python-ipaddress (1.0.17-1) ...
Setting up libsecret-1-0:amd64 (0.18.6-1) ...
Setting up pigz (2.4-1) ...
Setting up python-cached-property (1.3.1-1) ...
Setting up python-urllib3 (1.22-1ubuntu0.18.04.1) ...
Setting up python-chardet (3.0.4-1) ...
Setting up python-mock (2.0.0-3) ...
Setting up python-websocket (0.44.0-0ubuntu2) ...
update-alternatives: using /usr/bin/python2-wsdump to provide /usr/bin/wsdump (wsdump) in auto mode
Setting up golang-docker-credential-helpers (0.5.0-2) ...
Setting up python-cryptography (2.1.4-1ubuntu1.3) ...
Setting up python-requests (2.18.4-2ubuntu0.1) ...
Setting up python-jsonschema (2.6.0-2) ...
update-alternatives: using /usr/bin/python2-jsonschema to provide /usr/bin/jsonschema (jsonschema) in auto mode
Setting up python-dockerpycreds (0.2.1-1) ...
Setting up python-openssl (17.5.0-1ubuntu1) ...
Setting up python-docker (2.5.1-1) ...
Setting up docker-compose (1.17.1-2) ...
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2020, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

Docker version 19.03.5, build 633a0ea838
docker-compose version 1.17.1, build unknown

(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): bitwarden.pg1x.com

(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): y

(!) Enter your email address (Let's Encrypt will send you certificate expiration reminders): wnoguchi@pg1x.com


Using default tag: latest
latest: Pulling from certbot/certbot
89d9c30c1d48: Pull complete
910c49c00810: Pull complete
7efe415eb85a: Extracting [=========================>                         ]  14.75MB/28.87MB
7d8d53519b81: Download complete
519124ac136c: Download complete
0d9653a767bc: Download complete
64273a6bacfe: Download complete
e41a6a3081ba: Download complete
96dd805191b1: Waiting
17949c53e44b: Waiting
1f30b0934544: Waiting

(snip)


1.32.0: Pulling from bitwarden/setup
9fc222b64b0a: Pull complete
f033c4f65cdb: Pull complete
7405f9e6a7ae: Pull complete
f4b7599512c4: Pull complete
97821114cca7: Pull complete
d4af2992c3be: Pull complete
1724ff73d932: Pull complete
53423e888769: Pull complete
cf9e1e658adf: Pull complete
Digest: sha256:e88f1611ff88c77a6255c49189ac3c965aaa3576fa6980ba54f2be10a96907b5
Status: Downloaded newer image for bitwarden/setup:1.32.0
docker.io/bitwarden/setup:1.32.0

(!) Enter your installation id (get at https://bitwarden.com/host):

https://bitwarden.com/host/

Installation Id: f5b1e1ec-1d5f-48d1-be35-ab40001f6e62
Installation Key: qK65hKrgxFC8qvpzhc9R
(!) Enter your installation id (get at https://bitwarden.com/host): f5b1e1ec-1d5f-48d1-be35-ab40001f6e62

(!) Enter your installation key: qK65hKrgxFC8qvpzhc9R

Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
 ┌──────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├───────────────────────────────┐
 │                                                                                                     │
 │ This script will install the Preview Generator.                                                     │
 │                                                                                                     │
 │ It can speedup the loading of previews in Nextcloud a lot.                                          │
 │                                                                                                     │
 │ Please note: If you continue, all your current Preview Generator settings will be lost, if any.     │
 │                                                                                                     │
 │                                               <Ok>                                                  │
 │                                                                                                     │
 └─────────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├──────────────────────────────────────────────────────┐
 │                                                                                                                                                    │
 │ In the next step you can choose to install a package called imagick to speed up the generation of previews and add support for more filetypes.     │
 │                                                                                                                                                    │
 │ The currently supported filetypes are:                                                                                                             │
 │ * PNG                                                                                                                                              │
 │ * JPEG                                                                                                                                             │
 │ * GIF                                                                                                                                              │
 │ * BMP                                                                                                                                              │
 │ * MarkDown                                                                                                                                         │
 │ * MP3                                                                                                                                              │
 │ * TXT                                                                                                                                              │
 │ * Movie                                                                                                                                            │
 │ * Photoshop (needs imagick)                                                                                                                        │
 │ * SVG (needs imagick)                                                                                                                              │
 │ * TIFF (needs imagick)                                                                                                                             │
 │                                                                                                                                                    │
 │                                                                       <Ok>                                                                         │
 │                                                                                                                                                    │
 └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
  ┌──────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├──────────────────────────┐
  │                                                                                            │
  │ IMPORTANT NOTE!!                                                                           │
  │                                                                                            │
  │ Imagick will put your server at risk as it's is known to have several flaws.               │
  │ You can check this issue to understand why: https://github.com/nextcloud/vm/issues/743     │
  │                                                                                            │
  │ Please note: If you choose not to install imagick, it will get removed now.                │
  │                                                                                            │
  │                                           <Ok>                                             │
  │                                                                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────┘
System config value enabledPreviewProviders deleted
Resetting the cronjob for the preview-generation
Do you want to install imagick? ([y]es or [N]o): N
 ┌────────────────────────────────┤ Choose file formats ├────────────────────────────────┐
 │ Now you can choose for which file formats you would like to generate previews for     │
 │ Select or unselect by pressing the spacebar                                           │
 │                                                                                       │
 │    [*] PNG                                                                            │
 │    [*] JPEG                                                                           │
 │    [*] GIF                                                                            │
 │    [*] BMP                                                                            │
 │    [*] MarkDown                                                                       │
 │    [*] MP3                                                                            │
 │    [*] TXT                                                                            │
 │    [*] Movie                                                                          │
 │                                                                                       │
 │                                                                                       │
 │                        <Ok>                            <Cancel>                       │
 │                                                                                       │
 └───────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────────────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├───────────────────────────────────────────────┐
 │                                                                                                                                     │
 │ In the last step you can define a specific Nextcloud user for which will be the user that runs the preview-generation.              │
 │                                                                                                                                     │
 │ The default behaviour (just hit [ENTER]) is to run with the system user 'www-data' which will generate previews for all users.      │
 │                                                                                                                                     │
 │ If you on the other hand choose to use a specific user, previews will ONLY be generated for that specific user.                     │
 │                                                                                                                                     │
 │                                                               <Ok>                                                                  │
 │                                                                                                                                     │
 └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Do you want to choose a specific Nextcloud user to generate previews? ([y]es or [N]o): N
For better security, change the system user password for [wnoguchi]
Press any key to change password for system user...
The current admin user in Nextcloud GUI is [ncadmin]
We will now replace this user with your own.
Press any key to replace the current admin user for Nextcloud...
Please enter the username for your new user:
wnoguchi
 ┌─────────────────────┤ Nextcloud VM - T&M Hansson IT - 2020 ├──────────────────────┐
 │                                                                                   │
 │ Congratulations! You have successfully installed Nextcloud!                       │
 │                                                                                   │
 │ Login to Nextcloud in your browser:                                               │
 │ - IP: 203.141.153.172                                                             │
 │ - Hostname: nextcloud.pg1x.com                                                    │
 │                                                                                   │
 │ SUPPORT:                                                                          │
 │ Please ask for help in the forums, visit our shop to buy support,                 │
 │ or buy a yearly subscription from Nextcloud:                                      │
 │ - SUPPORT: https://shop.hanssonit.se/product/premium-support-per-30-minutes/      │
 │ - FORUM: https://help.nextcloud.com/                                              │
 │ - SUBSCRIPTION: https://nextcloud.com/pricing/ (Please refer to @enoch85)         │
 │                                                                                   │
 │ Please report any bugs here: https://github.com/nextcloud/vm/issues               │
 │                                                                                   │
 │ TIPS & TRICKS:                                                                    │
 │ 1. Publish your server online: https://goo.gl/iUGE2U                              │
 │                                                                                   │
 │ 2. To login to PostgreSQL just type: sudo -u postgres psql nextcloud_db           │
 │                                                                                   │
 │ 3. To update this VM just type: sudo bash /var/scripts/update.sh                  │
 │                                                                                   │
 │ 4. Change IP to something outside DHCP: sudo nano /etc/netplan/01-netcfg.yaml     │
 │                                                                                   │
 │ 5. For a better experience it's a good idea to setup an email account here:       │
 │    https://yourcloud.xyz/settings/admin                                           │
 │                                                                                   │
 │                                      <Ok>                                         │
 │                                                                                   │
 └───────────────────────────────────────────────────────────────────────────────────┘
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-74-generic
Found initrd image: /boot/initrd.img-4.15.0-74-generic
Found linux image: /boot/vmlinuz-4.15.0-72-generic
Found initrd image: /boot/initrd.img-4.15.0-72-generic
done
files_rightclick new version available: 0.15.1
files_rightclick updated
Latest version is: 17.0.2. Current version is: 17.0.2.
No need to upgrade, this script will exit...
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Del python-bson-ext 3.6.1+dfsg1-1 [20.4 kB]
Del lm-sensors 1:3.4.0-4 [85.5 kB]
Del python-egenix-mxtools 3.2.9-1 [75.3 kB]
Del python-egenix-mxdatetime 3.2.9-1 [68.3 kB]
Del libjudy-dev 1.0.5-5 [133 kB]
Del libuv1-dev 1.18.0-3 [82.0 kB]
Del libjudydebian1 1.0.5-5 [94.6 kB]
Del nodejs 8.10.0~dfsg-2ubuntu0.4 [4,796 kB]
Del zlib1g-dev 1:1.2.11.dfsg-0ubuntu2 [176 kB]
Del libuv1 1.18.0-3 [64.4 kB]
Del python-gridfs 3.6.1+dfsg1-1 [14.1 kB]
Del containerd.io 1.2.10-3 [20.0 MB]
Del pkg-config 0.29.1-0ubuntu2 [45.0 kB]
Del libmnl-dev 1.0.4-2 [11.1 kB]
Del python-mysqldb 1.3.10-1build1 [49.2 kB]
Del docker-ce 5:19.03.5~3-0~ubuntu-bionic [22.8 MB]
Del libc-ares2 1.14.0-1 [37.1 kB]
Del libhttp-parser2.7.1 2.7.1-2 [20.6 kB]
Del mysql-common 5.8+1.0.4 [7,308 B]
Del uuid-dev 2.31.1-0.4ubuntu3.4 [33.2 kB]
Del liblz4-dev 0.0~r131-2ubuntu3 [61.4 kB]
Del python-pymongo-ext 3.6.1+dfsg1-1 [10.8 kB]
Del libmysqlclient20 5.7.28-0ubuntu0.18.04.4 [688 kB]
Del python-pymongo 3.6.1+dfsg1-1 [128 kB]
Del python-bson 3.6.1+dfsg1-1 [31.8 kB]
Del docker-ce-cli 5:19.03.5~3-0~ubuntu-bionic [42.5 MB]
Del nodejs-doc 8.10.0~dfsg-2ubuntu0.4 [752 kB]
Del python-psycopg2 2.7.4-1 [155 kB]
Del autoconf-archive 20170928-2 [668 kB]
Installation done, system will now reboot...

done.

 _  _         _      _             _
| \| |_____ _| |_ __| |___ _  _ __| |
| .` / -_) \ /  _/ _| / _ \ || / _` |
|_|\_\___/_\_\\__\__|_\___/\_,_\__,_|

https://www.hanssonit.se/nextcloud-vm


Hostname: nextcloud
WAN IPv4: 203.141.153.172
WAN IPv6:
LAN IPv4: 203.141.153.172

ncadmin@nextcloud:~$

References

tech/server/nextcloud/install-nextcloud-17.0-on-ubuntu-server-18.04-lts/install-nextcloud-17.0-on-ubuntu-server-18.04-lts.txt · Last modified: 2020/01/12 11:28 by wnoguchi