Installing Umbraco Deploy
This article covers the steps to install and configure Umbraco Deploy on a new or existing website.
Prerequisites
Ensure to first read and follow the setup guides for either new or existing projects below:
Source Control Configuration
After the Umbraco files have been committed, add the following lines to the .gitignore so they are not picked up by Git when deploying.
**/media/*
# Umbraco deploy specific
**/umbraco/Deploy/deploy*Make sure that the updates to the .gitignore file are also committed.
Installing and Configuring Umbraco Deploy
When Umbraco has been installed in a repository, you can install Umbraco Deploy in the project.
To install Umbraco Deploy, run dotnet add package Umbraco.Deploy.OnPrem from the command line or Install-Package Umbraco.Deploy.OnPrem from the package manager console in Visual Studio.
With Umbraco Deploy installed, to use it in the project you will need to create and add configuration for an API key/secret.
For improved security, it is recommended to set the ApiSecret (instead of the ApiKey) setting to a cryptographically random value of 64 bytes. Using Base64-encoding to get the string representation, will result in a value of 88 characters. For versions prior to Deploy 12 or when not using the API secret setting, the recommendation is to set the ApiKey to a randomly generated string of 64 characters.
Configuring Environments
Once the API secret has been added, it is now time to configure the environments, also in the appsettings.json file.
An example configuration with a single upstream environment file will look like this:
The setting under Project:CurrentWorkspaceName should match the Name provided in the list of Workspaces that match the current environment. Using this Umbraco Deploy will indicate the correct current environment on the "Workspaces" dashboard.
Expected values for Type are "development", "staging", or "live". These settings are required, though only the live environment strictly requires the specific value live. You can use other values if you have more than these three environments. All values for Type must be written in lowercase.
You will need to generate a unique GUID for each environment. This can be done in Visual Studio:
Open "Tools".
Select "Create GUID".
Use the Registry Format.
Copy the GUID into the
idvalue.Generate a "New GUID" for each environment you will be adding to your setup.
Or by running the following PowerShell command:
The URL configured for each environment should be the root URL for the website and needs to be accessible by the other environments over HTTPS.
Restoring from a Baseline project
A Baseline project is a project that you create other projects from, for example a starter site. These other projects are called Child projects. A Child project can restore content from the Baseline project, but can't transfer to it.
To restore from a Baseline project:
Configure the
BaselineUrlandBaselineApiSecretsettings on the Child project.Add the
BaselineApiSecretof the Child project to theChildApiSecretssetting on the Baseline project environment.
The Baseline is then available as an environment to restore from. Deploy offers it on the first environment configured in Workspaces and when running locally.
To get schema changes from the Baseline project, merge them into the source control repository of the Child project. Then deploy them like any other schema change.
Validating Source Control
Once the configuration has the correct information, verify that source control includes the files in the /umbraco/Deploy folder of your Umbraco project.
This can be done by going to the /umbraco/Deploy/Revision folder of the project and create a test .uda file, and then check in either your Git GUI or in the command line and verify whether the test file is being tracked.

The file has been created and is being tracked by Git. Go ahead and delete the test file.
Now that Umbraco Deploy has been installed on the project, go ahead and commit the files to the repository.
Do not push the files up yet as a CI/CD build server will first need to be set up and connected to your repository.
Include your Umbraco Deploy license file
Before moving on to setting up the build server, make sure that your license is included in your project.
For Umbraco Deploy On-Premise, this will be a key provided to you when taking out your subscription to the product. It should be added to your configuration at the key Umbraco:Licenses:Umbraco.Deploy.OnPrem.
For example, in appsettings.json:
Umbraco Cloud projects use a license file placed in the /umbraco/Licenses folder that is provided when your project is created.
Read more about the Umbraco Deploy licensing model.
Last updated
Was this helpful?