<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to efficiently import ~16M users with custom fields?]]></title><description><![CDATA[<p dir="auto">Hi everyone,</p>
<p dir="auto">I’m working on a project where I need to import approximately 16 million users into a NodeBB forum.<br />
In addition to the standard fields, I also need to set some custom fields for each user during the import.</p>
<p dir="auto">I’ve already tried a few approaches:</p>
<ul>
<li>Direct writes to MongoDB (objects collection), but it seems there’s a lot happening under the hood when creating a user (hooks, hashes, plugins, etc.), and it’s almost impossible to replicate everything manually.</li>
<li>Using the Write API (POST /api/v3/users) works correctly, but it’s painfully slow at scale.</li>
<li>The CSV Import plugin doesn’t allow me to set the user’s creation date (timestamp), which is essential for my use case, so it’s not an option either.</li>
</ul>
<p dir="auto">Has anyone dealt with importing a very large number of users into NodeBB?<br />
Do you have any recommendations or best practices for this kind of task?</p>
<p dir="auto">Thanks in advance for any advice or ideas!</p>
]]></description><link>https://forum.fedi.dk/topic/edabd310-6534-462f-ab67-a39dbad257b0/how-to-efficiently-import-16m-users-with-custom-fields</link><generator>RSS for Node</generator><lastBuildDate>Tue, 25 Aug 2026 07:15:12 GMT</lastBuildDate><atom:link href="https://forum.fedi.dk/topic/edabd310-6534-462f-ab67-a39dbad257b0.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Jul 2025 09:56:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to efficiently import ~16M users with custom fields? on Tue, 08 Jul 2025 23:08:15 GMT]]></title><description><![CDATA[<p dir="auto">Somethings you can try:</p>
<ul>
<li>Bypass the write api and call <code>User.create</code> directly in a migration script.</li>
<li>One of the expensive parts of <code>User.create</code> is hashing the password, you can disable this part and force everyone to reset their password.</li>
<li>Disable sending a welcome notification everytime a user is created. [[code](<a href="https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L101" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L101</a>)]</li>
<li>Disable welcome email. [[code](<a href="https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L152-L157" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L152-L157</a>)]</li>
<li>Disable registration analytics. [[code](<a href="https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L98" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L98</a>)]</li>
<li>If all the usernames are unique in your data you can disable the unique name generator. [[code](<a href="https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L65-L70" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L65-L70</a>)]</li>
<li>Same as above but for emails, if all the emails are already unique you can disable the email available check. [[code](<a href="https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L152-L157" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/NodeBB/NodeBB/blob/master/src/user/create.js#L152-L157</a>)]</li>
</ul>
<p dir="auto">These are just some of the low effort ones.</p>
]]></description><link>https://forum.fedi.dk/post/https://community.nodebb.org/post/105112</link><guid isPermaLink="true">https://forum.fedi.dk/post/https://community.nodebb.org/post/105112</guid><dc:creator><![CDATA[baris@community.nodebb.org]]></dc:creator><pubDate>Tue, 08 Jul 2025 23:08:15 GMT</pubDate></item></channel></rss>