# Can we safely insert users directly into separate Discourse databases?

**URL:** <https://meta.discourse.org/t/can-we-safely-insert-users-directly-into-separate-discourse-databases/362851>\
**Category:** Support\
**Created:** [April 21, 2025, 7:55pm UTC](https://meta.discourse.org/t/can-we-safely-insert-users-directly-into-separate-discourse-databases/362851 "2025-04-21T19:55:58Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![emonunix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/emonunix/32/485652_2.png) [@emonunix](https://meta.discourse.org/u/emonunix)\
**Post date:** [April 21, 2025, 7:55pm UTC](https://meta.discourse.org/t/can-we-safely-insert-users-directly-into-separate-discourse-databases/362851/1 "2025-04-21T19:55:58Z")

</div>

Hey everyone,

We’re running multiple Discourse forums as isolated instances on the same virtual machine. Each forum has its own separate Postgres database, but they’re all managed by a shared script that runs on the host machine.

We’re looking to automate the creation of initial users during setup. Rather than using the API or CSV importer, we’re wondering:

> 💡 Is it possible (and safe) to insert user records directly into each instance’s database?

Since our script already interacts with the databases, this could streamline the provisioning process significantly.

Has anyone attempted direct DB user creation before? Or is this a bad idea due to risks with data integrity, sessions, or other Discourse-specific mechanisms?

Appreciate any advice or experience you can share!

---

_[View the full topic](https://meta.discourse.org/t/can-we-safely-insert-users-directly-into-separate-discourse-databases/362851)._
