40.17 Doh Digital Ocean Host


A Ubuntu server can be set up as a virtual machine on a cloud service like Digital Ocean. Ubuntu 16.04 was originally installed an run as a nextcloud server.

Upgrade Doh LTS 16.04 to 18.04


The php packages on doh required upgrading due to recent security issues (as advised by nextcloud). Upgraded from Ubuntu 16.04 to 18.04 (both LTS—long term supported). The server is remote so connection is via ssh which presents challenges if anything goes wrong. The server could always be rebuilt if failed but ensure it is backed up.

$ sudo do-release-upgrade

During the upgrade an update to the apache configuration file was requested and proceeded with (y):

Configuration file '/etc/apache2/apache2.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** apache2.conf (Y/I/N/O/D/Z) [default=N] ? d
--- /etc/apache2/apache2.conf   2017-03-11 13:34:54.863634000 +0000
+++ /etc/apache2/apache2.conf.dpkg-new  2019-09-16 12:58:48.000000000 +0000
@@ -71,7 +71,13 @@
-Mutex file:${APACHE_LOCK_DIR} default
+#Mutex file:${APACHE_LOCK_DIR} default
+# The directory where shm and other runtime files will be stored.
+DefaultRuntimeDir ${APACHE_RUN_DIR}
@@ -218,6 +224,4 @@
-ServerName nextcloud.doh.com

Also sshd and chose to go with the essentially new configuration file:

--- /etc/ssh/sshd_config root.root 0644 2017-03-11 13:21:34                                                               
+++ /tmp/fileh01MNm root.root 0644 2019-10-25 23:55:13                                                                    
< # Package generated configuration file
< # See the sshd_config(5) manpage for details
> # $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
< # What ports, IPs and protocols we listen for
< Port 22

Then reboot, and noted through browser connection to nextcloud php was no longer enabled for apache2 (the php file was being displayed rather than being run). It needed to be enabled:

$ sudo a2enmod php7.2
$ wajig restart apache2

Nextcloud itself was then upgraded from 15 to 16 through the browser based upgrade button.

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0