# عدة نسخ. زيارة النسخة الثانية تسجل الخروج من الحساب المسجل في النسخة العاملة

**URL:** <https://meta.discourse.org/t/multiple-instances-visiting-the-second-instance-signs-out-the-logged-in-account-on-the-running-instance/112393>\
**Category:** Development\
**Created:** [23 مارس 2019، 2:23ص UTC](https://meta.discourse.org/t/multiple-instances-visiting-the-second-instance-signs-out-the-logged-in-account-on-the-running-instance/112393 "2019-03-23T02:23:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Young\_Nam](https://avatars.discourse-cdn.com/v4/letter/y/ea666f/32.png) [@Young\_Nam](https://meta.discourse.org/u/Young_Nam)\
**Post date:** [23 مارس 2019، 2:23ص UTC](https://meta.discourse.org/t/multiple-instances-visiting-the-second-instance-signs-out-the-logged-in-account-on-the-running-instance/112393/1 "2019-03-23T02:23:52Z")

</div>

**EDIT after resolved** : This happened when I open the second Discourse instance, not when I start the server.

* * *

I have two Discourse directories. I followed the following guide to install it.:

> [@Install Discourse on Ubuntu or Debian for Development](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727):
>
> warning This guide covers installation instructions in a development environment. For a production guide see: [Install Discourse in production with the official supported instructions](https://meta.discourse.org/t/how-to-install-discourse-in-production/142537) So you want to set up Discourse on Ubuntu or Debian to hack on and develop with? We’ll assume that you work locally and don’t have Ruby/Rails/Postgres/Redis installed on your Ubuntu or Debian system. Let’s begin! Requirements We suggest having at least 4 GB RAM and 2 CPU cores. Current compatibility: O…

So, the first one, say,

```plaintext
cd ~/discourse
bundle exec rails server --binding=0.0.0.0

```

is running okay, I can sign in, create my topics, etc.

Then I run another Dicsourse instance after changing the `config/database.yml` to use different ‘database’ name and run it on different port:

```plaintext
cd ~/discourse2
bundle exec rails server -p <different-port> --binding=0.0.0.0

```

It does create those databases additionally. And it runs, sure. But when I visit the first instance that’s been running and refresh, I’m signed out from it. I can log in into the second instance, and start my thing there. And when I log into my first instance, it signs me out from the second instance.

And now I’ve tried running Discourse on Docker, it runs, but when I visit `localhost` and I get the “Register page”, I’m logged out from the running Discourse.

I’m not trying to use one account for two instances.

How do I keep each account signed-in on its own Discourse instance? (Account ‘foo’ on ‘discourse’ and account ‘bar’ on ‘discourse-2’ instance)

---

_[View the full topic](https://meta.discourse.org/t/multiple-instances-visiting-the-second-instance-signs-out-the-logged-in-account-on-the-running-instance/112393)._
