Before updating your version of Moodle, make sure that the server requirements are met on your MoodleBox. To do this, log in to Moodle, visit Site Administration > Server > Environment, click on Update component, then check that no line says Check in red.
Warnings site not https and php not 64 bits are not a problem and can be ignored.
To update Moodle, perform the following operations, using the command line.
Update to a minor version
To update to the next minor version of Moodle (3.10.1, 3.10.2, etc.), type the following commands in the terminal:1
cd /var/www/moodle/ sudo -u www-data -g moodlebox git pull
Update to a major version
To update to the next major version of Moodle (3.10, 3.112, 4.02, 4.12, etc.), type the commands above, then the additional following commands, indicating the adequate branch, e.g.
sudo -u www-data -g moodlebox git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" sudo -u www-data -g moodlebox git fetch origin sudo -u www-data -g moodlebox git checkout MOODLE_310_STABLE
If you have a MoodleBox version 3.6.0 and earlier, use
sudo -u moodlebox -g www-data git ... instead of
sudo -u www-data -g moodlebox git ... in the all the commands above.