---
title: "Deploy a Compatibility Package to a server"
description: "Deploy a Compatibility Package to a server with the Server alias, for all users with machine-wide registry."
product: "Alchemy"
edition: "Public"
type: "workflow"
url: "https://docs.cloudhouse.com/public/deploying-packages/deploy-to-a-server/"
---
# Deploy a Compatibility Package to a server

Use the Server alias when you need to deploy a Cloudhouse Alchemy Compatibility Package to a specific folder on a specific computer for all users to use, and when all users should share the same Machine Registry Hive. For example:

Applies to: `Alchemy`

- Server-based applications such as three-tier applications.
- Server-based computing environments such as Citrix Virtual Apps (XenApp) and Microsoft Remote Desktop Services.

!!! note

    If you are deploying to a machine (where a Compatibility Package needs to be deployed to a specific folder on a specific computer for all users to use, but when each user should have their own data stored in their own `HKCU` Registry Hive), then you should follow the instructions in [Deploy an Alchemy Compatibility Package to a Machine](https://docs.cloudhouse.com/public/deploying-packages/deploy-to-a-machine/index.md). Also, your source Compatibility Package is not modified when it is deployed.

## Prerequisites

To deploy a Compatibility Package to a Server, you need:

- An account with **Administrator** access to the target computer.
- A valid Licensing Token within the Compatibility Package.

## Process to deploy a Compatibility Package to a server

1. Start a Command Prompt as the **Administrator**.
2. Run the command `<path_to_package>\Cloudhouse.Container.Deployment.Exe /deploydir <target_path> /accepteula /deployalias server /<switches>` where:

    - `<path_to_package>` is the path to the source Compatibility Package you want to deploy.
    - `<target_path>` is the path to the folder on the destination computer you want to deploy the Compatibility Package to.
    - `<switches>` are any optional command-line switches you wish to specify.

    For example:

    ```
    C:\Packages\ERP-v2\Cloudhouse.Container.Deployment.Exe /deploydir "C:\Program Files (x86)" /accepteula /deployalias server
    ```

!!! warning

    The `/deploydir`, `accepteula`, and `/deployalias` command-line switches are required to deploy a Compatibility Package as a Server. For more information, see [Alchemy Compatibility Package Deployment Command-Line Options](https://docs.cloudhouse.com/public/deploying-packages/command-line-options/index.md).

!!! note

    If you forget to add the `/deployalias server` switch, the Compatibility Package is deployed in the Machine context. Also, commands can be run manually, as part of a build script executed by the Administrator, or a 3rd-party electronic software deployment (**ESD**) tool.

## What happens during a server deployment?

When a Compatibility Package is deployed as a Server, the following occurs:

- Any AppRegistry keys in `AppRegistry.xml` will be written to the `HKLM` registry hive when the application is deployed. This hive will be accessible to all users of that computer.
- Any ComRegistry keys in `ComRegistry.xml` will be written to the `HKLM` registry hive when the application is deployed. This hive will be accessible to all users of that computer.
- Any redirections in `Redirections.xml` will be redirected to the `HKLM` registry hive. Any file type associations specified in `FileAssociations.xml` are created in the `HKLM` registry hive, to be accessible to all users of that computer.
- Any shortcuts specified in `Shortcuts.xml` are registered for all users of the computer. Any shortcuts with a path pointing to the user's desktop or Start menu, are translated to the equivalent of the **All Users** folder so they are accessible to all users on the computer.
- Any services specified in `Services.xml` will be registered to the Windows Services, to be accessible by all users on the computer.
- Any COM servers specified in `ComDeployment.xml` will be registered in the `HKLM` registry hive, to be accessible by all users on the computer.

## Validation

When a Compatibility Package is deployed in the Server context, validations are performed to ensure that:

- A valid licensing token exists at the top level of the Compatibility Package.
- The AAV binaries exist in the Compatibility Package and all have the same version.
- The Compatibility Package binaries exist within the Compatibility Package and all have the same version.
- All required components exist in the Compatibility package.
- All XML files are valid.
