Next cloud setup failing (GitHub)

I have had some errors today when re-running the setup to upgrade.

The hashes for next cloud have been sorted and are covered in a previous script but they now download correctly.

Next error is below:

FAILED: wget -O /tmp/user_external.tgz https://github.com/nextcloud-releases/user_external/releases/download/v1.0.0/user_external-v1.0.0.tar.gz

-----------------------------------------

--2026-10-24 17:26:34--  https://github.com/nextcloud-releases/user_external/releases/download/v1.0.0/user_external-v1.0.0.tar.gz

Resolving github.com (github.com)... 4.237.22.38

Connecting to github.com (github.com)|4.237.22.38|:443... connected.

HTTP request sent, awaiting response... 404 Not Found

2026-10-24 17:26:35 ERROR 404: Not Found.

The file is indeed missing when I checked.

As additional information - we are not using the next cloud for contacts/calendar so if there is a way to force upgrade to a later version then nothing of value is lost. That said I thought we were there as the box was built from scratch last week however I am guessing we received an older version when the backup was restored.

I am working on instructions to get you upgraded properly.

Just for my sanity, what version of miab did you upgrade from, as in, the vTAG on the previous box?

This is from the same commit, where the hash for 1.0.0 was removed.

Nextcloud: * The Nextcloud user_external 1.0.0 package for Nextcloud 21.0.7 isn’t available from Nextcloud’s releases page, but it’s not needed in an intermediate upgrade step (hopefully), so we can skip it.

It is incredibly odd that your database has not been updated, or that you even have the 1.0.0 portion of the code, which is not present in v78.

So, lets just remove that from the line as well, and rerun (remove everything after the hash for 3.0.4) (or just copy the line from below)

InstallNextcloud 21.0.7 f5c7079c5b56ce1e301c6a27c0d975d608bb01c9 4.0.7 8ab31d205408e4f12067d8a4daa3595d46b513e3 3.0.4 6fb1e998d307c53245faf1c37a96eb982bbee8ba

Save and rerun. I realize it is currently Sunday, 4:00 AM there. I’ll do my best to help you get this resolved quickly, while it is still your weekend.

It was the last available version for Ubuntu 18.n and had been patched up at the time. I think it was maybe 55?
Mailinabox wasn’t upgraded beyond that as I was offline in hospital and am only finally back on my feet

@david.blythe Thanks again for your persistence and patience.

The last suggestion to remove the v1.0.0 stuff did the trick. Again (I have no idea why it was orphaned at such an old version).

Install completes successfully and server seems otherwise happy.
If you have any thoughts on whether I should re-run the script to try and upgrade next cloud to 22.2.6 or later then let me know but we are out of the woods for now.

Let me know if I can get you a KOFI or something to say thanks.

The beauty of the script, is that is should have stepped through all the versions of Nextcloud, once that first upgrade completed.

if you run the command to look at your version:
cat /home/user-data/owncloud/config.php

you should see its on 27:

'version' => '27.1.11.3',

No KOFI needed. I was on the other end of this, once upon a time. Just glad to give back.

I agree with the giving back and its what I try to do but this isn’t my area of expertise…

Something remains odd as we get:

'version' => '21.0.7.0',

I have some family stuff so am out a big chunk of today but will follow up tonight.

My gut feeling is to re-run the Curl install script and see where we get.

(I also cleaned up all the redundant next cloud backups in userdata as it was starting to eat into free disk space.)

No worries.

And your gut is correct. Rerunning the curl install would be a great next step. Let me know the result when you can.

1 Like

So…not sure which project made the changes as I can’t be the only person affected but we are back to mis-matched checksums. (At least I know how to sort that now)

My plan is to sort each version until we get to latest so hopefully this resolves this for good.

Upgrading to Nextcloud version 22.2.6

sha1sum: WARNING: 1 computed checksum did NOT match

------------------------------------------------------------

Download of https://github.com/nextcloud-releases/contacts/releases/download/v4.1.0/contacts-v4.1.0.tar.gz did not match expected checksum.

Found:
38653b507bd7d953816bbc5e8bea7855867eb1cd  /tmp/contacts.tgz


Expected:
697f6b4a664e928d72414ea2731cb2c9d1dc3077  /tmp/contacts.tgz

Came here to ask about this, having the same issue.

So this one might be easier. We are going to download the proper nextcloud.sh file (straight from the github repo), and then move it to the correct location.

  1. Confirm you are in the right place, by running a list. You should see the mailinabox folder.
ls
  1. Grab the correct file from the github repo
curl -O https://raw.githubusercontent.com/mail-in-a-box/mailinabox/refs/heads/main/setup/nextcloud.sh

(if you run a ls again, you should see the downloaded file, right next to the mailinabox folder)

  1. Move the file to the correct location
mv -f ./nextcloud.sh ./mailinabox/setup/nextcloud.sh
  1. Confirm the file was the recently downloaded file
ls -l mailinabox/setup

(you’ll see the correct date and time, if you did it correctly)

  1. Run the setup again
cd mailinabox/
setup/start.sh

when looking at the freshly downloaded file, I see the expected hash for contacts 4.1.0

@david.blythe apologies - forum hadnt refreshed and didn’t see your notes.

The fix process (and I will document steps but you will need to make changes yourself).

** I redownloaded and executed the original curl setup:

Note that we are only downloading this once as we need to edit a script to fix the hashes so we will re-run this locally until we are done.

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

** The script will fail at some point and give an error about hashes. This will be our iteration point as we need to keep looping through the script and fixing the hashes as reported.

I am not posting my entire file as this may change in the future and its only a few steps to actually determine and fix.

The error will look similar to the following: (the versions, hashes and app will change as we iterate)

Upgrading to Nextcloud version 22.2.6

sha1sum: WARNING: 1 computed checksum did NOT match
------------------------------------------------------------
Download of https://github.com/nextcloud-releases/contacts/releases/download/v4.1.0/contacts-v4.1.0.tar.gz did not match expected checksum.

Found:
38653b507bd7d953816bbc5e8bea7855867eb1cd  /tmp/contacts.tgz


Expected:
697f6b4a664e928d72414ea2731cb2c9d1dc3077  /tmp/contacts.tgz

Change to the mail in a box directory: (only done once)

cd mailinabox/

Steps to fix: (this is what we will be iterating through)

  1. Make a copy of the entire error message in a local txt editor that you can copy and paste from your terminal session.
  2. Edit the file to sort the hashes

sudo nano ./setup/nextcloud.sh

Search (CTRL-W) for the “Expected hash” in this case it would be the 697f6b4a664e928d72414ea2731cb2c9d1dc3077

Carefully delete existing hash then paste in the “Found” hash eg 38653b507bd7d953816bbc5e8bea7855867eb1cd

(Do another search for the expected hash as it may be used multiple times)

  1. Recommended but not essential (Delete old backups). Personally I nuked everything from 2026 as I had had many failed attempts and it was taking a lot of space. The install will tell you the specific backup used so you may choose to just delete that one.
    I deleted all from 2026 as that was easy/lazy.

    sudo rm -r /home/user-data/owncloud-backup/2026*
    
  2. Re-run the local version of the script:
    sudo ./setup/start.sh

I then had to walk it through each version to upgrade and fix the hashes that were mismatched. This will be both for calendar and contacts.

Once you reach version 25 at which point they worked correctly and while you may need to re-run the script eventually you will get upgraded to latest version 27 with all being well.

Is changing the hashes like that a safe way to fix this?

Its the only way.

Not sure which project got out of sync but you can go check the repo from Nextcloud which will give you the correct hashes (which are what we are downloading and whats reported above).

I can’t explain how/why/politics/process/whatever or tell you its perfectly safe as this is the internet but I am trying to give you a method you can leverage and once you reach v25 it will work as expected up to v27 which is the latest to date.

1 Like

Luckily, the 26.04 repo I am working on, has the updated hash verifier.

I will work on updating every hash (even legacy versions) throughout the entire repository with accurate sha1 and sha256 hashes, so this doesn’t happen with future versions.

2 Likes