Install Plugins in Discourse

It might depend on the way it was set-up.

My localhost file doesn’t have that line yet works fine

## Plugins go here
## see for details
    - exec:
        cd: $home/plugins
          - git clone
          - git clone
          - git clone$
          - git clone
          - git clone
          - git clone$
#          - git clone
          - git clone$

My setup is on Digital Ocean droplet with one-click-install then updated to the last (v1.7.0.beta5 +192) version.

I’m going to add it. I just worried that it may be differ from version to version.

I appreciate your fast support dear @Steven and @Mittineague :sparkles:

1 Like

If I’m understanding the mkdir --help correctly, having the line whether needed or not shouldn’t hurt any.

mittineague@ubuntu:/var/discourse$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.
  -m, --mode=MODE   set file mode (as in chmod), not a=rwx - umask
  -p, --parents     no error if existing, make parent directories as needed
  -v, --verbose     print a message for each created directory
  -Z                   set SELinux security context of each created directory
                         to the default type
      --context[=CTX]  like -Z, or if CTX is specified then set the SELinux
                         or SMACK security context to CTX
      --help     display this help and exit
      --version  output version information and exit

7 posts were split to a new topic: Can I share the /plugins folder to make rebuild faster?

The problem is, because you’re using the HTTPS clone URL for your repository, it requires username and password authorisation.

1 Like

3 posts were split to a new topic: Syntax error in my YAML file

5 posts were split to a new topic: Plugin with custom gems

Sorry, but we are not having a container. Do we need that or is there a way to install a plugin without using a container?

If you are planning to use Discourse, you should follow the cloud install instructions.


@sam did this ever get solved?

No, perhaps by 2020, there is a lot of stuff on the plate.


If you separate the data and web containers you can bootstrap a new image without shutting down the running one.

1 Like

I have no clue what that means :man_shrugging:t2:

If you search for “data container” you’ll find


Hi, is this post still valid? I got the error below that the /user/.ssh directory doesn’t exist:

I, [2017-10-02T11:09:05.337068 #13]  INFO -- : > echo "Host\n\tStrictHostKeyChecking no\n" >> /user/.ssh/config
sh: 1: cannot create /user/.ssh/config: Directory nonexistent
I, [2017-10-02T11:09:05.344774 #13]  INFO -- : 

Pups::ExecError: echo "Host\n\tStrictHostKeyChecking no\n" >> /user/.ssh/config failed with return #<Process::Status: pid 13963 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "echo \"Host\\n\\tStrictHostKeyChecking no\\n\" >> /user/.ssh/config"
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Adding mkdir /user/.ssh before that didn’t work, so I’m honestly not even sure if my docker is running as user (having it run a whoami shows it’s running as root so I’m trying to change things to reflect that)…

UPDATE: Got it working

  1. Change all mentions of /user/ to /root/ (unless it’s not supposed to be running as root?!)
  2. Add mkdir /root/.ssh and chmod 700 ./root/.ssh before the .ssh/config file creation

So now I’m wondering if my docker running as root is a bad thing, or if the instructions above need to be updated just slightly.


^^^ The above post just stopped working for me, and now my forum is hosed.

I, [2017-11-30T06:18:58.231418 #13]  INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake db:migrate
I, [2017-11-30T06:19:15.940308 #13]  INFO -- : `/root` is not writable.
Bundler will use `/tmp/bundler/home/discourse' as your home directory temporarily.

Not sure why /root is not writeable, especially since my user is root… I’m going to try to chmod 700 it first. Otherwise I need to remove some of these custom commands I guess.

These are the commands that stopped working, it seems, from this comment:

  - exec: cd $home && sudo -E -u discourse bundle exec rake db:migrate
  - exec: cd $home && rm -fr tmp/cache
  - exec: cd $home &&  sudo -E -u discourse bundle exec rake assets:precompile

Confirmed. Remove those three commands above and we’re back in business. Hopefully the plugins I was installing are still working. They seem to be.

Hey @sam, I just did a ./launcher bootstrap multy on a multisite instance and it failed the same way.

I’ve not checked any other instances yet, but it may be worth a look.

edit: I had about 5.5GB of space after the last rebuild. I did a ./launcher cleanup and rebuilt again and it was successful.


Think this was the real fix? run a cleanup? And I can uncomment my above three lines causing problems and try again?

I don’t know. It was for me. If you’ve got many plugins it could be that the 5GB guestimate of necessary space is wrong.

How much space do you have?

Don’t think that’s my issue:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           396M   16M  380M   4% /run
/dev/vda1        58G   35G   24G  61% /
tmpfs           2.0G  2.8M  2.0G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/vda15      105M  3.4M  102M   4% /boot/efi
none             58G   35G   24G  61% /var/lib/docker/aufs/mnt/12341d6ba5aa3bd27228268df48de97876b386123dd45983eca3a25623788956
shm              64M     0   64M   0% /var/lib/docker/containers/a0a92872e0bd966418d371c3e7a56c399dfd4d5046c59677548d6215f271bd0c/shm
none             58G   35G   24G  61% /var/lib/docker/aufs/mnt/82352ad3ae221b769b5efd1f08d6d28fd3347ae52efac77a20bb939935be5567
shm              64M     0   64M   0% /var/lib/docker/containers/d6655eb54f481c124caf4b33cd95774dd3d1aad80b21ee0ca0a1dbd04f0b0248/shm
tmpfs           396M     0  396M   0% /run/user/1000