Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I change environment variable ROOT_URL when using snap package? #6691

Closed
ogra opened this issue Apr 14, 2017 · 6 comments
Closed

How can I change environment variable ROOT_URL when using snap package? #6691

ogra opened this issue Apr 14, 2017 · 6 comments

Comments

@ogra
Copy link

ogra commented Apr 14, 2017

Rocket.Chat Version: 0.54.2
Running Instances:
DB Replicaset OpLog:
Node Version:

I installed Rocket.Chat by

snap install rocketchat-server

on Ubuntu 16.04 LTS.

How can I change environment variable ROOT_URL so that the server runs in a subdirectory?
I tried editing /etc/environment and /etc/systemd/system/snap.rocketchat-server.rocketchat-server.service as shown below, but they don't work. ROOT_URL with a running server is still http://localhost when I check it by the following command.

sudo od -S1 -An /proc/2730/environ

(2730 is node server's pid.)

/etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
ROOT_URL="https://live.oguradio.com/rc/"

/etc/systemd/system/snap.rocketchat-server.rocketchat-server.service

[Service]
EnvironmentFile=/etc/rocketchat_envvars.txt

/etc/rocketchat_envvars.txt

ROOT_URL="https://live.oguradio.com/rc/"
@rivertam
Copy link

I'm also looking to see how one can change an environment variable, though in my case I would like to specify an external mongo database.

For your usecase, I believe you should be using nginx or something similar, and you can use it to proxy to the rocketchat server.

@MartinSchoeler
Copy link
Contributor

We aim to keep our Github issues for bugs and feature requests. This does not fit that criteria.
Please see our guidelines for support. If you feel like we are closing in error, please re-open and add additional details about the bug or feature request.

@nickbroon
Copy link

nickbroon commented Nov 28, 2017

For anyone that's searching this looks like it's probably related to #4971

@LuluGO
Copy link
Contributor

LuluGO commented Apr 9, 2019

@githubber
Copy link

While this page (https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/#how-do-i-change-other-environmental-variables-in-my-snap) points out that changing env variables is possible, it doesn't help with the syntax on changing the site_url.

@AdriWild
Copy link

AdriWild commented Nov 6, 2019

It doesn´t work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants