Fresh install of MIAB v68 Ubuntu 22.04 VPS fails to install Nextcloud Contacts

I’ve got a fresh VPS from Ultahost with Ubuntu 22.04, following along with the instructions in the setup guide I curl the install script from MIAB and run that with sudo.


Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Synchronizing state of fail2ban.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable fail2ban
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

FAILED: sudo -u www-data php8.0 /usr/local/lib/owncloud/console.php app:enable contacts
-----------------------------------------
Could not download app contacts
-----------------------------------------

ever time I run sudo mailinabox I get the same error as above
If I try and copy the failed command and run just that command, I get the same error Could not download app contacts.

I have tried wiping the VPS but get the same error on both ubuntu 22.04 and 24.04
Looking in /var/www does not show taht own cloud or next cloud has been installed.

Any help is greatly appreciated.

try running the script with
sudo su
as root as suggested here

Thank you for the response, I’ve attempted to run the command via root directly using sudo su mailinabox but unfortunately got the same error. To try and ensure that nothing was left behind I wiped the server and downloaded the install script via curl -s https://mailinabox.email/setup.sh -o setup.sh, I ran chmod +x to make the script executable and then ran it with ./setup.sh while logged into the root account. This seems to have added mroe to to the message.

Installing nsd (DNS server)...
Generating DNSSEC signing keys...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

Upgrading to Nextcloud version 26.0.12


FAILED: sudo -u www-data php8.0 /usr/local/lib/owncloud/console.php app:enable contacts
-----------------------------------------
Could not download app contacts
-----------------------------------------

After this failed I attempted to install the mailinabox via the Github instructions by cloning https://github.com/mail-in-a-box/mailinabox, manually setting the version with git checkout v68 and then running ./setup/start.sh

Unfortunately this failed with the same error message, afterwards I attempted to install an older v67, but with the same error message.

I’m not sure why installing it with root says it is Upgrading nextcloud. I have looked through the system and can find no indication that Nextcloud has been installed anywhere.

I’ve attempted to install mailinabox on a local VM (Ubuntu 22.04 LTS) and get the same error message

Installing nsd (DNS server)...
Generating DNSSEC signing keys...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

Upgrading to Nextcloud version 26.0.12


FAILED: sudo -u www-data php8.0 /usr/local/lib/owncloud/console.php app:enable contacts
-----------------------------------------
Could not download app contacts
-----------------------------------------

Is there somewhere I can find install logs for a more accurate error message?

Are you dong everything according to the guide?

Is the machine x64. I run an arm64 myself and it is possible. But maybe some dependencies are missing? Backups will not work out of the box for arm64. But this has nothing to do with contacts.

did you run:

sudo apt update
sudo apt upgrade

You can comment out nextcloud install in start.sh
in /home/YOURUSER/mailinabox/setup

Installating without Nextcloud - Help with Setup/Upgrade - Mail-in-a-Box Forum (mailinabox.email)

Find the right line to skip nextcloud and investigate further. source setup/nextcloud.sh

Run nextcloud.sh afterwards see what happens.
Try running it also with sudo su

I have no idea why this is happening it has been documented before here
and there is no response from anybody else.

Thank you for your response, I’ve gone ahead and double checked that I am fully up to date as well as running a 64bit system as shown in the screenshot below. I have followed all instructions in the mail-in-a-box setup guide, including setting up Glue records and NS1/NS2, as well as setting the hostname/hosts. The first instruction on the server curl -s https://mailinabox.email/setup.sh | sudo -E bash is the one that is failing.

I would be okay with disabling Nextcloud as I don’t have much need for a calendar/contacts list( I just need this to send emails). I will look into that and see what I can do.

I did attempt to run, both as a sudo user and well as root user sudo su, setup/nextcloud.sh on a previous install to see if I could get any better error message, but unfortunately it was exactly the same Could not download app contacts

From my limited understanding and reading through a few existing issues on the Github, this seems to be related to Nextclouds rapid release cycle and how they store versions on their site, but if I am reading correctly the issue should have been resolved in a recent pull request that has already been merged into the base code(v68). Most of the other references to similar issues have been resolved with a “Magically Works Now” response.

At this point I think I will have to open an issue on github and see if anyone else is having the issue.

I just tested a new instance from a data center in Toronto:
The install script did not report any errors:
I confirm I cannot reproduce the error:

Installing nsd (DNS server)...
Generating DNSSEC signing keys...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...

Upgrading to Nextcloud version 26.0.12

Nextcloud is already latest version
photos 2.2.0 disabled
dashboard 7.6.0 disabled
activity 2.18.0 disabled
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
Installing Munin (system monitoring)...
updated DNS: box.you.tld
web updated
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
 uname -i
x86_64

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.