# How can I deploy my Hexabot Project? ### Introduction This documentation explains how to deploy your Hexabot project using two different methods: 1. [**Method 1: Using Nginx as a service and Certbot for SSL**](how-can-i-deploy-my-hexabot-project.md#using-nginx-as-a-service-and-certbot-for-ssl) 2. [**Method 2: Using Dockerized Nginx and Certbot services**](how-can-i-deploy-my-hexabot-project.md#using-dockerized-nginx-and-certbot-services) ### Pre-requisites Before starting, ensure you have the following: #### **Step 1: Server Requirements** * A server running a Linux distribution with SSH enabled. * These instructions are based on Ubuntu, so adapt as needed for other distributions. #### Step 2: Install Required Software * #### Install Docker {% content-ref url="../developer-guide/setting-up-docker-for-development-and-production.md" %} [setting-up-docker-for-development-and-production.md](../developer-guide/setting-up-docker-for-development-and-production.md) {% endcontent-ref %} * #### Install NPM {% include "../.gitbook/includes/untitled.md" %} *** #### Step 3: Setup Hexabot project 1. Install the Hexabot CLI: ```bash npm install -g hexabot-cli ``` 2. Create new project: ```bash hexabot create my-chatbot cd my-chatbot/ ``` Or clone an existing project of yours: ```bash git clone git@github.com:YOUR_ORG/my-chatbot.git cd my-chatbot/ ``` 3. Environment Setup: To configure the environment variables, use the following command: ```bash hexabot init ``` This command will copy the `.env.example` file to `.env` in the `./docker` directory if the file does not already exist 4. Update your `.env` file for production, especially the following ones:
Variable Name | Example Value | Env variable description | |
---|---|---|---|
NODE_ENV | prod | Environment Mode | |
APP_DOMAIN | mychatbot.ai | Application Domain Name | |
API_ORIGIN | https://mychatbot.ai/api | The API endpoint will be used to communicate with the backend | |
FRONTEND_BASE_URL | https://mychatbot.ai:8080 | The API endpoint will be used to communicate with the frontend | |
FRONTEND_ORIGIN | http://mychatbot.ai, https://mychatbot.ai | The origins that will be accepted by the API. A list of permitted origins for cross-origin requests | |
JWT_SECRET | 346998ba1f171f107433 | Secret to encrypt JWT token | |
SESSION_SECRET | 27feaf70d2c78892bf49 | Secret to encrypt session token | |
HTTPS_ENABLED | true | Https setting | |
INVITATION_JWT_SECRET | 51c8ea00d82eb10ee226 | Secret to encrypt invitation token | |
PASSWORD_RESET_JWT_SECRET | 5ee97916017176d1ca6c | Secret to encrypt reset password token | |
CONFIRM_ACCOUNT_SECRET | 80f74dce70e5385bf80b | Secret to encrypt confirm account token | |
MONGO_USER | my_mongo_username | Mongodb username | |
MONGO_PASSWORD | my_mongo_password | Mongodb password | |
AUTH_TOKEN | c97643c1c1e5e9dc5745 | Secret to encrypt NLU token | |
NEXT_PUBLIC_API_ORIGIN | https://mychatbot.ai/api | Next.js API endpoint |