<commit_before># Import data from Gitter (beta)

Zulip supports importing data from Gitter, including users, channels,
messages, attachments, and avatars.

!!! warn ""
    These instructions require shell access to the Zulip server. If you'd like
    to import a Gitter organization into the hosted zulipchat.com service,
    contact <EMAIL>.

First, you need to do some things in Gitter to setup the export:

1. [Export your Gitter data](https://github.com/minrk/archive-gitter). You will
   receive json files of the public rooms that you are a part of.
   Select the `gitter_data.json` file of the room which you want to import into
   Zulip.

    !!! warn ""
        **Note:** You'll need a gitter API token to export data. You can get
        this token by following the instructions in the
        [gitter documentation](https://developer.gitter.im/docs/).

### Import into a new Zulip server

!!! warn ""
    Because the Gitter import tool is very new, we recommend first
    upgrading your new Zulip server to the latest `master` branch,
    using [upgrade-zulip-from-git][upgrade-zulip-from-git] to avoid
    bugs in the earliest versions of the Gitter import tool.

Log in to a shell on your Zulip server as the `zulip` user. Run the
following commands.

```
./manage.py convert_gitter_data gitter_data.json --output converted_gitter_data
./manage.py import --destroy-rebuild-database '' converted_gitter_data
```

!!! warn ""
    **Warning:** This will destroy all existing data in your Zulip server

### Import into an existing Zulip server

If you already have some organizations hosted on your Zulip server,
and want to add import your Gitter data as a new Zulip organization,
you can use the following procedure.

Log in to your Zulip server as the `zulip` user. Run the following
commands, replacing `<subdomain>` with the subdomain of the URL
you'd like for your imported Zulip organization.
<commit_msg>user docs: Add import into zulipchat.com section to gitter import guide.<commit_after># Import data from Gitter (beta)

Zulip supports importing data from Gitter, including users, channels,
messages, attachments, and avatars.

First, you need to do some things in Gitter to setup the export:

1. [Export your Gitter data](https://github.com/minrk/archive-gitter). You will
   receive json files of the public rooms that you are a part of.
   Select the `gitter_data.json` file of the room which you want to import into
   Zulip.

    !!! warn ""
        **Note:** You'll need a gitter API token to export data. You can get
        this token by following the instructions in the
        [gitter documentation](https://developer.gitter.im/docs/).

### Import into zulipchat.com

Email <EMAIL> with `gitter_data.zip`.

### Import into a new Zulip server

!!! warn ""
    Because the Gitter import tool is very new, we recommend first
    upgrading your new Zulip server to the latest `master` branch,
    using [upgrade-zulip-from-git][upgrade-zulip-from-git] to avoid
    bugs in the earliest versions of the Gitter import tool.

Log in to a shell on your Zulip server as the `zulip` user. Run the
following commands.

```
./manage.py convert_gitter_data gitter_data.json --output converted_gitter_data
./manage.py import --destroy-rebuild-database '' converted_gitter_data
```

!!! warn ""
    **Warning:** This will destroy all existing data in your Zulip server

### Import into an existing Zulip server

If you already have some organizations hosted on your Zulip server,
and want to add import your Gitter data as a new Zulip organization,
you can use the following procedure.

Log in to your Zulip server as the `zulip` user. Run the following
commands, replacing `<subdomain>` with the subdomain of the URL
you'd like for your imported Zulip organization.

{'fraction_non_alphanumeric': 0.0753370340999207, 'fraction_numerical': 0.000528680941052075, 'mean_word_length': 3.7959442332065905, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1783220', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1055, 'n_words': 512}