Using AutoUpdate to Update Local Installations of Synapse.Server

Use the AutoUpdater to provide built-in server updates. Invoking the AutoUpdater will stop the server, download/extract a patch, then optionally restart the server.

Overview of the AutoUpdater Process

When initiating an autoupdate, Synapse.Server.AutoUpdater.exe follows this workflow:
0. Creates a shadow copy of itself in a nested folder of the current path, called .shadow, and then re-launches the update from the shadow copy continuing with Step 1.
1. Reads Synapse.Server.AutoUpdater.yaml and stops associated services.
2. Reads the UpdateConfig.xml sepcified at the UpdateConfigUri, gets the version for the current update, and compares to the version on the specified AutoUpdater.RuntimeExe.
3. If the AutoUpdater.RuntimeExe version is less than UpdateConfig.CurrentVersion, the file located at UpdateConfig.PatchUri is downloaded and extracted locally.
4. Following the update, services are (optionally) restarted.

Configuring the AutoUpdater

AutoUpdate Config File

Synapse.Server.AutoUpdater.exe sources Synapse.Server.AutoUpdater.yaml for its settings.

Name

Type/Value

Required

Description

ServiceConfigs

Array of Strings

No

By default, the AutoUpdater will look for ..\..\Synapse.Server.config.yaml to discover server settings. If the server instance is Configured to use an alternately named configuration file, or if the server is executing in more than instance, list the paths to the config files in this setting.

UpdateConfigUri

String

Yes

URL or UNC path to the update configuration file. See Update Config File below for more information.

RuntimeExe

String

Yes

Path the runtime process. The required value is ..\..\Synapse.Server.exe.

DownloadFolder

String

Yes

The path where the update files are cached during the update process.

WaitForExitMillseconds

Integer

Yes

The maximum number of milliseconds to wait before terminating the AutoUpdater.

Update Config File

The version of Synapse.Server.exe in the patch zip file. This setting is used to compare to the RuntimeExe in Synapse.Server.AutoUpdater.yaml to determine if an update is necessary.

IsMandatory

Boolean

No

Not applicable; the AutoUpdater treats all patches as mandatory, installing only when invoked.

LastMandatoryVersion

String

Yes

Not applicable; the AutoUpdater treats all patches as mandatory, installing only when invoked.

PatchUri

String

Yes

URL or UNC path to the update patch zip file.

PatchSizeBytes

Integer

Yes

The size of the update patch zip file, in bytes. Note: this is the 'Size' property, not the 'Size on Disk'.

Note: When running the Controller/Node from a single folder, the Synapse.Server zip file from GitHub (https://github.com/SynapseProject/synapse.server.net/releases) may be used as-is. If running the Controller and Node in separate folders, it may be useful to purge unnecessary files from the zip before listing as an available patch.