uSync.Publisher Config
uSync.Publisher Config lives in the uSync.Publish.config
file on disk. A number of these elements can be controlled via the publisher dashboard in the settings section of Umbraco.
Config File
<uSyncPublisher incomingEnabled="true" outgoingEnabled="true">
<server>Live</server>
<appId>ec62e1f9-b5e2-4b65-ad78-6ff58d6faee0</appId>
<appKey>Zaprs7hO0fjAOX+8LfS1UIoIDlwnSnKoNK/ItnpbFOc=</appKey>
<groups>admin,editor</groups>
<handlerSet>publisher</handlerSet>
<includeMediaFiles>no</includeMediaFiles>
<includeChildren>user-yes</includeChildren>
<deleteMissing>yes</deleteMissing>
<includeMedia>user-yes</includeMedia>
<includeAncestors>no</includeAncestors>
<includeFiles>no</includeFiles>
<includeLinked>no</includeLinked>
<includeDependencies>no</includeDependencies>
<pageSize>50</pageSize>
<additionalFolders>~/views,~/css,~/scripts</additionalFolders>
<baseUrl>https://www.customdomain.com/</baseUrl>
<cleanReports>true</cleanReports>
<networkMode>True</networkMode>
<servers>
<server alias="development" url="http://localhost:64741/umbraco" enabled="true" showSelf="true">
<name>Development</name>
<showSelf>true</showSelf>
<description>Development Server</description>
<icon>icon-lab color-deep-purple</icon>
<includeChildren>user-yes</includeChildren>
<deleteMissing>user-yes</deleteMissing>
<includeMedia>user-yes</includeMedia>
<includeAncestors>user-no</includeAncestors>
<includeFiles>user-yes</includeFiles>
<includeLinked>user-no</includeLinked>
<includeDependencies>user-no</includeDependencies>
<allowedServers>
<server pull="true" push="true">development</server>
<server pull="true" push="true">stage</server>
<server pull="true" push="false">live</server>
</allowedServers>
</server>
<server alias="stage" url="https://stage.jumoo.co.uk/umbraco" enabled="true" showSelf="false">
<name>Stage</name>
<description>Staging Site</description>
<baseUrl>http://stage.jumoo.co.uk/</baseUrl>
<icon>icon-server color-orange</icon>
<includeDependencies>user-no</includeDependencies>
<deleteMissing>no</deleteMissing>
<includeFiles>user-yes</includeFiles>
<includeMedia>yes</includeMedia>
<allowedServers>
<server pull="true" push="false">development</server>
<server pull="true" push="true">live</server>
</allowedServers>
</server>
<server alias="live" url="https://live.jumoo.co.uk/umbraco" enabled="true" showSelf="false">
<name>Live</name>
<description>Live Site</description>
<icon>icon-server color-green</icon>
<allowedServers>
<server pull="true" push="true">stage</server>
</allowedServers>
</server>
</servers>
</uSyncPublisher>
Main Settings
Property | Value | Note |
---|---|---|
incomingEnabled | true/false | Turns this server on/off for incoming requests. With this setting off the server cannot be published to or pulled from. |
outgoingEnabled | true/false | Enables/disables this server sending publish requests. With this setting off, you will not see the publish/pull options in Umbraco. |
Server | string | Name of the server (not currently used). |
AppId | string | Application ID used alongside AppKey to sign and check any communication between instances. |
AppKey | string | Key used to sign communications. |
CleanReports | true/false | Turns on/off the trimming of folders after the report stage (this makes imports quicker as less is rechecked). |
Groups | string | Not in use (intended to restrict who can send/receive what, based on groups). |
HandlerSet | publisher | The handler set used by publisher. When installed, a new 'publisher' handler set is created in the uSync8.config file this contains a PublishedContent handler, which allows uSync to only send content that is published (the default handler works with saved content). |
NetworkMode | true/false | Use the allowedServer settings to determine what can and can't be seen by the user. |
baseUrl | string | Value used on main settings and server to override the url used when signing messages. If your server is behind a proxy you may need to use this value so messages are signed with the correct url. |
pageSize | number | number of items to process within any request, if you site is slow to publish it might be that you see timeouts during a push/pull process, reducing this number will make each request do less work and reduce the chance of a timeout occuring on your site. |
baseUrl
Depending on your site setup, you might find that your server does not receive requests on the same URL that they are sent.
An example of this is if you SSL certificates are applied at a level above the server.
In that case requests to https://stage.jumoo.co.uk/umbraco
might actually arrive at the server on http://stage.jumoo.co.uk
.
This mismatch can cause uSync to incorrectly sign communications, you will see an 'Unauthorized' message when you attempt to connect servers.
To fix this you need to use the <baseUrl>
setting on the server to allow requests to be correctly signed.
e.g: If your server is accessed via https://stage.jumoo.co.uk
but requests are rewritten to http://stage-sever.jumoo.co.uk/
you may need the following settings:
<server alias="stage" url="https://stage.jumoo.co.uk/umbraco" enabled="true" showSelf="false">
<baseUrl>http://stage.jumoo.co.uk</baseUrl>
....
</server>
Sync Settings
There are a number of settings that determine which options are used when sending items between servers. For each of these items the value can be Yes, No, user-yes, user-no. Values prefixed with user mean the user can change this value when sending an item (so it is in the UI).
Property | Note |
---|---|
includeDependencies | Includes any dependencies such as datatypes or doctypes required for the media or content being synced. |
includeMediaFiles | Includes any media (image, PDF, etc) that are used in the content being published, only changed files will be sent between servers. |
includeChildren | Includes any child content or media from the item being synced. |
deleteMissing | Removes any items from the target site that are not in the source site. |
includeMedia | Includes any media items linked to in the content. |
includeAncestors | Includes any parent items to the one being published. |
includeFiles | Includes any views/css/stylesheets required. |
includeLinked | Includes any content linked to by the content being published, this can result in a large amount of content being published, often a whole site. |
additionalFolders | Folders that included when syncing files the default is ~/views,~/css,~/scripts and if you replace this value, you should include these folders. |
Which items you choose to sync depends on how you choose to sync your sites.
If for example you are using uSync as part of your CI/CD you may choose to only sync the content and media items, which will make the process quicker and simpler. If you are not syncing the sites any other way, you may wish to include all options. This will mean when you publish, it will include all settings and content needed to keep the sites in sync.
Web.Config Overrides
This feature requires uSync.Complete 8.5 or greater
You can override a number of the standard settings in the main config file, by setting values in the web.config file.
<!-- publisher settings here override the uSync.Publisher config -->
<add key="uSyncPublish:IncomingEnabled" value="true"/>
<add key="uSyncPublish:OutgoingEnabled" value="false"/>
<add key="uSyncPublish:AppId" value="your-appid-value" />
<add key="uSyncPublish:AppKey" value="your-key-value" />
<!-- by server (alias is capitalized -> Alias) -->
<add key="uSyncPublish:Development:Enabled" value="true"/>
<add key="uSyncPublish:Development:PullEnabled" value="false"/>
using the overrides means that saving settings in the dashboard may not be effective, because that will save changes to the uSync.publish.config file not the web.config file.
Server Settings
See the server settings pages for details.