Moving an in-house chat system into Mattermost with bulk import
Moving years of history from an internal or unsupported chat tool into a self-hosted Mattermost is done by generating bulk import JSONL from your old data and loading that file with the documented bulk import path. The effort depends mainly on how clean the source data is: consistent user identifiers, stable channel names, readable timestamps and attachments that still exist on disk will shorten the work, while orphaned messages, duplicate accounts and undocumented schema changes will lengthen it. Bulk import loads teams, channels, users, memberships, notification preferences, posts, replies, reactions, file attachments, direct and group messages, permission schemes, custom emoji and bot users, so the data you map must be shaped to those object types before anything is loaded.
No vendor importer exists for a custom tool. The Slack and Rocket.Chat paths documented by Mattermost each depend on a known export format, and a homegrown system has none. That means the export, the transformation into JSONL and the attachment handling are custom build work, normally owned by the client's engineers or a partner they engage, and it recurs whenever the source schema or the target version changes. Ask your team to confirm who owns the mapping logic, who maintains it after the first run, and how the source database will be read without disturbing the live system. Check the Mattermost bulk import documentation for the exact JSONL fields and the import command before you estimate the build.
Plan for validation runs on a copy of the target server, not on production. Each run should be repeated until counts of teams, channels, users and posts match the source, attachments resolve, and sample conversations render correctly for a user who was active in them. Expect some data to stay behind, including items the bulk import format does not carry, so record what is excluded and tell users before cutover. Ask any proposed partner for the validation checklist, the reconciliation report format, the handling of users who never signed in, and the process for re-running the import when the source changes between trial and final load.
Which source chat data maps to Mattermost and which does not
This table compares the chat objects most in-house tools hold against the object types Mattermost bulk import documents. Read each row as a question: if your source has the object, confirm the migration note before you plan the export. Objects without a documented bulk import type need a decision on whether to rebuild them, archive them or leave them behind.
| Source object | Bulk import support | Migration notes to confirm in the source |
|---|---|---|
| Users | Yes | Confirm unique usernames, email addresses and deactivated accounts. Decide how passwords or SSO identities will be re-established after import. |
| Teams | Yes | Map each source workspace or group to a Mattermost team. Confirm whether one source space holds several logical groups that need separate teams. |
| Channels | Yes | Confirm public versus private status, channel names that must meet Mattermost naming rules, and whether archived channels should be imported or skipped. |
| Channel and team memberships | Yes | Confirm who held admin, moderator or member roles in the source. Roles will need to be reassigned to match your permission schemes. |
| Posts | Yes | Confirm timestamps, time zones and the message text format. Check how mentions, links and formatting were stored, since they may need conversion. |
| Replies and thread structure | Yes | Confirm how the source links replies to a parent post. Flat chats with no parent reference will import as separate posts, not threads. |
| Reactions | Yes | Confirm whether reactions are stored per user with timestamps. Custom reaction names must exist as emoji in the target before they display correctly. |
| File attachments | Yes | Confirm where files are stored (database, local disk or object storage), their original names and sizes. Attachments are supplied alongside the JSONL file, so the source files must be exported separately. |
| Direct and group messages | Yes | Confirm how conversations are identified and which participants are included. Group messages and one-to-one messages may need separate handling in the file. |
| Custom emoji | Yes | Confirm the image files, names and any licensing limits on the emoji. Names that clash with standard emoji need a rename plan. |
| Bot users | Yes | Confirm which automated accounts are real bot users and which are integrations. Integration tokens and webhook URLs do not carry over and must be recreated. |
| Notification preferences | Yes | Confirm which per-user notification settings exist in the source. Settings that Mattermost does not model will be dropped. |
| Permission schemes | Yes | Confirm which access rules the source enforces, such as who can post, create channels or manage members. Rebuild these in Mattermost before relying on imported roles. |
| Edit history and deleted messages | Not applicable | Bulk import is not documented to carry edit history or deleted message records. Confirm how the source flags deletions and decide whether to import only current content. |
| Integrations and webhooks | Not applicable | Not part of the documented bulk import object types. Inventory every integration and plan to rebuild it against the Mattermost API or webhook settings. |
Documented import paths and the tools that feed them
Mattermost documents a load path, not a universal converter. The bulk import JSONL file and the mmctl upload step are the fixed end of the pipeline, while the exporter and transformation in front of them depend on where your history lives. The cards below separate what Mattermost provides from what your team must build.
Bulk import JSONL as the load format
Bulk import reads a JSONL file in which each line describes one object, such as a team, channel, user, post or reply. Your transformation must emit these records in the order and shape Mattermost expects, with references between objects resolved by name. Check the object types your source can supply before you write any code, because the format accepts only what it defines.
Bulk import docsmmctl upload and processing step
The load itself runs through mmctl, which uploads the JSONL file and any attachments and then processes them on the server. Plan for a trial import against a non-production server, and record the output of each run so that failed lines can be traced back to specific source records. Confirm the mmctl version matches your target server before you rely on the commands in your runbook.
Custom exporter for your source
No Mattermost tool reads an arbitrary in-house chat schema, so your team or a partner must write the exporter that extracts users, channels, membership and message history from the source database or API. Decide early how you will handle edited messages, deleted content, threads and orphaned records, because the exporter defines what the import can represent.
Transformation written for your schema
The transformation step converts exported records into bulk import JSONL and copies attachments into a layout the import expects. This code is the part most likely to carry defects, since it maps your identifiers, timestamps and time zones onto Mattermost's model. Require a validation pass that counts each object type on both sides before the target is accepted.
mmetl for Slack and Rocket.Chat sources
mmetl is the documented transformer for Slack and Rocket.Chat sources. Its code paths target those products' export formats, so it does not apply to an in-house schema without substantial change. Treat it as a reference for conventions, and confirm its current behavior against the version you intend to run.
Slack migration as a pattern
The documented Slack path follows export, transformation into bulk import JSONL with attachments, then upload with mmctl. Borrow this sequence and its checkpoints as a planning template for your own pipeline, not as a tool you can reuse. Slack integrations are not carried in its export, and you should expect the same kind of gap in your source, so list those losses before the project starts.
Sequence from inventory to decommission
This sequence moves users, channels and message history from an in-house chat tool into Mattermost in controlled stages, so each stage has a documented owner, a reviewed output and a point where the client signs off before the next one starts. The client keeps the old system live until retention obligations are met.
Inventory users, channels and attachments
DeployOpen works with the client's chat administrators and records, security and HR contacts to list every user account, team or channel, direct and group conversation, and attachment store in the old tool. The client confirms which channels are in scope, which users map to identities in the target directory, and which data sets carry retention or legal hold obligations. The step closes when the client signs off a written inventory and an agreed list of excluded data.
Build the exporter and JSONL generator
DeployOpen writes the export job that reads the old tool's database or API and the converter that produces a Mattermost bulk import JSONL file, mapping users, teams, channels, memberships, posts, replies, reactions and file references to the supported object types. The client supplies database read access or API credentials and confirms how deleted messages, edits and private channels should be handled. The step closes when the converter runs end to end on a sample export and the mapping document is approved.
Run a pilot import on a non-production server
The converted JSONL and attachments are loaded into a non-production Mattermost server with the same authentication model planned for production. DeployOpen runs the bulk import with mmctl, watches processing output and checks a representative set of channels, threads and attachments in the client's review group. The client confirms that authentication, user matching and channel membership behave as expected. The step closes when the pilot import completes and the client accepts the pilot results in writing.
Validate with reviewed error output
DeployOpen runs repeated validation loads from fresh exports, each time collecting the import error output and the counts of users, channels, posts and files on both sides. Each error class is traced to a source record and either fixed in the generator or accepted as a documented exclusion by the client. The client reviews the error log and the reconciliation report. The step closes when the final validation run has no unexplained errors and the exclusion list is signed off.
Operate a parallel run
The old tool and the new Mattermost server both stay live for a period the client sets, with a named group testing daily work in Mattermost and the client's support team tracking questions, access issues and missing history. DeployOpen monitors import-related support tickets and confirms that new identity provisioning works for users who only exist in the target. The client decides what must be fixed before cutover. The step closes with a go or no-go decision recorded by the client's owner of the migration.
Cut over with a final delta load
The client freezes writes in the old tool for an agreed window. DeployOpen exports only the changes since the last full validation load, converts them with the approved generator, imports them and repeats the reconciliation counts. Users are redirected to Mattermost and the old tool is set to read-only. The step closes when the delta reconciliation matches the frozen source and the client confirms users can sign in and find their history.
Decommission the old tool after retention
The old system stays in read-only archive form until the client's records, legal and security teams confirm that retention requirements are met. DeployOpen then helps remove access, export a final archive for the records team if required, and shut down the old service and its storage in a documented order. The client approves the decommission record and the archive location. The step closes when the old tool is removed and the archive and decommission evidence are filed with the client.
How the JSONL file is built and loaded
The bulk import file is a JSONL file, and each line describes one object, such as a team, a channel, a user, a membership, a post or a reply. Objects refer to one another by name or identifier, so the file has to be written in dependency order: teams and users exist before the channels that contain them, channels exist before the memberships and posts that sit inside them, and parent posts exist before their replies. Your conversion script is therefore the core of the project. Before writing it, confirm the exact object types, required keys and reference rules against the Mattermost bulk import documentation, because the field names are specific and a single wrong key can stop a whole load. Attachments are not inline text. They travel in a separate folder alongside the JSONL file, and each file reference in a post must match the path of the attachment as the import expects it. Decide early how your legacy system's attachment storage maps to that folder structure, and test one thread with an attachment before converting the full history.
The mmctl command line tool is how the file is uploaded and processed on the Mattermost server. Run the upload and the import processing against a test server first, using a non-production copy of your Mattermost instance with the same major version you plan to run in production. Use that run to confirm user and team mappings, channel membership, timestamps, threaded replies and attachment links, and to measure how long processing takes on a representative slice of data. Keep a record of each run, including the file version, the script version and the server version, so that a failed load can be diagnosed and repeated. Confirm the exact mmctl subcommands, flags and processing options for your server version in the official documentation, since these change between releases and should not be taken from a blog post or an older runbook.
What drives the cost and duration of a custom import
A custom import costs most in the work that happens before the first load: understanding the source, mapping it to Mattermost objects, and proving the result in repeated validation runs. Each driver below affects one-time build effort, recurring delta loads, or both, so ask for each one to be scoped separately in any quote.
Source database quality and consistency
A homegrown tool often has undocumented tables, nullable foreign keys, duplicate usernames and messages stored with mixed encodings. Every irregularity found during exploration adds exporter logic and test cases before any JSONL is produced. Ask the quote to state how the source schema will be profiled and who signs off on known data defects.
Volume of history and attachments
Message count and attachment size drive export time, transformation runtime, storage for staged files and the duration of each upload and processing run. Attachments must be copied and referenced alongside the JSONL, so large file stores add transfer and verification work. Ask for estimated object counts and total attachment size from your own environment before agreeing a schedule.
Number of object types to transform
Each object type you need, such as teams, channels, users, memberships, posts, replies, reactions, direct messages, permission schemes, custom emoji or bot users, needs its own mapping rules and checks. Importing fewer types reduces build effort, but anything left out must be carried another way or accepted as lost. Ask for a written list of in-scope object types with the source field and target field for each.
Identity mapping to the SSO provider
Users in the source system must match identities in your identity provider so that imported posts attach to the right accounts after login. Mismatched emails, renamed accounts and service accounts require a documented mapping table and a decision on who is created, who is skipped and who is merged. Confirm with your identity team how Mattermost sign-in will be configured before the user object mapping is finalized.
Permission and channel scheme mapping
Source roles such as owner, moderator or read-only must be translated into Mattermost team and channel roles and, where needed, permission schemes. Public, private and archived channels each need a rule for who becomes a member and which settings are preserved. Ask the quote to list how each source role and channel type maps, and which mappings need a decision from your security or records owner.
Validation cycles and cutover reruns
Each validation cycle loads a copy into a test server, compares counts and samples threads, and returns defects to the exporter or transformer. The number of cycles is the least predictable cost, so plan for at least one pilot and one full rehearsal before cutover. Ask for a named validation plan that states the acceptance checks, the test environment, and who approves each cycle.
Questions buyers ask before importing a custom chat history
Can our own engineers do a bulk import from an in-house chat system?
Yes, if your team can read the source data and write a conversion script that produces Mattermost bulk import JSONL. The work is mostly data mapping: users, channels, memberships, posts, replies, reactions and attachments each need to be translated into the object types Mattermost's bulk import documents. Teams usually underestimate three areas: the source schema is often undocumented, user identities must match the accounts that will exist in Mattermost, and validation runs take several passes before the file loads cleanly. Ask whether anyone on your team has done a bulk load before and who will own the script after the first run.
What drives the cost of importing custom chat history?
The cost follows the complexity of the source system and how much of its history you need. The main drivers are the number of object types you must carry over, how well the source schema is documented, the volume and format of attachments, how many identity sources must be matched to Mattermost accounts, and how many trial runs the team expects before go-live. Mattermost licensing is a separate cost: Mattermost sells prepaid annual subscriptions by seat count and does not publish prices, so confirm the plan you need with Mattermost sales. Ask any implementation partner for a fixed-scope quote that lists the object types, the source access assumed, the number of validation runs and the cutover support included.
How long does a chat history import take?
The duration depends on the size of the history, the quality of the source data and how many validation cycles you run. Extraction and conversion are usually the shortest steps. Schema discovery, mapping rules for users and channels, and repeated trial imports into a non-production server take the most time. Attachment handling adds work when files are stored outside the database or in a format that needs rewriting. Ask for a timeline that separates discovery, conversion, trial runs, cutover and post-import checks, and confirm which of those steps depend on your team's availability.
What must we provide before an import engagement starts?
Plan to provide the following before any conversion work begins:
- Schema documentation or a database dump for the source chat system, including how messages, threads, reactions and files are stored
- Read access to the source data and its attachment storage in a copy suitable for testing
- A current user list with identity attributes that match your sign-in provider, plus the rules for deactivated or departed staff
- Retention rules that state which channels, direct messages and time ranges must be kept or excluded
- A target Mattermost server, with a named owner for permission schemes and team structure
What cannot be imported into Mattermost from a custom system?
Mattermost bulk import covers teams, channels, users, memberships, notification preferences, posts, replies, reactions, file attachments, direct and group messages, permission schemes, custom emoji and bot users. Anything outside that list needs a decision before the project starts. Integrations and their configurations are typically not carried over, and the Slack migration documentation states plainly that integrations are not in the export and cannot be migrated. Source-specific features such as proprietary message formats, custom workflows or data stored only in the vendor's application layer will need a mapping, a manual rebuild or an accepted loss. Confirm each source feature against the bulk import documentation before you promise it to users.
Do we need a parallel run after importing our chat history?
A parallel run is worth planning when people will keep using the old system during the transition or when records must be reconciled. Many teams load the history into a non-production Mattermost server first, check it against the source, and then run a final import at cutover. Where the old system stays live, decide early whether new messages will be copied, whether users will work in both tools for a set period, and who signs off that the imported data matches. Ask your provider to describe how the trial runs, the cutover load and any post-cutover delta will be handled, and what evidence will be kept for your records team.
Which security and retention checks should we run on imported data?
Before loading production data, review what the export contains and who can see it. Confirm that deleted or restricted content is excluded according to your retention rules, that direct messages from departed staff are handled as policy requires, and that attachments with sensitive content are reviewed before they enter a shared channel. Check that imported users are linked to your identity provider so that access follows your existing controls, and that permission schemes match your access model. Mattermost's compliance and retention documentation is the place to confirm how retention and legal hold apply after import.
What usually goes wrong with custom chat imports
Custom chat exports rarely map cleanly onto Mattermost. The risks below share one root cause: the source system stored data in a shape nobody documented, so the import silently drops or misplaces it. Each card names the check that catches the problem before cutover.
Lost thread structure
Replies can arrive as flat posts with no link to their parent, so threads collapse into a long channel timeline. Confirm how your source system stores reply relationships and map parent identifiers to the replies and root_id fields in the JSONL. Then open a sample of busy threads on the trial server and compare them with the original.
Users who cannot sign in
Identity mismatches block sign-in even when the import succeeds. If the username or email in the JSONL does not match the value your identity provider returns, the account exists but the user cannot reach it. Review the identity mapping table with the owners of your SSO provider and test a sign-in for each user group before the import runs on production.
SAML SSO docsAttachments that fail to resolve
Message files often reference paths, URLs or storage keys that do not exist in the import package. The post loads, but the attachment is broken or missing. Inventory every attachment reference in the source, confirm each file is present in the package, and spot-check download links on the trial server after processing.
Incomplete history after cutover
Teams often import a snapshot and then keep using the old tool, so messages sent during the gap never reach Mattermost. Agree a freeze date for the source system, run a final incremental import if your process supports it, and document which history was intentionally left behind so users are not surprised.
Permissions that do not match
Access in the old system may rely on group rules or private spaces that have no direct equivalent. Imported permission schemes and memberships can grant too much or too little access. Map each source role to a Mattermost permission scheme on paper, then verify private channel membership and admin rights with test accounts.
Unrepeatable validation
A single import run on production leaves no safe way to fix mistakes. Run the full process repeatedly against a copy of the target server, record each error and count of skipped records, and only promote the import when two consecutive trial runs produce the results you expect. Ask your partner to show how each run was logged.
How source data flows into Mattermost during the import
The import starts in your in-house chat database and attachment store, where a custom exporter writes users, channels and posts out in a neutral form. A JSONL generator converts that output into Mattermost bulk import lines, while attachments are staged in a folder that keeps their paths matching the file references. Those files move to the Mattermost server through mmctl, and the processing results return to the generator so the team can fix mapping errors and run the import again. Everything up to the upload stays inside your infrastructure, so check that no export step leaves that boundary.
Data moves from the source systems through generation and staging to the Mattermost server, with errors returning to the generator.
What a bulk import cannot carry over
Bulk import only loads the object types Mattermost documents for it: teams, channels, users, memberships, notification preferences, posts, replies, reactions, file attachments, direct and group messages, permission schemes, custom emoji and bot users. Anything outside that list cannot be loaded through the JSONL file, so each object your in-house tool holds must be assigned a fate before the pilot starts: recorded in an archive the organization keeps, rebuilt as Mattermost configuration, or dropped by an explicit decision. Every object outside the list needs a named owner and one of those three outcomes.
Integrations and bots are the gap teams most often underestimate. Webhooks, slash commands, outgoing hooks and scripts that post into your old tool will not follow the data, and their replacements in Mattermost must be built and tested separately, usually through the integrations guide and the REST API. Inventory every service that reads from or writes to the old system, including monitoring alerts, CI notifications and scheduled reports, and record for each whether it is retired, rewired to a Mattermost webhook or bot, or kept on the old tool. Confirm the bot accounts you plan to import are the ones you actually need, since orphaned bots create ownership questions after cutover.
Custom features with no Mattermost equivalent, such as bespoke message types, approval flows, workflow state or unusual threading and permission rules, will arrive as plain posts or not at all. Ask the owners of the in-house tool to list those features and any data the source cannot export reliably, such as deleted content, edit history, or records stored outside the message database. Where the source cannot produce a complete export, confirm the gap with a written decision that states what is missing, who accepted the loss, and whether a separate archive will hold it. Get these decisions signed off before the pilot so the trial runs test the migration you will actually perform.
How DeployOpen works on this
DeployOpen scopes the import as a fixed-scope engagement, starting from a written inventory of what your custom chat system stores. We build the JSONL transformation, test it through repeated trial runs in a copy of your target Mattermost, and hand over the tooling and runbook that your team can reuse.
How we scope
- We inventory users, teams, channels, posts, replies, reactions, attachments and direct messages in your current chat system.
- We record which data types the bulk import format supports and which must be left behind or rebuilt manually.
- The written scope names source systems, target Mattermost version, data volumes, exclusions and acceptance checks before work starts.
How we build
- We write the export and transformation scripts that produce bulk import JSONL files and copy attachments into the file store layout.
- We run validation passes against a non-production Mattermost server and fix mapping errors in user, channel and team identifiers.
- We plan trial runs with timed cutover rehearsals so your team sees the exact import sequence before production.
How we hand over
- You receive the transformation code, configuration files and the validation reports from each trial run.
- You receive a runbook covering the mmctl import commands, file upload steps, rollback points and post-import checks.
- Documentation records every known gap, such as lost integrations or unsupported object types, so owners can decide what to accept.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after the import is complete.
- We can rerun the transformation against a fresh export if source data changes before cutover.
- Support covers Mattermost version changes that affect the import format, so later upgrades do not break your migration tooling.

