---
title: Deploy your solution to Xperience Portal
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

There are two ways to deploy your solution to Kentico SaaS:

1. Using the Xperience Portal dashboard
2. Using the Xperience Portal API

In this step, we will perform the initial deployment through the Xperience Portal. Later in this series, you’ll also see the second approach when updating an existing deployment.

Both approaches have one thing in common: **exporting a deployment ZIP package**, which you then upload either through the Portal or the API.

## Set up PowerShell

Unless you use a Windows machine with PowerShell available out-of-the-box, make sure you have PowerShell installed.

> **Info:** The scripts in our code samples use PowerShell version 5.1 (Windows); you can check your version in your PowerShell terminal with this command:
>
> ```powershell title="Check your PS version"
> \$PSVersionTable["PSVersion"]
> ```

On Windows, your account must have permissions to run PowerShell scripts from external sources. Use the following command to bypass all execution checks for the current user:

```powershell
Set-ExecutionPolicy Bypass -Scope CurrentUser -Force
```

You can check whether your `ExecutionPolicy` is set to `Bypass` by running:

```powershell
Get-ExecutionPolicy
```

## Create initial deployment package

### Data serialization

Before creating and exporting the deployment package, it's always a good idea to double-check your CD configuration in the _repository.config_ file to ensure all necessary objects are included or excluded. If you didn't make any changes to the file or didn't add any custom classes to your Dancing Goat project, you are all set in this case.

Next, navigate to your project's root and run the CD store command:

```cmd title="Run the CD store"
dotnet run --no-build -- --kxp-cd-store --repository-path ".\`$CDRepository"
```

> **Note:** In your own project, only use the optional `--no-build` parameter to save time if you've previously built your solution, including all desired updates.

The command serializes all the CD supported data into your _$CDRepository_ folder. After the successful run, you should see newly generated folders `@global`, `DancingGoatEmails`, and `DancingGoatPages` with serialized data in your _$CDRepository_:

![Showing newly generated folders that contain the serialized CD data](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/CD-serialized-data.png "Showing newly generated folders that contain the serialized CD data")

### Export the deployment package

In your PowerShell terminal, run the _Export-DeploymentPackage.ps1_ script with the following parameters:

```powershell title="Generate initial deployment package"
.\Export-DeploymentPackage.ps1 -AssemblyName "DancingGoat.Web" -OutputPackagePath "./DeploymentPackage_1.zip"
```

- `AssemblyName` - your project's assembly name, by default, equal to the project's .csproj file name without the extension.
- `OutputPackagePath` - the name and path of the deployment package. If unspecified, the package will be created as _./DeploymentPackage.zip_ in the current root.

> **Info:** For production scenarios, you can enable [zero-downtime deployments](https://docs.kentico.com/documentation/developers-and-admins/deployment/deploy-to-the-saas-environment.md#zero-downtime-deployments) by [ensuring your code supports read-only mode](https://docs.kentico.com/documentation/developers-and-admins/deployment/read-only-deployments.md#required-project-changes) and using the `-ZeroDowntimeSupportEnabled` parameter when you initially create the deployment package.
>
> See the full list of parameters in [our documentation about the deployment package](https://docs.kentico.com/documentation/developers-and-admins/deployment/deploy-to-the-saas-environment.md#create-a-deployment-package).

The package export typically takes from a few seconds to a few minutes depending on the size of your project. The script will show progress while running.

![Exporting the deployment package in PowerShell](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/creating-deployment-package.png "Exporting the deployment package in PowerShell")

![Exporting the deployment package succeeded](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/creating-deployment-package-done.png "Exporting the deployment package succeeded")

Upon the successful export, take a quick look at the _$CDRepository_ folder in your new _./DeploymentPackage\_1.zip_ package:

Notice that the folder contains not only serialized XML objects, but also media files. See an example in any of the _article_ folders under _DancingGoat.Web/DeploymentPackage\_1.zip/$CDRepository/@global/contentitemdata.dancinggoat.image_.

![JPG image file inside the deployment package](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/image-in-CDRepository.png "JPG image file inside the deployment package")

The multimedia files stored as **assets in Content hub** also serialize in this process so **you don't need to deploy them to Azure Blob storage** separately. The deployment will happen automatically when we upload our package to the Xperience Portal.

## Deploy the package via Xperience Portal

Navigate to your Xperience Portal **Deployments** screen.

Double-check that you are [operating under the correct project](https://docs.kentico.com/modules/deploy-to-saas-step-by-step/saas-setup.md#identify-the-active-project).

All your environments will initially show a _“No active deployments found”_ message.

Under QA, click the **Upload deployment package** button.

![The Xperience Portal Deployments screen before the initial package upload](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/initial-upload.png "The Xperience Portal Deployments screen before the initial package upload")

Specify the path to your _DeploymentPackage\_1.zip_ file.

Click **Upload**.

![Uploading a deployment package via the Xperience Portal](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/uploading-deployment-package.png "Uploading a deployment package via the Xperience Portal")

Once you upload a package, the Xperience Portal adds it to a queue and then changes its status to **In progress**.

A single deployment usually takes 20-30 minutes to finish, and you can monitor it in the **Deployments** page.

![Deployment in progress](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/deployment-in-progress.png "Deployment in progress")

> **Info:** You can queue multiple deployments at once.
>
> If you do this, don’t be alarmed if some of them seem unusually slow. The Xperience Portal UI shows total time since the package was queued, not just active deployment time. Only one deployment runs at a time, so they're processed sequentially.

You can see all your past deployments and their logs on the **Deployments** page.

![Deployment history in Xperience Portal](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/deployment-history.png "Deployment history in Xperience Portal")

> **Note:** The above process applies if your deployment package is smaller than 2 GB. If it exceeds 2 GB, you need to use the [custom restore](https://docs.kentico.com/documentation/developers-and-admins/deployment/deploy-to-the-saas-environment/specialized-deployment-scenarios.md#deploy-a-large-amount-of-data-during-initial-deployments) feature instead to upload your data.

## Check your progress

When your initial deployment succeeds, visit the administration interface of your project in the QA environment by clicking the link at the top.

In the Xperience administration you should be able to see your deployed content items (including assets), web pages, settings and everything else specified in your _repository.config_.

🎬 [Video](https://docs.kentico.com/docsassets/modules/saas-initial-deployment/check-your-progress.mp4)

Great job, you are looking at the administration of your solution deployed to the SaaS QA!

Now, we still have to perform channel configuration to be able to visit our live site and use the email channel.
