add intro documentation and user guide

This commit is contained in:
Tanmay Deep Sharma
2025-05-29 19:29:32 +05:30
parent f429db89b4
commit 7808634432
203 changed files with 8020 additions and 7794 deletions
@@ -0,0 +1,69 @@
---
title: Backing Up Your Chatwoot Installation
description: Complete guide to backing up and restoring your Chatwoot installation data
sidebarTitle: Backup
---
Backups are crucial for any software system, including Chatwoot, for several reasons:
1. **Disaster Recovery**: Backups serve as your safety net in the event of catastrophic incidents like hardware failure, data center outage, or natural disasters. They allow you to restore your application to its previous state quickly.
2. **Data Loss Prevention**: Accidental data deletion or alteration due to human errors, software bugs, or malicious attacks can lead to significant losses. Backups provide a way to recover such lost or corrupted data.
3. **Audit and Compliance**: Certain regulations require businesses to maintain backups for a specific period. These backups may serve as reference points for audits or compliance checks.
4. **Business Continuity**: In situations where your primary data source becomes unavailable, having a backup allows your business to continue its operations with minimal disruption.
In short, backups are an essential part of risk management and ensure the smooth operation of your software system.
## What Data Should Be Backed Up?
- [Postgres Database](#postgres-database)
- [Storage (File uploads/Other Assets in Your Installation)](#storage)
- [Configuration Variables](#configuration)
- [Code Customisations](#code-customisations)
### Postgres Database
If you are managing the Postgres service yourself, you can use the `pg_dump` tool provided by PostgreSQL for this purpose.
```bash
pg_dump -U postgres -W -F t chatwoot_production > backup.tar
```
If you are using a managed provider like AWS, Google Cloud, or Azure, enable backups using the options provided by your provider.
### Storage
Based on your [storage configuration](/docs/self-hosted/configuration/environment-variables#configure-storage), you should take the appropriate steps.
If you are using a managed provider like `S3`, `GCS`, etc., ensure backups using the options available with the provider.
If you are using the `local` storage provider, ensure to take a disk backup of the `storage` folder in the root of your Chatwoot Installation.
### Configuration
Important configuration might be stored in environment variables. You should back these up as well.
Make a copy of the `.env` file or keep a backup of these configurations based on your setup.
### Code Customisations
Official Chatwoot updates using tools like `cwctl` assume that there are no customisations done to the Chatwoot installation. We don't provide support for custom modifications of the Chatwoot codebase. If you are planning any such modifications, please ensure that you back up these customisations using `git` or other appropriate tooling.
## Guidelines
The frequency of backups largely depends on the nature of your application and the amount of data you generate and can afford to lose. You can opt for `continuous` or `daily` backups as per your need.
<Warning>
Remember, these backups should be stored in a different physical location to protect against hardware failures. Using a cloud storage provider could be a good solution. Please ensure that access to these backups is tightly controlled, as they contain sensitive data.
</Warning>
## Restoring a Backup
To restore a backup into a new Chatwoot installation, please follow these steps:
- Set up a new Chatwoot installation and finish the onboarding flow.
- Ensure that the [configuration](#configuration) values match the ones in your backup.
- Purge the database of this installation and replace it with the data from your [postgres](#postgres-database) backup.
- Restore [Storage](#storage) with your backup data.
- Restore any [Code Customisations](#code-customisations).
- Restart Chatwoot services and you are good to go.
@@ -0,0 +1,64 @@
---
title: Upgrading your Chatwoot installation
description: Step-by-step guide to upgrade Chatwoot across different deployment methods
sidebarTitle: Upgrade
---
## Linux VM
Whenever a new version of Chatwoot is released, use the following steps to upgrade your instance.
<Note>
To install `cwctl`, refer [this](#install-or-upgrade-chatwoot-cli) section below.
</Note>
<Note>
If you are on an older version of Chatwoot(< 2.7), follow the [manual upgrade steps](/docs/self-hosted/deployment/linux-vm#upgrading-to-a-newer-version-of-chatwoot) if you face errors with `cwctl`.
</Note>
```bash
cwctl --upgrade
```
This upgrade method is applicable for all manual linux installations including installation using aws marketplace.
## Docker
Update the images using the latest image from chatwoot.
```bash
docker-compose down
docker-compose pull
docker-compose up -d
```
Run the `rails db:chatwoot_prepare` option after accessing the console from one of the containers running the latest image.
```bash
docker exec -it $(basename $(pwd))-rails-1 sh -c 'RAILS_ENV=production bundle exec rails db:chatwoot_prepare'
```
## Helm(Kubernetes)
This upgrade guide is applicable for Chatwoot DigitalOcean 1-click k8s app and any other Kubernetes deployment using `charts`.
Do `helm repo update` and check the version of charts that is going to be installed. Helm charts follows semantic versioning and so if the MAJOR version is different from your installed version, there might be breaking changes. Please refer to the changelog before upgrading.
```bash
# update helm repositories
helm repo update
# list your current installed version
helm list
# show the latest version of charts that is going to be installed
helm search repo chatwoot
```
```bash
#if it is major version update, refer to the changelog before proceeding
helm upgrade chatwoot chatwoot/chatwoot -f <your-custom-values>.yaml
```
## Heroku
1. Pull the latest changes from Chatwoot github repo to your fork. Use the fetch upstream changes feature on Github.
2. Deploy the latest branch to your heroku app.