Upgrading Certdog
From version: 1.18.0. For upgrades to earlier versions see Manually Upgrading
From 1.18, Certdog upgrades itself in place. You unzip the new version anywhere except over the installation, and run its upgrade script against the installation. The script:
- checks first, and changes nothing if a check fails
- stops Certdog, backs up the installation beside it, updates it and starts it again
- keeps your configuration, certificates, logs and database, adding only what the new version needs
- puts the installation back as it was if a step fails before Certdog starts
- can restore the backup later, to go back to the previous version
Upgrading from 1.16 or earlier? First upgrade the database as described in Upgrading The Database. This is needed once, for the move to 1.17 or later
Before you upgrade
- Back up the database. The upgrade backs up the installation, but not the database (it only adds indexes to it). See Backup
- Plan a short maintenance window. Certdog is unavailable while it is upgraded: usually a few minutes
- Upgrade a test installation first, if you have one, with the same configuration
- Read the release notes for the new version
- Check the free disk space: the backup needs about as much space as the installation (without its logs)
Windows
1. Unzip the new version elsewhere
Download the new certdog.zip (see Download Locations), unblock it (right-click, Properties, Unblock), and unzip it to a new folder, not over the installation. For example:
Expand-Archive .\certdog.zip C:\certdog-new
2. Run its upgrade script
Open PowerShell as Administrator and run the new version’s upgrade.ps1:
C:\certdog-new\certdog\install\upgrade.ps1
It finds the installation from the registry. To upgrade one in another folder, give it: -installDir D:\apps\certdog.
After you accept the EULA, it checks the installation and the new version, and shows what it will do:
Checking the installation
[ OK ] Installation C:\certdog, certdog 1.18.0
[ OK ] New version 1.18.1
[ OK ] Installed files 1907 listed in install/manifest.sha256
[ OK ] Registration the certdog service runs this installation
[ OK ] certdog service running: it will be stopped during the upgrade
[ OK ] Java jdk-25.0.5.1+2 (already this version)
[ OK ] Backup C:\certdog-backup-1.18.0-20261204-0930
[ OK ] mongosh C:\certdog\mongodb\bin\mongosh.exe
Installation C:\certdog
From certdog 1.18.0
To certdog 1.18.1
Backup C:\certdog-backup-1.18.0-20261204-0930
certdog will be unavailable while it is upgraded. Its configuration, certificates, logs and database are kept.
Continue? (y/n): y
Type y. It upgrades in six steps:
| Step | What it does |
|---|---|
| 1. Stopping certdog | Stops the Krestfield Certdog Service |
| 2. Backing up the installation | Copies the installation (without its logs) to certdog-backup-<old version>-<time> beside it |
| 3. Updating certdog’s files | Replaces the files the old version installed, keeping any your site changed |
| 4. Updating the configuration | Adds the settings the new version needs |
| 5. Database | Adds new indexes |
| 6. Starting certdog | Starts the service and waits for Certdog to answer |
At the end it shows where the backup and log are, and how to go back:
certdog has been upgraded to 1.18.1.
Backup of 1.18.0 C:\certdog-backup-1.18.0-20261204-0930
To go back to it C:\certdog\install\upgrade.ps1 -installDir C:\certdog -restore C:\certdog-backup-1.18.0-20261204-0930
Log C:\certdog\logs\upgrade-20261204-0930.log
The new version's files (C:\certdog-new\certdog, and the zip it came from) are no longer needed: you can delete them.
When you are satisfied that the upgrade is working, you can delete the backup (C:\certdog-backup-1.18.0-20261204-0930).
The database was not backed up: only new indexes were added to it.
Windows options
| Parameter | |
|---|---|
-installDir <folder> | The installation to upgrade (default: the one in the registry) |
-acceptEula | Accept the EULA without asking |
-unattended | Ask nothing (needs -acceptEula) |
-backupDir <folder> | Where to put the backup (default: beside the installation) |
-noStart | Do not start Certdog at the end |
-restore <backup> | Go back to a backup (see Going back) |
The exit codes are those of the installer.
Linux
Unpack the new version anywhere except over the installation, and run its upgrade.sh as the user that owns the installation:
mkdir -p /tmp/certdog-new
tar -xzf certdog.tar.gz -C /tmp/certdog-new
/tmp/certdog-new/certdog/install/upgrade.sh --install-dir /opt/certdog
It checks the installation, the new version, the permissions, Java and the free space for the backup:

Type y, and it upgrades in the same six steps as on Windows. At the end it lists any configuration file it kept because your site had changed it, with the new version’s copy beside it:

Linux options
| Option | |
|---|---|
--install-dir <folder> | The installation to upgrade |
--accept-eula | Accept the EULA without asking |
--yes | Do not ask to continue |
--backup-dir <folder> | Where to put the backup (default: beside the installation) |
--no-start | Do not start Certdog at the end |
--restore <backup> | Go back to a backup |
For example, unattended: upgrade.sh --install-dir /opt/certdog --accept-eula --yes. The exit codes are those of configure.sh.
If you start Certdog with systemd, stop it with systemctl stop certdog before upgrading, and give --no-start, then start it again with systemctl start certdog.
Docker
Run the new image with the same volume: see Upgrade.
What the upgrade keeps
| Configuration and certificates | config, tomcat\conf and the UI’s config are kept. A file your site changed is never replaced: the new version’s copy is put beside it, as <name>.new-<version> (see below). Certificates and keys are only ever kept |
| server.xml | Kept as it is. A service the new version adds (e.g. EST, in 1.18) is added to it, on the same address and with the same TLS certificate as the UI, on its default port or the next free one. Certdog’s applications are started at the same time (startStopThreads="0" on each Host), unless your server.xml already sets startStopThreads |
| catalina.properties | Kept. Tomcat is set to look only in the jars that need it when Certdog starts, which makes it start faster: *.jar is added to jarsToSkip, and the jars Certdog needs to jarsToScan. This is done once: the upgrade marks the file with a comment, and does not change these settings again |
| application.properties | Kept. Settings the new version has, and it does not, are added at the end with their explanation. A setting you commented out is not added again. A setting whose default changed is changed only if it still has the old default |
Logs, and files your site added (e.g. a JDBC driver in tomcat\lib) | Never removed |
| The database | Not changed, apart from new indexes |
| Java | Replaced with the new version’s Java, if it is different. On Linux, a Java given with --java-home is not changed |
The .new files
When the upgrade keeps a file because your site changed it, it lists it at the end, e.g. config\log4j2.xml (new: log4j2.xml.new-1.18.1). Compare each file with its .new copy, merge any change you want (for example a new logger), and then delete the .new file. Certdog runs with your file until you do.
What earlier upgrades left
The upgrade scripts of 1.17 and earlier left copies in the installation folder: tomcat.bak.<time>, java-bak-<time>, mongodb.bak.<time> and config\sslcerts.bak.<time>, as can a WAR put aside by hand (e.g. tomcat\webapps\certdog#api.war.orig). Certdog does not use them. The upgrade does not delete them (they may be someone’s way back), and leaves them out of its backup. It lists them at the end, with their sizes: once you are satisfied that the new version is working, you can delete them.
Going back to the previous version
If a step fails before Certdog starts, the upgrade puts the installation back as it was by itself (the failed one is kept as certdog.failed-<time>, to look into).
To go back later, run the restored version’s upgrade script with -restore (or --restore) and the backup:
C:\certdog\install\upgrade.ps1 -installDir C:\certdog -restore C:\certdog-backup-1.18.0-20261204-0930
/opt/certdog/install/upgrade.sh --install-dir /opt/certdog --restore /opt/certdog-backup-1.18.0-20261204-0930
It stops Certdog, moves the installation as it is now aside (to certdog.failed-<time>), puts the backup back, and starts Certdog:

The database is not changed. If the new version changed data in a way the old one cannot read (the release notes say so), restore the database from the backup you took before upgrading.
Upgrading from 1.17
The upgrade from 1.17 works in the same way. In addition:
- 1.17 kept
server.xmlinconfig: the upgrade moves it totomcat\conf(leavingconfig\server.xml.moved-to-tomcat-conf) - The database, and its configuration, are left as they are: the TLS, replica set and access control that new 1.18 installations set up are not added to them
- On Linux, new start and stop scripts are written
After the upgrade
Upgrade the ADCS Agent or Driver
This step is only required if you interface with a Microsoft CA
If you are using the ADCS Agent (available from version 1.18), upgrade each agent. On the certdog server, open a PowerShell window as Administrator, navigate to the .\install directory and run .\install-adcs-service.ps1. For agents on other servers see Upgrading. The agent keeps its registration and does not need to be approved again
If you are upgrading to version 1.18 from an earlier version, your Microsoft CA Certificate Issuers continue to use the ADCS Driver and nothing changes until you choose to switch them. Upgrade the driver as described below. You can then move to the new ADCS Agent when ready. See Migrating from the ADCS Driver
If you are using the ADCS Driver, you should also perform the following steps:
- Start Apps and Features. Locate the Certdog ADCS Driver and select Uninstall
-
As an Administrator, run the
AdcsDriverInstaller.msifile from the\install\bindirectory (e.g.c:\certdog\install\bin\AdcsDriverInstaller.msi)This will install the new version of the driver
If after the upgrade, the driver shows as unregistered in the Certdog UI, re-register as follows:
-
Open a PowerShell window as Administrator and navigate to the
.\installdirectory e.g.c:\certdog\installand run the following command:.\configure-adcs-service.ps1 -
Next, from Certdog, select the Agents menu and approve the agent
-
For each of your Microsoft Certificate issuers, click Edit and select the Permitted Agents (which in most cases will just be the one agent)
Check it is working
- Log in, and check the version shown at the foot of the page
- Check the certificate issuers, and issue a test certificate
- Check the log (
logs\upgrade-<time>.log) and Certdog’s logs for errors - Compare the
.newfiles, if any were listed
When you are satisfied, delete the backup, and the new version’s package and zip.
Tips
- Keep the backup until the new version has been running for a while: it is the quickest way back
- Keep the old version’s zip too, until you have deleted the backup
- Script it.
-unattended -acceptEula(Windows) or--accept-eula --yes(Linux) run the upgrade without questions, and the exit code says how it went - Several servers? Upgrade them one at a time, checking each, as they share the database. See Adding Additional Servers
- If something goes wrong, see Upgrade Troubleshooting