Fresh Install on clean Machine failure

Howdy

I’ve set up an AWS Lightsail in Sydney AZ to build a new box to migrate my old MIAB BOX onto, however the build script is failing.

Have run sudo apt update and sudo apt upgrade and rebooted before running :slight_smile:

curl -s https://mailinabox.email/setup.sh | sudo -E bash

and i get:

Primary Hostname: box.redacted.com
Public IP Address: redacted
Public IPv6 Address: redacted
Private IP Address: redacted
Mail-in-a-Box Version: v76

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

ubuntu@ip-redacted:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
ubuntu@ip-redacted:~$ uname -i
x86_64

Also I have just discovered that duplicity isnt installed on the new machine which means the install script stopped well before finishing :frowning:

I am a little stumped. Any ideas anyone?

To further add to the story, after a sleep and some fresh eyes, I have attempted to in install v75 onto the fresh machine so…

git clone https://github.com/mail-in-a-box/mailinabox.git
git tag
git checkout v75 (HEAD is now at b162b96 Version 75 (April 20, 2026))
sudo setup/start.sh

and i get:

Primary Hostname: box.redacted.com
Public IP Address: redacted
Public IPv6 Address: redacted
Private IP Address: redacted
Mail-in-a-Box Version: v75

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

I am really in a bind now. Can anyone advise what I should try?

Are you using a provider supplied image, or Ubuntu 22.04.5 from Ubuntu’s website?

There seems to be a long history of providers’ images being modified and/or incomplete, and causing various hassles. Best to run from Ubuntu’s image and don’t trust your provider :frowning:

Hmm, well I have 3 other MIAB boxes running and have never had an issue in several years with AWS Lightsail images.

I have recovered my situation by commenting out Nextcloud from start.sh. Potentially this will stuff me up in the near future. I cannot run the update to v76 as the issue is still there. I will wait until the Developer picks up this issue and issues a resolve. I do notice that in the latest release on Git, Josh mentions he fixed the Alias.html file issue and this PHP/Nextcloud issue.

The duplicity PPA is added early in the setup process. But duplicity itself is installed until toward the end of the setup. If your install crashed out at Nextcloud, it wouldn’t have got to installing duplicity.

The scripts are all at https://github.com/mail-in-a-box/mailinabox/tree/main/setup. Might be time to get down and dirty.

I’ve also followed everyone’s advice here and am still having the same trouble with v76. I did a clean install of Ubuntu Server 22.04 with the image directly from Ubuntu, configured my network, hostname, and firewall. Then proceeded to run the MAIB install and it is still failing on Nextcloud

Mail-in-a-Box Version: v76

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
-----------------------------------------

The best luck I’ve had is commenting out Nextcloud startup in MAIB’s start.sh

Have you tried running this command manually from the CLI? What is the output? Why does it fail?

Yes, it was one of the first things I tried. I didn’t include that information because it puts out the error included at the bottom of my console snippet.

Seems like this might be a communication issue, then. Perhaps it can’t reach the owncloud servers for downloading. What about:

sudo -u www-data php8.0 /usr/local/lib/owncloud/console.php app:list

If that doesn’t work, look up the owncloud hostnames and start doing connectivity checks against them (ping, nmap, curl, dig, etc). That might lead you in the right direction.

Hello,

I’ve had the same issue and checked everything twice and it is from the installation itself.
What I have done is abandon v76 and install v75. This is how I’ve done it.

Install mail-in-a-box last working version v75

  • start -
    git clone link to the repo here
    cd mailinabox
    git checkout v75
    sudo setup/start.sh
  • end -

Good luck

2 Likes