Server migration

Migrate the database from one type to another in the web admin console. Migration works in any direction between SQLite, MySQL, PostgreSQL and SQL Server.

1. When to migrate

HelpChat Server uses an SQLite database by default. It works out of the box and suits teams of up to 50 people. When the number of online users grows or you need more concurrency, you can migrate to MySQL, PostgreSQL or SQL Server. You can also migrate from an external database back to SQLite.

Database typeDefault portUse case
SQLite—Up to 50 people, nothing extra to install, no configuration
MySQL3306Medium to large deployments; MySQL 8.0 or MariaDB 10.6+ recommended
PostgreSQL5432Cases with strict data consistency requirements
SQL Server1433Windows Server environments, integration with an existing SQL Server

2. Steps

Enter maintenance mode first

Make sure no users are online during migration. If maintenance mode is not on, the system shows a reminder.

In the left menu of the admin console, click "Database maintenance" and open the "Migrate" tab. The page has two columns: the left shows the current database (type, version, size, connections), and the right holds the target database settings.

1. Choose the target database type: the database type currently in use is excluded, so only possible targets are shown.

2. Enter the connection details (when migrating to MySQL / PostgreSQL / SQL Server)

FieldDescriptionExample
HostIP address or domain name of the database server127.0.0.1
PortDatabase port (the default for the type is filled in automatically)3306
UsernameDatabase login userroot
PasswordDatabase login password••••••
Database nameName of the target database (must be created beforehand)helpchat

Info

When migrating to SQLite, you do not need to fill in these fields. The database file is created automatically in the imdata/ directory.

3. Test the connection: for MySQL / PostgreSQL / SQL Server, click "Test connection" first and continue only after "Connection succeeded" is shown.

4. Options: if you select "Update the configuration file automatically after migration", the system writes the target database's connection details to config/helpchatsvr.ini, so you do not need to edit it by hand.

5. Start the migration: click "Start migration". The system first backs up the current database automatically, then writes all data to the target database and shows live progress.

3. After migration

When the migration is complete, restart the HelpChat Server service so the new database settings take effect.

If you did not select "Update the configuration file automatically" before migrating, edit the [database] section of config/helpchatsvr.ini by hand: set type to the target database type and fill in the matching connection details.

4. Notes

Migration does not delete any data in the original database; the original database stays as it was. If you find a problem after migrating, change the database type in config/helpchatsvr.ini back to the original value and restart the service to roll back.

Chat files (imdata/data/) and cloud drive files (imdata/cloud/) are stored in the file system, independent of the database type, and are not affected by migration.

Tip

To back up or restore the database, see Data backup.