Installing on Plesk Onyx using the docker

Hello,

Forgive me firstly for sounding a bit dumb but I am looking for tutorial on how to install Rocket.Chat on Plesk Onyx 17 using the docker as I a have no real idea how this is supposed to be done because when I install the docker I get and error with ‘Accounts_AvatarStorePath’ not allowed lower case letters.

So I am really looking for someone that can help me install Rocket.Chat from within Plesk using the docker system and what if any other dockers I may need and what to do to get Rocket.Chat preferably running on a https:// on a sub domain.

So you know I can install it and have it up and running, without any problems, on a separate server with just Ubuntu 16.04LTS (No Plesk) but I really want to have it running just on the one server that I am using Plesk Onyx that runs all of my websites.

I would really appreciate any help with setup and settings as I have spent hours doing the normal Google searches for a how to guide but there seems nothing out there for this type of install.

Thanks.

I managed to get it all installed and running now.

I just have one problem now from what I can see.

With Avatars resizing

I get the message: The image resize will not work because we can not detect ImageMagick or GraphicsMagick installed on your server.

I have installed both on my server and added /usr/bin/convert to the PATH settings (Hoping it would find it) like this /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/convert.

But it’s still not working!

2018-01-06_14-11-07|690x438

Any help would be appreciated

Figured it out there seems to be an issue with that docker image.

Switched to the other image and all working

Just to follow up with what happened here.

The official community managed docker image is missing imagemagick.

So rocket.chat is missing.
rocketchat/rocket.chat has it.

Issue here for reference: https://github.com/RocketChat/Docker.Official.Image/issues/39

Hey @TonyB and @aaron.ogle - Don’t suppose that anyone can point me into the right direction on how to successfully get RocketChat working on my Plesk server?

I clearly didn’t get nearly as far as @TonyB did, lol.

What issues are you having @ejs?

What have you done so far?

It will help narrow down what the problem is with more information from your end, like what your server is, OS installed and version and so on.

Thanks

We’re running Ubuntu 16.04 on an Amazon EC2 instance with Plesk.

I installed Docker and found the image, but have no clue where to go from there… I let it use the default settings and hit run but couldn’t connect to it at all. Ideally, I’d like to just have it run off of a subdomain of one of our domains on the server (chat.example.org) but don’t know if i have to create that subdomain in Plesk, or change DNS settings or something…

I’m also not sure how to use Plesk to get a LetsEncrypt cert for the Docker image (if that’s even possible…)

OK for me to get it work in Plesk Onyx I had to do a few things differently to get it to work correctly.

Firstly get the image of Rocker chat that you have installed removed so you have nothing installed in the Docker panel.

Make sure you have your domains and sub domains added to the Plesk panel you should be able to auto secure with Letsencrypt. If your domains dns is manged externally via you registrar then you will need to point them to your Plesk panels IP address.

Once you have that done then you will install the needed docker files via the CLI using Putty or whatever you are happy using.

Then if you run these commands:

docker run --name db -d mongo:3.0 --smallfiles

docker run --name rocketchat --link db -d rocketchat/rocket.chat:latest

mongodb://db:27017/rocketchat

You can test to see if Rocket Chat is working by going to your IP address IE: https://101.101.101.101:3000

Once it has installed you will then need to go back to the Plesk panel and Docker and you can add the values for your sub domain.

Go to your sub domain and add the docker port options and you should then be able to view Rocket Chat via your sub domain.

This is how I had to do it on Plesk.

If you need any more help just ask

1 Like

Hi,

mongodb://db:27017/rocketchat gives me a No such file or Directory error?

Sorry that bit needs to go in you rocket chat docker settings not run as a command.

It will be the MONGO_URL setting in the docker.

Also if you get an error from Accounts_AvatarStorePath just change it to ACCOUNTS_AVATARSTOREPATH

Thanks its working now!

No problem happy to help

1 Like

Ok, So I SSH’d into the server and ran the first command (docker run --name db -d mongo:3.0 --smallfiles) and got the following error:

docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/containers/create?name=db: dial unix /var/run/docker.sock: connect: permission denied.
See ‘docker run --help’.

Are you running the commands as root?

So I ran the commands with sudo and that got everything installed. I replaced the MONGOURL with the one you provided and everything was up and running. I then opened up TCP port 3000 and was able to connect.

Next step was to change the Docker Proxy settings for the subdomain, and that worked fine as well. Then when I logged in, it asked me if I wanted to change the site URL and I said yes… and it just sat and froze.

I tried manually changing the ROOT_URL in Plesk, but now all it does is give me a DB connection error. I’ve even deleted and started from scratch and it just doesn’t want to budge.

/app/bundle/programs/server/node_modules/fibers/future.js:313
						throw(ex);
						^
MongoError: failed to connect to server [db:27017] on first connect [MongoError: connection 0 to db:27017 timed out]
    at Pool.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:336:35)
    at emitOne (events.js:116:13)
    at Pool.emit (events.js:211:7)
    at Connection.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:280:12)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Connection.emit (events.js:214:7)
    at Socket.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:199:10)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at Socket.emit (events.js:208:7)
    at Socket._onTimeout (net.js:407:8)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

Can you send me a couple of screenshots of the 2 dockers Mongo & Rocket settings.

Ok, funny story. After like a good minute it seems to come up and actually work now…

Not to say it’s completely bug-free… I’m having a great time figuring out why it doesn’t want to deal with our SMTP server or why I can’t get iOS apps to connect to it. But at least it’s running. It just sits there for quite some time debating whether or not it wants to load…

How many instances do you have running on yours? If there’s more than one do you just use like port 3000, 3001, 3002 and then the same database?

I have found on all installs of the chat it can sometimes take a while for everything to start, However they all start within a minute.

A lot will depend on what the spec of your server is and what else you have running to be honest.

I have a few running on one server and only single installs on other servers it all depends on the number of users that are going to be using the chat.

I just use random port numbers and just make a note but it really does not matter in my installs.

I only tend to use the docker if my clients want custom installs (Styling options and so on) that are not auto updated, all the rest are on snap installs.

As I use digital ocean & ovh it all depends on what I have to install on if I use a dedicated or VPS.

I’m running Amazon EC2 (mainly because plesk had a pretty lucrative “come try us” deal with them at the end of last year). The server seems to be running well within spec on a t2.small instance.

If I were to add a second or third Rocket Chat instance, would I just use Docker via the Plesk GUI to make another one, or use the “docker run --name rocketchat --link db -d rocketchat/rocket.chat:latest” command?

Also, have you had any issues with the iOS or android apps not working with your installed instances? The information I’m getting on GitHub seems to point towards the Docker Proxy that Plesk has not doing it’s job right?

https://github.com/RocketChat/Rocket.Chat/issues/10618

Thanks for all your insight on this! I wish they had a straightforward “this is how to make Rocket Chat install easily on Plesk” article.