AyaNova linux server platform upgrade¶
The linux server upgrade process involves replacing the AyaNova program files with the latest version and restarting the AyaNova server.
These instructions assume the original installation steps were followed without changes and Ubuntu or compatible distro was used, if you had to make changes or have an alternative distro adjust accordingly.
Expired Maintenance plan¶
If you do not have an active Maintenance plan updating will BREAK your AyaNova server.
1. Backup¶
Before proceeding, make a backup of the database and the attachment files and store it in a safe place.
If you do not have a fresh backup there will be no way to recover from potential data loss or damage.
1.5. Pre-upgrade step¶
Only if your current AyaNova version is older than 8.3.0 there is an extra step before the normal upgrade process.
8.3.0 switched to .NET 10 LTS from the prior used .NET 8 LTS (8.2.0 to 8.2.4), so the .NET 10 runtime must be installed first. This script also sets the folder ownership and permissions the installation instructions now use: the program files read only for the account AyaNova runs as, which only needs to write to the data directory, and config.json, which holds the database password, readable only by root and AyaNova.
From a terminal window run the following commands:
sudo apt-get update && sudo apt-get upgrade && \
sudo apt-get install -y aspnetcore-runtime-10.0 && \
sudo chown -vR :www-data /var/ayanova && \
sudo chmod -R go-w /var/ayanova && \
sudo chmod -R g+rw /var/ayanova/data && \
sudo chmod 640 /var/ayanova/config.json
These commands assume AyaNova runs as www-data, as in the installation instructions. If you chose another account, use its group in the chown line.
On Ubuntu 24.04 and 26.04 the .NET 10 runtime comes from Ubuntu's own package archive. On Ubuntu 22.04 first add the Ubuntu .NET backports package repository with sudo add-apt-repository ppa:dotnet/backports.
Installing the .NET 10 runtime replaces the shared dotnet command, the .NET 8 runtime stays installed and can be removed later if nothing else on the server uses it.
If there is an issue or error break apart the commands and execute each one individually to find the error.
Recommended: security settings for the AyaNova service¶
The installation instructions now add security settings to the AyaNova service so it can write only to its data directory. To add them to an existing installation without editing the service file, run:
sudo mkdir -p /etc/systemd/system/ayanova.service.d && \
printf '[Service]\nNoNewPrivileges=true\nProtectSystem=strict\nReadWritePaths=/var/ayanova/data\nPrivateTmp=true\nProtectHome=true\n' | sudo tee /etc/systemd/system/ayanova.service.d/hardening.conf && \
sudo systemctl daemon-reload
They take effect when the AyaNova service next starts, in the upgrade step below. If you have set a log, attachments, backup or temporary files path outside of the data directory, first read the note about ReadWritePaths in the installation instructions.
If users connect through NGINX as in the internet access instructions, also set AyaNova to accept connections only through NGINX.
After this step has completed you can continue with the normal upgrade process in the next step.
2. Upgrade¶
upgrade script¶
The following shell script will automatically stop the AyaNova server service, remove the old AyaNova files, download and unzip the latest AyaNova files then start the server service. It first checks that the .NET 10 runtime is installed and stops without changing anything if it is not (see the pre-upgrade step above).
Run the following shell commands:
cd /var/ayanova && \
{ dotnet --list-runtimes | grep -q '^Microsoft.AspNetCore.App 10\.' || { echo "The .NET 10 runtime is not installed: do the pre-upgrade step first. Nothing was changed."; false; }; } && \
sudo systemctl stop ayanova.service && \
sudo curl -fO https://www.ayanova.com/download/ayanova-linux-x64-server.zip && \
sudo rm *.dll && \
sudo rm -r ./resource && \
sudo rm -r ./wwwroot && \
sudo unzip -o ayanova-linux-x64-server.zip -x "config.json" && \
sudo systemctl start ayanova.service
If there is an issue or error break apart the commands and execute each one individually to find the error.
From 8.3.0 the Chrome report rendering engine is downloaded into a report-browser folder under the data directory instead of the program folder. After upgrading from an earlier version the old folders are no longer used and can be removed:
AyaNova should restart on it's own and perform any database schema updates if required automatically.
Open the login form in your browser and after a short delay you should see the new version number at the bottom of the login form.