# Deploying Your Rasa Assistant

This page explains when and how to deploy an assistant built with Rasa. It will allow you to make your assistant available to users and set you up with a production-ready environment.

- [When to Deploy Your Assistant](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#when-to-deploy-your-assistant)

- [Recommended Deployment Methods](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#recommended-deployment-methods)
  - [One-Line Deploy Script](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#one-line-deploy-script)
  - [Kubernetes/Openshift](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#kubernetes-openshift)
- [Alternative Deployment Methods](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#alternative-deployment-methods)
  - [Docker Compose](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#docker-compose)
  - [Rasa Open Source Only Deployment](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#rasa-open-source-only-deployment)
- [Deploying Your Action Server](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#deploying-your-action-server)
  - [Building an Action Server Image](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#building-an-action-server-image)
  - [Using your Custom Action Server Image](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#using-your-custom-action-server-image)

## [When to Deploy Your Assistant](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id6)

The best time to deploy your assistant and make it available to test users is once it can handle the most important happy paths or is what we call a [minimum viable assistant](/content/docs/rasa/glossary/index.html).
The recommended deployment methods described below make it easy to share your assistant with test users via the [share your assistant feature in Rasa X](/content/docs/rasa-x/user-guide/enable-workflows#conversations-with-test-users/index.html).

## [Recommended Deployment Methods](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id7)

The recommended way to deploy an assistant is using either the One-Line Deployment or Kubernetes/Openshift options we support. Both deploy Rasa X and your assistant.

### [One-Line Deploy Script](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id8)

The one-line deployment script is the easiest way to deploy Rasa X and your assistant. It installs a Kubernetes cluster on your machine with sensible defaults.

> - Default: Make sure you meet the [OS Requirements](/content/docs/rasa-x/installation-and-setup/one-line-deploy-script/#hardware-os-requirements/index.html), then run:
>
> ```
> curl -s get-rasa-x.rasa.com | sudo bash
> ```
>
> - Custom: See [Customizing the Script](/content/docs/rasa-x/installation-and-setup/one-line-deploy-script/#customizing-the-script/index.html)

### [Kubernetes/Openshift](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id9)

For assistants that will receive a lot of user traffic, setting up a Kubernetes or Openshift deployment via our helm charts is the best option.

> - Default: Read the [Deploying in Openshift or Kubernetes](/content/docs/rasa-x/installation-and-setup/openshift-kubernetes/index.html) docs.
>
> - Custom: Read the above, and also customize the [open source Helm charts](https://github.com/RasaHQ/rasa-x-helm).

## [Alternative Deployment Methods](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id10)

### [Docker Compose](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id11)

You can also run Rasa X in a Docker Compose setup.

> - Default: Read the [Docker Compose Quick Install](/content/docs/rasa-x/installation-and-setup/docker-compose-script/index.html) docs.
>
> - Custom: Read the docs [Docker Compose Manual Install](/content/docs/rasa-x/installation-and-setup/docker-compose-manual/index.html) documentation.

### [Rasa Open Source Only Deployment](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id12)

It is also possible to deploy a Rasa assistant without Rasa X using Docker Compose.

- [Building a Rasa Assistant Locally](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/rasa-tutorial/)
- [Building a Rasa Assistant in Docker](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/docker/building-in-docker/)
- [Deploying a Rasa Open Source Assistant in Docker Compose](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/docker/deploying-in-docker-compose/)

## [Deploying Your Action Server](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id13)

### [Building an Action Server Image](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id14)

To create your image:

> 1. Move your actions code to a folder `actions` in your project directory. 
> 2. Create a file named `Dockerfile` in your project directory.
> ```
> # Extend the official Rasa SDK image
> FROM rasa/rasa-sdk:1.10.3
> 
> # Use subdirectory as working directory
> WORKDIR /app
> 
> # Copy actions folder to working directory
> COPY ./actions /app/actions
> ```
> 3. You can then build the image via the following command:
> ```
> docker build . -t <account_username>/<repository_name>:<custom_image_tag>
> ```

### [Using your Custom Action Server Image](https://legacy-docs-v1.rasa.com/1.10.3/user-guide/how-to-deploy/#id15)

You can push the image to a cloud repository like DockerHub.

> To authenticate and push images to a different container registry, please refer to the documentation of your chosen container registry.
