GoAdmio

update

Update GoAdmio to the latest stable (or beta) version: download the package, replace the program files, and run the post-update tasks

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/update brings GoAdmio up to date. It finds the latest version number, downloads the update package from GoAdmio's servers, replaces the program files, and then runs the tasks that put the new version into use (permissions, configuration, cron jobs, and so on).

The firewall is paused while the update runs and started again at the end.

The command doesn't need sudo. If you aren't root, it runs itself again with sudo.

[!WARNING] If the update fails after the firewall has been paused, the firewall stays off. Start it again with /go/firewall start. See Troubleshooting.


Quick start

# Update to the latest stable version
/go/update

# Update to the beta version
/go/update beta

Syntax

/go/update [beta]

Options

Argument Required Default Notes
beta No Stable Downloads the beta package instead of the stable one. Meant for testing, not for production servers.

Any argument that contains the text beta selects the beta package. Other arguments are ignored.


Output

A successful update looks like this (the version and size are examples):

GoAdmio v26.1.1 update in progress:
[1/5] Pausing firewall service...
[2/5] Downloading GoAdmio v26.1.1...
######################################## 100.0%
[3/5] Verifying package checksum [Official]...
[4/5] Extracting GoAdmio v26.1.1 [48.20 MB]...
[5/5] Update complete.

The version number is read as five digits and shown as AA.B.C. The fifth digit isn't shown. [Official] or [Mirror] tells you which server the package came from.

Message Meaning Firewall
A new version of GoAdmio is currently being uploaded. Please try again later. The latest version number couldn't be read (a network problem, or a new release is being published). Exit status 1. Not touched
<site> Failed (Cannot download <file>) and Try <site>... The first download server failed. The other one is tried next. Off
Download is taking longer than expected. Try another mirror. Both curl downloads failed. wget is used as a fallback. Off
GoAdmio Update failed. The downloaded file is damaged. Exit status 1. Stays off
GoAdmio Update failed. Try Again No package could be downloaded. Exit status 1. Stays off
[5/5] Update complete. Done. On

Every run is logged to /var/log/go/update.log with a timestamp and the arguments used.


Examples

# Stable update
/go/update
# Beta update
/go/update beta
# After a failed update: make sure the firewall is running again
/go/firewall start
/go/checkfirewall

Troubleshooting

Symptom Likely cause Fix
The firewall is off after a failed update The script stops the firewall in step 1 and only starts it in the last step. Run /go/firewall start, then check it with checkfirewall.
A new version ... is currently being uploaded The server can't reach download.goadmio.com, or the answer isn't a 5-character version. Test with curl -I https://download.goadmio.com/home/go/update/latest.txt, then try again later.
The download keeps failing DNS or network problems, or a slow connection. The first method gives up after 30 seconds. Check DNS with resolver. The command runs resolver by itself when no download works.
GoAdmio Update failed. The downloaded file is not a valid archive. Run the update again.
Commands in /go are missing after a failed update The old files are deleted before the new archive is extracted, and extraction failed (for example, the disk was full). Free up space and reinstall GoAdmio if /go/update itself is gone. Check free space before updating.
Your changes to GoAdmio scripts disappeared The update replaces the files in /usr/local/goadmio/go and the panel's .php and .html pages. Keep local changes outside those folders.
The version shown has one digit fewer than the stored version Only the first four digits are shown. This is expected.
The last step takes a long time without output The post-update tasks print nothing. Wait for [5/5] Update complete.
Post-update tasks were skipped minio.conf shows MinIO on port 443. See Post-update tasks.

Details

How it works

flowchart TD
    A["/go/update [beta]"] --> B["Read the latest version number"]
    B -- "Not 5 characters" --> X["Try again later, exit 1"]
    B --> C["1: Stop the firewall, clear old packages and cache"]
    C --> D["2: Download stable.tar.gz or beta.tar.gz"]
    D --> E{"Valid archive?"}
    E -- "No" --> F["Update failed, exit 1 (firewall stays off)"]
    E -- "Yes" --> G["3-4: Replace the program files"]
    G --> H["Save the version in config.db"]
    H --> I["Post-update tasks"]
    I --> J["5: Cron, logging, firewall start, done"]

Download

  1. https://download.goadmio.com and https://mirror.goadmio.com are tried in random order with curl, with a limit of 30 seconds each.
  2. If both fail, the same two servers are tried with wget, with a limit of 10 minutes each.
  3. The result must pass gzip -t, which tests that the archive isn't damaged.

Replacing the files

  1. Deletes everything in /usr/local/goadmio/go/ and the .php and .html files in /usr/local/goadmio/home/go/.
  2. Extracts the package into /usr/local/goadmio and deletes the archive.
  3. Saves the new version number in the Config table of /var/lib/sqlite/config.db.
  4. Runs /go/tmp if the package contained one.

Post-update tasks

These run in order, unless MinIO is configured on port 443 (/usr/local/goadmio/minio/minio.conf contains :443 ). In that case they are skipped.

  1. /go/start, /go/go, /go/userini, /go/include, /go/os, /go/database, and /go/control (internal GoAdmio tasks)
  2. session (PHP session folders)
  3. fm all (see fm)
  4. checkphpini, with its output hidden
  5. /go/upgrade

Whether or not MinIO is used, the command then:

  1. deletes /etc/cron.d/*.save* and runs cron to set up the cron jobs again
  2. restarts rsyslog, which creates any missing log files
  3. runs /go/sqliterc, /go/profile, and /go/end
  4. starts the firewall with /go/firewall start

Security notes

Files and requirements

Item Used for
https://download.goadmio.com, https://mirror.goadmio.com The update servers.
/usr/local/goadmio/stable.tar.gz, beta.tar.gz The package, deleted after extraction.
/usr/local/goadmio/cache/ Emptied at the start.
/var/lib/sqlite/config.db The saved version.
/var/log/go/update.log The command log.
curl, wget, gzip, tar, sqlite3 Download, check, extract, and save.

See also

Command Description
firewall Install a firewall on a GoAdmio server
checkfirewall Verify that important required ports are open on your server
resolver Change the DNS resolver in GoAdmio
cron Set up main cron jobs in GoAdmio
fm Enable File Manager or deploy File Manager files per domain
checkphpini Scan every php.ini for startup errors and remove the offending line
heal Check GoAdmio service status and fix issues
serversync Back up and migrate a GoAdmio server with all configurations