# How can Admin login while Read-only mode is enabled on multisite?

**URL:** https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976
**Category:** Support
**Created:** [Janvier 14, 2015, 8:36 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976 "2015-01-14T08:36:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![winterbox](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@winterbox](https://meta.discourse.org/u/winterbox)
#### Post date: [Janvier 14, 2015, 8:36 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/1 "2015-01-14T08:36:05Z")

</div>

I did restore on my secondsite(multisite), but Read-only mode is enabled.

How can I login? or How can I turn off Read-only mode?

I tried:

```
./launcher enter app
discourse disable_readonly

```

But nothing’s changed. (I tried `./launcher rebuild app` also)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [Janvier 14, 2015, 8:38 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/2 "2015-01-14T08:38:28Z")

</div>

Was there any error when you tried that?

Alternatively, you could try the following

```plaintext
./launcher enter app
rails c
Discourse.disable_readonly_mode

```

---

<div class="post-metadata">

### Author: ![winterbox](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@winterbox](https://meta.discourse.org/u/winterbox)
#### Post date: [Janvier 14, 2015, 8:41 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/3 "2015-01-14T08:41:39Z")

</div>

No there was no error

```
root@localhost-app:/# discourse disable_readonly
The site is now fully operable.

```

Here I did your instruction:

```
root@localhost:/var/discourse# ./launcher enter app
WARNING: No swap limit support
root@localhost-app:/# rails c
[1] pry(main)> Discourse.disable_readonly_mode
=> true

```

But still same situation 😖

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [Janvier 14, 2015, 8:44 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/4 "2015-01-14T08:44:43Z")

</div>

Are you sure you’re disabling readonly mode on the right site? I see you’re using multisite.

You need to do something like

```plaintext
./launcher enter app
RAILS_DB=<NAME_OF_THE_DB> rails c
Discourse.disable_readonly_mode

```

---

<div class="post-metadata">

### Author: ![winterbox](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@winterbox](https://meta.discourse.org/u/winterbox)
#### Post date: [Janvier 14, 2015, 8:45 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/5 "2015-01-14T08:45:54Z")

</div>

I did

```
root@localhost-app:/# discourse enable_readonly
The site is now in readonly mode.
root@localhost-app:/# discourse disable_readonly
The site is now fully operable.
root@localhost-app:/#

```

But it seems it only affects on the first site, not the second site.  
(For more info: I configured multisite, and I restored with backup data. Then it happened)

---

<div class="post-metadata">

### Author: ![winterbox](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@winterbox](https://meta.discourse.org/u/winterbox)
#### Post date: [Janvier 14, 2015, 8:49 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/6 "2015-01-14T08:49:26Z")

</div>

Yes I am using multistite.

I tried with the name of DB ‘secondforum’:

```
root@localhost-app:/# RAILS_DB=<secondforum> rails c
-bash: secondforum: No such file or directory

```

Would you provide any example of `<NAME_OF_THE_DB>` ?  
I followed [Multisite configuration with Docker](https://meta.discourse.org/t/multisite-configuration-with-docker/14084)  
I made it with `secondforum` instead of `b_discourse`

---

<div class="post-metadata">

### Author: ![winterbox](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@winterbox](https://meta.discourse.org/u/winterbox)
#### Post date: [Janvier 14, 2015, 9:01 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/7 "2015-01-14T09:01:22Z")

</div>

It finally worked with `secondsite` (not b\_discourse nor secondforum)

```
./launcher enter app
RAILS_DB=secondsite rails c
Discourse.disable_readonly_mode

```

Thank you 😀

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [Janvier 14, 2015, 10:11 UTC](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976/9 "2015-01-14T10:11:22Z")

</div>


