The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 27

Deploy rocket chat without domain

Description

I want to deploy rocket chat in my internal network without using domain name.

hence, my users will use it with IP link, eg: http://1.2.3.4/

I’ve change the ROOT_URL in docker-compose.yml to my IP link, and update /etc/nginx/sites-available/default to listen on port 80 and server_name 1.2.3.4

but I can’t complete the create admin account wizard, the browser hanged after click submit and after that, when I tried to login with admin account, it said “wrong password”

What can I do?

services:
  rocketchat:
    image: rocket.chat:latest
...
    environment:
      - PORT=3000
      - ROOT_URL=http://1.2.3.4:3000
...
server {
	listen 80 default_server;
	listen [::]:80 default_server;
	server_name 10.133.219.188;

        location / {
            proxy_pass http://localhost:3000/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Nginx-Proxy true;
            proxy_redirect off;
        }
}

Server Setup Information

  • Version of Rocket.Chat Server:
  • Operating System: Ubuntu 18.04
  • Deployment Method: docker
  • Number of Running Instances: 1
  • MongoDB Version: 4.0
  • Proxy: nginx
  • Firewalls involved: No

Any additional Information

update, fresh install, using a Windows Client in 10.133.219.x range to test connect to my rocket chat instance at 10.133.219.188:3000

still hanged at setup-wizard

Chrome network error log:

66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971 [Deprecation] The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
getDesktopPermission @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973 Error: No callback invoker for method 2
    at 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
    at Array.forEach (<anonymous>)
    at M._process_updated (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736)
    at M._processOneDataMessage (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736)
    at M._livedata_data (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736)
    at u (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973)
    at 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
    at 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:1
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
/node_modules/@rocket.chat/fuselage-ui-kit/dist/fuselage-ui-kit.production.js:1 fuselage-ui-kit version: 0.28.0
66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973 Error
    at originalCallback (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971)
    at Object.processTwoFactorError (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971)
    at Object.o [as error] (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971)
    at s (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30)
    at Object.fireWith [as rejectWith] (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30)
    at E (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30)
    at XMLHttpRequest.<anonymous> (66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30)
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:1
Promise.then (async)
n.then @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:692
t @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
sendMessage @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
apply @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
call @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
o.call @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
eval @ /client/providers/ServerProvider.js:1
s @ /client/providers/ServerProvider.js:1
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
q @ /client/views/setupWizard/steps/AdminUserInformationStep.js:1
ee @ /client/views/setupWizard/steps/AdminUserInformationStep.js:1
Ve @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
Ze @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
er @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
Kn @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
Jn @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
ze @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
$e @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
to @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
lt @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
ft @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
t.unstable_runWithPriority @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:586
pc @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
De @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
it @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30 POST http://10.133.219.188:3000/api/v1/method.callAnon/registerUser net::ERR_EMPTY_RESPONSE
send @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30
ajax @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:30
u @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
_jqueryCall @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
a._jqueryCall @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
async function (async)
a._jqueryCall @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
post @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
post @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
t @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
sendMessage @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
apply @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
call @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:736
o.call @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:971
eval @ /client/providers/ServerProvider.js:1
s @ /client/providers/ServerProvider.js:1
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:973
q @ /client/views/setupWizard/steps/AdminUserInformationStep.js:1
ee @ /client/views/setupWizard/steps/AdminUserInformationStep.js:1
Ve @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
Ze @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
er @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
Kn @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
Jn @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
(anonymous) @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
ze @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
$e @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
to @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
lt @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
ft @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
t.unstable_runWithPriority @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:586
pc @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
De @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568
it @ 66eaa3be98974e118b931b4c4ec6172ce4ec8f05.js?meteor_js_resource=true:568

Hey !

I’m on my phone - so the formatting might be off here and there.

You want you and others to access rc through the IP address.

If you’re using IP to access the instance, why use an extra webserver like nginx at all? From your compose file, the instance should be accessible at http://1.2.3.4:3000 - isn’t that enough?

If you want to use rc at port 80, exclude the port section from ROOT_URL and instead of binding to 3000, bind the container’s port to the host’s 80.

1 Like

http://1.2.3.4:3000 - isn’t that enough

my users live on another network range, say 5.6.7.0/24
IT Dept only allow connect through port 80 from 5.6.7.0/24 to 1.2.3.4

If you want to use rc at port 80, exclude the port section from ROOT_URL and instead of binding to 3000, bind the container’s port to the host’s 80.

I’m tend to not touch so much about how rocket chat work, so I use an external nginx instance to reverse proxy from http://1.2.3.4/ to http://1.2.3.4:3000/

I’ve updated question, although I connect directly to rocket chat instance on port 3000, the same issue occured.
Do you have any idea about that?

Hi!

You can try to bypass the wizard by adding the env variable in your docker-compose:

  • OVERWRITE_SETTING_Show_Setup_Wizard=completed

Not sure why you had this problem, but it may be a solution for now.

1 Like