cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.87k stars 242 forks source link

Configure default homeserver #64

Closed gnouts closed 2 years ago

gnouts commented 3 years ago

I'd like to selfhost Cinny. I have my own Synapse homeserver. I'd like to point Cinny to my homeserver by default, so my users don't have to change it everytime they connect.

It would be nice to have an environment variable. As a lot of other projects do : first read env variable in shell, then read a config file, else use default value.

BBaoVanC commented 3 years ago

just FYI it can be done right now by editing the source code:

diff --git a/src/app/templates/auth/Auth.jsx b/src/app/templates/auth/Auth.jsx
index a8837ab..26ec301 100644
--- a/src/app/templates/auth/Auth.jsx
+++ b/src/app/templates/auth/Auth.jsx
@@ -202,7 +202,7 @@ function Auth({ type }) {
                 forwardRef={homeserverRef}
                 id="auth_homeserver"
                 placeholder="Homeserver"
-                value="matrix.org"
+                value="boba.best"
                 required
               />
             </div>
hifi commented 3 years ago

It would be nice to have an environment variable. As a lot of other projects do : first read env variable in shell, then read a config file, else use default value.

It's not technically possible for a static hosted web application to read an env variable. It needs to read a config file over XHR like Element does for configuration.

gnouts commented 3 years ago

Thanks for the tips @BBaoVanC I'll probably do that in the meantime.

@hifi Ok I didn't know that. I guess a config file is still nice to have.