This guide describes how to upgrade an existing Newired server installation that was originally installed using the Newired Installer on Linux or Windows.
The upgrade is performed by replacing the application files with those from the Newired-Legacy-War-Upgrade package. Database schema migrations are managed by Flyway and run automatically on the first application startup after the upgrade — no manual SQL scripts are required.
Download the Upgrade Package¶
Download the upgrade package from the Newired support portal:
URL: https://download.newired.com/
The file is named:
Newired-Legacy-War-Upgrade-<version>.zip
For example: Newired-Legacy-War-Upgrade-26_1_0.zip
The package contains the following structure:
newired/
├── apps/
├── themes/
└── tomcat/
└── webapps/
├── collector/
├── newired/
└── report/Prerequisites¶
- Administrator or root access to the server
- PostgreSQL client tools (
pg_dump,psql) available on the server - Sufficient disk space for backups (recommended: at least 2× the size of the current installation)
Step 1 — Stop the Newired Service¶
All three web applications (newired, collector, report) run inside a single Tomcat instance. Stop it before making any changes.
Linux¶
sudo systemctl stop newired
Verify the service has stopped:
sudo systemctl status newired
Windows¶
Open Services (services.msc) and stop the Newired Portal service.
Alternatively, open a Command Prompt as Administrator:
net stop "Newired Portal"
Step 2 — Backup¶
2.1 Application Files Backup¶
Back up the directories that will be replaced during the upgrade.
Linux:
sudo mkdir /opt/Newired-backup sudo cp -r /opt/Newired /opt/Newired-backup/
Windows:
robocopy "C:\Newired\" "C:\Newired_backup\Newired\" /e /zb /copyall
/e includes empty sub directories, /zb uses restartable mode with backup fallback, /copyall preserves all file attributes and permissions.
2.2 Database Backup¶
Create a full backup of all three PostgreSQL databases before the upgrade.
Linux:
sudo pg_dump -C -h 127.0.0.1 -p 5432 -U postgres -W -d newired -f /opt/Newired-backup/newired.sql sudo pg_dump -C -h 127.0.0.1 -p 5432 -U postgres -W -d collector -f /opt/Newired-backup/collector.sql sudo pg_dump -C -h 127.0.0.1 -p 5432 -U postgres -W -d report -f /opt/Newired-backup/report.sql
Windows (Command Prompt):
C:\Newired\postgresql\bin\pg_dump.exe -C -h localhost -p 5432 -U postgres -W -d newired -f C:\Newired_backup\newired.sql C:\Newired\postgresql\bin\pg_dump.exe -C -h localhost -p 5432 -U postgres -W -d collector -f C:\Newired_backup\collector.sql C:\Newired\postgresql\bin\pg_dump.exe -C -h localhost -p 5432 -U postgres -W -d report -f C:\Newired_backup\report.sql
Store the backup files in a safe location outside the Newired installation directory.
Step 3 — Extract the Upgrade Package¶
Linux:
unzip Newired-Legacy-War-Upgrade-<version>.zip -d /tmp/newired-upgrade
Windows:
Extract the ZIP to a temporary folder, for example C:\Temp\newired-upgrade.
Step 4 — Replace Application Files¶
Replace the existing application files with the contents of the upgrade package.
Linux
INSTALL_DIR=/opt/Newired UPGRADE_DIR=/tmp/newired-upgrade/newired # Replace webapps sudo rm -rf "$INSTALL_DIR/tomcat/webapps/newired" sudo rm -rf "$INSTALL_DIR/tomcat/webapps/collector" sudo rm -rf "$INSTALL_DIR/tomcat/webapps/report" sudo cp -r "$UPGRADE_DIR/tomcat/webapps/newired" "$INSTALL_DIR/tomcat/webapps/" sudo cp -r "$UPGRADE_DIR/tomcat/webapps/collector" "$INSTALL_DIR/tomcat/webapps/" sudo cp -r "$UPGRADE_DIR/tomcat/webapps/report" "$INSTALL_DIR/tomcat/webapps/" # Replace apps and themes sudo cp -r "$UPGRADE_DIR/apps/"* "$INSTALL_DIR/apps/" sudo cp -r "$UPGRADE_DIR/themes/"* "$INSTALL_DIR/themes/"
¶
Windows¶
For each of the following directories, delete the existing folder and copy the new one from the upgrade package:
| Delete (existing) | Copy from package |
|---|---|
C:\Newired\tomcat\webapps\newired\ | newired\tomcat\webapps\newired\ |
C:\Newired\tomcat\webapps\collector\ | newired\tomcat\webapps\collector\ |
C:\Newired\tomcat\webapps\report\ | newired\tomcat\webapps\report\ |
Then copy (merge) the contents of newired\tomcat\webapps\, newired\apps\ and newired\themes\ into C:\Newired\tomcat\webapps\ ,C:\Newired\apps\ and C:\Newired\themes\ respectively.
Step 5 — Start the Newired Service¶
Linux¶
sudo systemctl start newired
Windows¶
Open Services (services.msc) and start the Newired Portal service, or:
net start "Newired Portal"
Step 6 — Verify the Upgrade¶
6.1 Check Service Status¶
Linux:
sudo systemctl status newired
Windows: Confirm the Newired Portal service shows status Running in services.msc.
6.2 Check Application Logs¶
Monitor the Tomcat log during startup to confirm the application started successfully.
Linux:
sudo tail -f /opt/Newired/tomcat/logs/catalina.out
Windows:
Open C:\Newired\tomcat\logs\catalina.out in a text editor or log viewer.
6.3 Database Migration (Flyway)¶
Flyway database migrations run automatically on the first startup after the upgrade. No manual action is required. Confirm successful migration in the logs:
Flyway migration completed.
If FLYWAY_REPAIR_UP_TO_VERSION is set (see Troubleshooting), you will additionally see:
Running Flyway repair to fix checksums before migration. Flyway repair completed. Flyway migration completed.
6.4 Verify the Application¶
Open a browser and navigate to the Newired portal:
http://<server-address>:<port>/newired
Log in with administrator credentials and verify the version in Settings → About.
Troubleshooting¶
Flyway Checksum Mismatch¶
If the application fails to start with an error similar to:
FlywayValidateException: Migration checksum mismatch for migration version X.Y.Z
Set the environment variable FLYWAY_REPAIR_UP_TO_VERSION to any non-empty value (e.g. the target version) before starting the service. Flyway will automatically repair the checksum history before running migrations.
Linux — add to the service environment or set before starting:
Temporarily update the service file /etc/systemd/system/newired.servicewith FLYWAY_REPAIR_UP_TO_VERSION=26.1.0:
[Unit] Description=Newired server After=network.target [Service] Type=forking Environment=CATALINA_HOME=/opt/Newired/tomcat Environment=CATALINA_BASE=/opt/Newired/tomcat Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom' Environment=FLYWAY_REPAIR_UP_TO_VERSION=26.1.0 ExecStart=/opt/Newired/tomcat/bin/startup.sh ExecStop=/opt/Newired/tomcat/bin/shutdown.sh UMask=0007 RestartSec=10 Restart=always [Install] WantedBy=multi-user.target
or try
export FLYWAY_REPAIR_UP_TO_VERSION=26.1.0 sudo systemctl start newired
Windows — set the system environment variable via System Properties → Advanced → Environment Variables, then start the service.
After a successful startup the variable can be removed.
MinIO Object Storage Migration (upgrade from 25.x to 26.x only)¶
When upgrading from version 25.3.0 or lower to version 26.0.0 or higher, the MinIO object storage data must be migrated before starting the application.
A migration script is included in the package under update-object-storage/. Refer to the MinIO migration documentation for detailed steps.
Skipping this migration when crossing the 25.x → 26.x boundary may result in missing content or application startup failures.
Rollback Procedure¶
If the upgrade fails and the application cannot be restored to a working state, follow these steps to revert to the previous version.
1. Stop the Service¶
Follow Step 1
2. Restore Application Files¶
Linux:
INSTALL_DIR=/opt/Newired BACKUP_DIR=/opt/newired-backup-<timestamp> sudo rm -rf "$INSTALL_DIR/tomcat/webapps/newired" sudo rm -rf "$INSTALL_DIR/tomcat/webapps/collector" sudo rm -rf "$INSTALL_DIR/tomcat/webapps/report" sudo cp -r "$BACKUP_DIR/webapps/newired" "$INSTALL_DIR/tomcat/webapps/" sudo cp -r "$BACKUP_DIR/webapps/collector" "$INSTALL_DIR/tomcat/webapps/" sudo cp -r "$BACKUP_DIR/webapps/report" "$INSTALL_DIR/tomcat/webapps/" sudo cp -r "$BACKUP_DIR/apps/"* "$INSTALL_DIR/apps/" sudo cp -r "$BACKUP_DIR/themes/"* "$INSTALL_DIR/themes/"
Windows:
robocopy "C:\NewiredBackup\Newired\" "C:\Newired\" /e /zb /copyall
3. Restore the Database¶
Warning: This operation drops and recreates each database, replacing all content with the backup. Ensure the Newired service is stopped before running these commands.
Linux:
psql -U postgres -c "DROP DATABASE IF EXISTS newired;" psql -U postgres -c "CREATE DATABASE newired;" psql -U postgres -d newired -f newired.sql psql -U postgres -c "DROP DATABASE IF EXISTS collector;" psql -U postgres -c "CREATE DATABASE collector;" psql -U postgres -d collector -f collector.sql psql -U postgres -c "DROP DATABASE IF EXISTS report;" psql -U postgres -c "CREATE DATABASE report;" psql -U postgres -d report -f report.sql
Windows (Command Prompt):
psql.exe -U postgres -c "DROP DATABASE IF EXISTS newired;" psql.exe -U postgres -c "CREATE DATABASE newired;" psql.exe -U postgres -d newired -f C:\Backup\newired.sql psql.exe -U postgres -c "DROP DATABASE IF EXISTS collector;" psql.exe -U postgres -c "CREATE DATABASE collector;" psql.exe -U postgres -d collector -f C:\Backup\collector.sql psql.exe -U postgres -c "DROP DATABASE IF EXISTS report;" psql.exe -U postgres -c "CREATE DATABASE report;" psql.exe -U postgres -d report -f C:\Backup\report.sql
4. Start the Service¶
5. Verify¶
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article