android icon indicating copy to clipboard operation
android copied to clipboard

Support multiple servers

Open aminehmida opened this issue 7 years ago • 17 comments

It will be awesome if the app can connect to multiple servers at once. Can be kinda of poor man high availability implementation:

A script tries to send a notification to server1.com if it's down it tries server2.com and because the android client is connected to both, you still get the notification.

Thank you.

aminehmida avatar Nov 19 '18 00:11 aminehmida

Maybe it would be good, to have real support for high availability, with mirrored databases and stuff.

jmattheis avatar Nov 19 '18 16:11 jmattheis

I am in favour of having multi server and multi account support. Currently it's only possible to be signed in to one account@server.

sindastra avatar Aug 13 '19 05:08 sindastra

I came here to create this exact same issue 😄 I wish you could login on multiple servers at once and just merge all the notifications.

qdm12 avatar Sep 07 '19 00:09 qdm12

It would be really great to get pushes from multiple instances. For example, we have gotifyserver1 and gotifyserver2. They are all used for different needs, have different credentials, and so on. It would be nice to be able to receive messages from both independently (i.e. log in to gotifyserver1 and 2 at the same time and receive messages from both)

reinethernal avatar Jan 30 '20 11:01 reinethernal

Yes, it would be great to get notifications from several Gotify instances. That's the only feature missing that stops me from getting rid of Pushbullet (which is working as a service so I can push notifications wherever my hosted serviced are located). In my case I need to be able to receive notifications from server2 when server1 doesn't have access to the Internet (server1 and server2 are not on the same location).

fl0wfr avatar Apr 21 '20 12:04 fl0wfr

I up vote too! If you have multiple servers and you monitor them with separate Gotify instances there is no way to check notifications on all of the instances.

P.S. For those who want a quick fix, you can recompile the Android app with a different name, e.g. com.github.gotify2 (etc) to run separate servers on each app. Guide - https://forum.xda-developers.com/showthread.php?t=2760965

damnwalledgarden avatar Jun 06 '20 12:06 damnwalledgarden

Really needed in my case 👍

zethis avatar Sep 15 '20 08:09 zethis

Yes please, to be able to install gotify server for multiple customers and get notifications on my phone. I don't want to have to buy one phone per customer :-) so I'm not telling customers about gotify. I'm only interested in receiving notifications, I don't need to send them from the phone.

pmontrasio avatar Feb 18 '21 08:02 pmontrasio

If the application, instead of connecting to a server, allowed to connect to more than one... it could already be functional, I would try to name the servers to be able to know which one the notification comes from (so you would know which one is down).

It would be up to us to take care of it, from the application to manage it, when one server fails, send it to the other (if you have more than one, then continue until you find it). Using time::1647080628 could remove duplicates, that is, from android I don't know it would show the notification. So if you send it to 2 or more servers, nothing would happen.

Note: I think that with 2 servers it would be very useful, few notifications would be lost.

@jmattheis Is this where you can order new FEATURES? And how do you know if they will be taken into account?

Excuse the inconvenience.

MilorES avatar Mar 12 '22 09:03 MilorES

@MilorES I don't really know what you mean with "order new features", but you certainly can request features on this issue tracker. It is pretty unlikely that I will implement this specific ticket, because I don't need it.

I'm open to accept contributions to this project, but as this feature is a little bigger, we would need to first discuss how this should be implemented.

jmattheis avatar Mar 12 '22 11:03 jmattheis

My apologies.

I did not know the difficulty of adding a connection to a second gotify server in the android application, I have seen applications like nextcloud for android that allow it and show you the server that you are connected to and/or send you the notification. (I understand that there must also be many more developers or people who contribute).

I would love to be able to contribute, but my level of English is poor, since I use the translator (you should guess) and my level of programming at the moment is not enough.

I only came up with several ways to do it (without knowing the code or how to program it).

The simplest one I saw (which doesn't have to be), that the android application has a connection to a second server and that it shows all the notifications it receives. Let it be the APP, that is, the user who sends the notification that manages which gotify server to send it to.

MilorES avatar Mar 12 '22 11:03 MilorES

No problem, but you also have to rework the login process to allow multiple users, but otherwise I agree with how it should work.

jmattheis avatar Mar 12 '22 12:03 jmattheis

i'ld appreciate this too.

it would be possible to connect to a private gotify server and one at work with the same phone while connecting those two by scripts or notification chains is rather not considerable.

however the approach to recompile with another name could help, so i thought maybe you could publish a preview version under a different name like "gotify-preview".

this could help in multiple ways. those who want two servers can just do so by installing both, while those who want to test new versions/features before updating the one used as "live" environment one could too.

anyway thanks for all !

tobinq avatar Mar 29 '24 19:03 tobinq