# Inheriting discourse install - need some assistance

**URL:** https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505
**Category:** Self-hosting
**Created:** [December 20, 2017, 7:53pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505 "2017-12-20T19:53:03Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 20, 2017, 7:53pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/1 "2017-12-20T19:53:03Z")

</div>

So I took over a new position at a company, and we had been using Discourse - then moved to AnswerHub (🤷‍♂️) and I am probably going to move us back to Discourse.

I have used discourse before - but this install wasn’t really managed and no one knows what/how to access what’s currently running, and I need to get logged in and start Admin’ing it (it’s been set to Read Only).

I am trying to figure out where it’s being run on the box - I am not good with Docker but I have these instances:

```
   $ sudo docker images
   REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
   local_discourse/app latest --------------- 11 months ago 2.366 GB
   discourse/discourse 1.3.10 --------------- 11 months ago 1.539 GB
   discourse/discourse 1.3.5 --------------- 18 months ago 1.501 GB

```

What’s the easiest way to get in here and get access to the Admin?

Edit: I was able to enter the docker image (app) so that’s a start

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [December 20, 2017, 8:05pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/2 "2017-12-20T20:05:11Z")

</div>

```plaintext
cd /var/discourse
./launcher enter app
rake admin:create
exit

```

And probably (to upgrade to latest, but you’ll probably need to upgrade Docker too)

```plaintext
cd /var/discourse
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 20, 2017, 8:16pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/3 "2017-12-20T20:16:33Z")

</div>

Awesome - will that walk through a process to create a whole new Admin?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [December 20, 2017, 8:17pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/4 "2017-12-20T20:17:57Z")

</div>

The script is pretty flexible – it can create a new account for you, but if you give it the email address of an already existing user, it will grant that user admin privileges instead 🙂

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 20, 2017, 8:18pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/5 "2017-12-20T20:18:26Z")

</div>

got it - excellent. Thanks @fefrei and @pfaffman

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 20, 2017, 9:10pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/6 "2017-12-20T21:10:08Z")

</div>

So after performing the above, I had to upgrade Docker on my server. With that done, everything came back up. However, I performed

`./launcher rebuild app`

And after waiting ~7min it failed with the following being the last bits of the readout:

```
FAILED

--------------------

Pups::ExecError: cd /var/www/discourse &amp;&amp; ln -s /shared/uploads public/uploads failed with return #&lt;Process::Status: pid 3244 exit 1&gt;

Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'

exec failed with the params {"cd"=&gt;"$home", "cmd"=&gt;["mkdir -p public/forum", "cd public/forum &amp;&amp; ln -s ../uploads &amp;&amp; ln -s ../backups", "ln -s /shared/uploads public/uploads", "ln -s /shared/backups public/backups"]}

14a2deb1523549c18cc7c67e71ec4774f267df552dce399e61105dd3ef954dc0

**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

---

<div class="post-metadata">

### Author: ![nixie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nixie/32/82174_2.png) [@nixie](https://meta.discourse.org/u/nixie)
#### Post date: [December 20, 2017, 9:31pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/7 "2017-12-20T21:31:08Z")

</div>

@jerdog

Could you paste the output of these commands

`df -hP` (to check free space)  
`free -m` (to check free memory)  
`uptime` (to check load in the server)

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 20, 2017, 9:32pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/8 "2017-12-20T21:32:25Z")

</div>

i will as soon as a reboot works - after rebooting the server I’m not able to connect to it - it’s denying my ssh key - so working with my server team. 😕

---

<div class="post-metadata">

### Author: ![nixie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nixie/32/82174_2.png) [@nixie](https://meta.discourse.org/u/nixie)
#### Post date: [December 20, 2017, 9:33pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/9 "2017-12-20T21:33:44Z")

</div>

@jerdog  
Feel free to PM me if they aren’t able to bring it back up.  
I can help you if you need any assistance.

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 4:46pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/10 "2017-12-21T16:46:43Z")

</div>

Alright so to update here… after a bunch of smaller issues, I finally got back to the server and have re-ran `sudo ./launcher rebuild app` and here’s the last few screens:

```
Start compiling CSS: 2017-12-21 16:43:51 UTC

Compiling css for default 2017-12-21 16:43:51 UTC

precompile target: desktop Default

precompile target: mobile Default

precompile target: desktop_rtl Default

precompile target: mobile_rtl Default

precompile target: desktop 

precompile target: mobile 

precompile target: desktop_rtl 

precompile target: mobile_rtl 

Done compiling CSS: 2017-12-21 16:43:55 UTC

I, [2017-12-21T16:43:55.601570 #13] INFO -- : Purging temp files

Bundling assets

Compressing Javascript and Generating Source Maps

I, [2017-12-21T16:43:55.605198 #13] INFO -- : File &gt; /usr/local/bin/discourse chmod: +x

I, [2017-12-21T16:43:55.608262 #13] INFO -- : File &gt; /usr/local/bin/rails chmod: +x

I, [2017-12-21T16:43:55.611291 #13] INFO -- : File &gt; /usr/local/bin/rake chmod: +x

I, [2017-12-21T16:43:55.614115 #13] INFO -- : File &gt; /etc/update-motd.d/10-web chmod: +x

I, [2017-12-21T16:43:55.615837 #13] INFO -- : File &gt; /etc/logrotate.d/rails chmod: 

I, [2017-12-21T16:43:55.617538 #13] INFO -- : File &gt; /etc/logrotate.d/nginx chmod: 

I, [2017-12-21T16:43:55.620467 #13] INFO -- : File &gt; /etc/runit/1.d/00-ensure-links chmod: +x

I, [2017-12-21T16:43:55.623444 #13] INFO -- : File &gt; /root/.bash_profile chmod: 644

I, [2017-12-21T16:43:55.623611 #13] INFO -- : &gt; echo "Beginning of custom commands"

I, [2017-12-21T16:43:55.624942 #13] INFO -- : Beginning of custom commands

I, [2017-12-21T16:43:55.625256 #13] INFO -- : &gt; cd /var/www/discourse &amp;&amp; mkdir -p public/forum

I, [2017-12-21T16:43:55.627464 #13] INFO -- : 

I, [2017-12-21T16:43:55.627544 #13] INFO -- : &gt; cd /var/www/discourse &amp;&amp; cd public/forum &amp;&amp; ln -s ../uploads &amp;&amp; ln -s ../backups

I, [2017-12-21T16:43:55.629935 #13] INFO -- : 

I, [2017-12-21T16:43:55.630007 #13] INFO -- : &gt; cd /var/www/discourse &amp;&amp; ln -s /shared/uploads public/uploads

ln: failed to create symbolic link 'public/uploads/uploads': File exists

I, [2017-12-21T16:43:55.632215 #13] INFO -- : 

I, [2017-12-21T16:43:55.632491 #13] INFO -- : Terminating async processes

I, [2017-12-21T16:43:55.632581 #13] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 43

I, [2017-12-21T16:43:55.632690 #13] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 156

2017-12-21 16:43:55.632 UTC [43] LOG: received fast shutdown request

2017-12-21 16:43:55.632 UTC [43] LOG: aborting any active transactions

2017-12-21 16:43:55.632 UTC [50] LOG: autovacuum launcher shutting down

156:signal-handler (1513874635) Received SIGTERM scheduling shutdown...

2017-12-21 16:43:55.635 UTC [47] LOG: shutting down

156:M 21 Dec 16:43:55.657 # User requested shutdown...

156:M 21 Dec 16:43:55.657 * Saving the final RDB snapshot before exiting.

2017-12-21 16:43:55.676 UTC [47] LOG: database system is shut down

156:M 21 Dec 16:43:55.884 * DB saved on disk

156:M 21 Dec 16:43:55.884 # Redis is now ready to exit, bye bye...

FAILED

--------------------

Pups::ExecError: cd /var/www/discourse &amp;&amp; ln -s /shared/uploads public/uploads failed with return #&lt;Process::Status: pid 3256 exit 1&gt;

Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'

exec failed with the params {"cd"=&gt;"$home", "cmd"=&gt;["mkdir -p public/forum", "cd public/forum &amp;&amp; ln -s ../uploads &amp;&amp; ln -s ../backups", "ln -s /shared/uploads public/uploads", "ln -s /shared/backups public/backups"]}

4b44820ca7a1600d0687192790f721fb36267d7e8529b1a0107b9a0df2977b56

**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

any guidance here?

edit: looks like it’s failing here first on the custom commands:

```
I, [2017-12-21T16:43:55.630007 #13] INFO -- : &gt; cd /var/www/discourse &amp;&amp; ln -s /shared/uploads public/uploads

ln: failed to create symbolic link 'public/uploads/uploads': File exists

```

and then everything shuts down… what already exists is this:

` lrwxrwxrwx 1 discourse root 15 Dec 21 14:27 uploads -&gt; /shared/uploads`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 21, 2017, 4:59pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/11 "2017-12-21T16:59:02Z")

</div>

This is the problem:

> [@jerdog](#):
>
> ln: failed to create symbolic link ‘public/uploads/uploads’: File exists

Looks like you are dealing with a subfolder install.

Check our guide [Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507) and amend your yml file on the `containers` folder to follow it.

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 5:00pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/12 "2017-12-21T17:00:12Z")

</div>

Yeah just added to my thoughts above… let me have a peruse of that link

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 5:40pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/13 "2017-12-21T17:40:01Z")

</div>

We were already setup for folders correctly - it was actually due to creating symbolic links which already existed - so it failed. Now we’re back up… however, login is disabled due to being in read only mode. Any way to change this manually so I can login?

Edit: found this [How can Admin login while Read-only mode is enabled on multisite?](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976) and am checking it out

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 6:37pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/14 "2017-12-21T18:37:45Z")

</div>

Ran `discourse disable_readonly` and got the “The site is now fully operable.” message, but when I reload the browser it doesn’t let me login, saying it’s still in readonly mode. I performed a `./launcher reload app` and it is still in readonly mode

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 6:46pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/15 "2017-12-21T18:46:11Z")

</div>

Tried:

```
rails c
Discourse.disable_readonly_mode

```

And it returned  
`=> true`

No dice.

Tried:

```
rails c
Discourse.readonly_mode?

```

And it returned

```
=> true

```

Seems like it is locked in RO mode?

I went ahead and replied in here ([Stuck in 'Read Only' Mode - #10 by tgxworld](https://meta.discourse.org/t/stuck-in-read-only-mode/42820/10)) as what I am experiencing now is more in line with that topic

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 21, 2017, 7:01pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/16 "2017-12-21T19:01:06Z")

</div>

There are 3 different types of read only.

Try:

```plaintext
rails c
Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)
Discourse.disable_readonly_mode(Discourse::READONLY_MODE_KEY)
Discourse.disable_readonly_mode(Discourse::PG_READONLY_MODE_KEY)

```

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 7:08pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/17 "2017-12-21T19:08:43Z")

</div>

yeah I ran all 3 of those - and it stays out of read only mode (or at least doesn’t have the note at the top about being in read only mode), when I try to login it does this and stays there:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/3/e3481d12a46d9285378c5025fd1478a9dd66a83a.jpg)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 21, 2017, 7:09pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/18 "2017-12-21T19:09:55Z")

</div>

Looks like you have 0 enabled login methods 😄.

Go to `/u/admin-login` to login.

---

<div class="post-metadata">

### Author: ![jerdog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jerdog/32/122843_2.png) [@jerdog](https://meta.discourse.org/u/jerdog)
#### Post date: [December 21, 2017, 7:45pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/20 "2017-12-21T19:45:09Z")

</div>

Thanks for all your help. Looks like I am back in. Assuming I can just make it read only while still being able to login as Admin via that link above

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:43pm UTC](https://meta.discourse.org/t/inheriting-discourse-install-need-some-assistance/76505/21 "2024-06-08T12:43:45Z")

</div>

This topic was automatically closed after 2361 days. New replies are no longer allowed.
