A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)

Overview

gotify/server

Build Status codecov Go Report Card Matrix Docker Pulls latest release

Intro

We wanted a simple server for sending and receiving messages (in real time per WebSocket). For this, not many open source projects existed and most of the existing ones were abandoned. Also, a requirement was that it can be self-hosted. We know there are many free and commercial push services out there.

Features

Gotify UI screenshot

  • send messages via REST-API
  • receive messages via WebSocket
  • manage users, clients and applications
  • Plugins
  • Web-UI -> ./ui
  • CLI for sending messages -> gotify/cli
  • Android-App -> gotify/android

Get it on Google Play Get it on F-Droid

(Google Play and the Google Play logo are trademarks of Google LLC.)


Documentation

InstallConfigurationREST-APISetup Dev Environment

Contributing

We welcome all kinds of contribution, including bug reports, feature requests, documentation improvements, UI refinements, etc. Check out CONTRIBUTING.md for guidelines.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details

Comments
  • Problem with Edge browser and reverse proxy configuration

    Problem with Edge browser and reverse proxy configuration

    I have a strange problem.

    I can "not" login with Edge (W10) and proxy configuration. I will be logged out after less than a second.

    On the same W10 machine i tested this:
    
    Firefox 65 accessing mydomain.com:8080 ok *1
    Firefox 65 accessing mydomain.com/gotify ok *2
    
    Edge (W10) accessing mydomain.com:8080 ok *1
    Edge (W10) accessing mydomain.com/gotify NOT ok *2
    

    For a very short moment you can see a login and than you are back in the login screen.

    *1 No proxy at all *2 Apache Reverseproxy configuration as advised.

    [GIN] 2019/03/11 - 14:32:10 | 200 |  165.006785ms |   195.111.111.111 | POST     /client
    [GIN] 2019/03/11 - 14:32:10 | 200 |     784.661µs |   195.111.111.111 | GET      /current/user
    [GIN] 2019/03/11 - 14:32:10 | 403 |     536.698µs |   195.111.111.111 | GET      /stream?token=CAXhS2a_6Njwnqt
    Error #01: websocket: request origin not allowed by Upgrader.CheckOrigin
    [GIN] 2019/03/11 - 14:32:10 | 200 |    1.225617ms |   195.111.111.111 | GET      /message?since=0
    [GIN] 2019/03/11 - 14:32:10 | 404 |      89.282µs |               ::1 | GET      /gotify/current/user
    [GIN] 2019/03/11 - 14:32:10 | 200 |    2.978808ms |   195.111.111.111 | GET      /application
    [GIN] 2019/03/11 - 14:32:10 | 404 |      53.934µs |               ::1 | GET      /gotify/client
    

    ge

    Any ideas?

    question 
    opened by pm-pm 37
  • Setup in Lamp Server

    Setup in Lamp Server

    Hi, I Just install this on Lamp server via Docker Image some live sites are there

    while running this below command

    docker run -p 8080:8080 -v /var/gotify/data:/app/data gotify/server
    

    I got this below errors

    docker: Error response from daemon: driver failed programming external connectivity on endpoint laughing_liskov 
    
     Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use.
    
    question 
    opened by mskian 37
  • Plugin Support

    Plugin Support

    This fixes #51 This fixes #69

    I will implement the proposal we discussed in #51 progressively. Here's a checklist:

    • [x] Backend Database Storage for Plugins
    • [x] Global Configuration Item
    • [x] Plugin base interface
    • [x] Plugin loader infrastructure && base plugin APIs
    • [x] Webhooker
    • [x] Configor
    • [x] MessageSender
    • [x] WebUI

    Before merge:

    • [x] Documentation gotify/website -> https://github.com/gotify/website/pull/2
    opened by eternal-flame-AD 37
  • Frequent Websocket and TCP Keep Alives keep LTE connection open and drain battery

    Frequent Websocket and TCP Keep Alives keep LTE connection open and drain battery

    Hi,

    I have installed Gotify on an Ubuntu 18.04 server VM, no docker, no proxy, straight forward. The server works well but I notice that there is frequent TCP traffic, around every 10 seconds between the server and the Android client. This keeps the LTE connection to the network constantly in RRC-Connected state and has a significant impact on battery use.

    I ran a Wireshark trace, see screenshot attach which shows that this is caused by two thing:

    WebSocket keep alives (ping/pong) TCP keepalives

    Both keepalives are always triggered from the servers side.

    Note: Other messaging systems such as Prosody/Conversations/XMPP only send tcp-keep alive messaging every 7-10 minutes. This is way more batter efficient.

    Are there any settings to adapt Gotify's keep alive messaging frequency?

    Thanks, Martin

    2020-07-28_13-50-Gotify-tcp-ack and websocket ping

    a:feature 
    opened by heurekus 24
  • Pluggable extensions

    Pluggable extensions

    It would be nice to have pluggable extensions for Gotify. This could f.ex. be used for polling the GitHub Notification API.

    • Golang Plugin API or some kind of JavaScript engine to enable pluggable code
    • ? Allow adding routes something like /plugin/:name/... (overkill ?!?)
      • Could be useful for webhooks
    • ? Users can enable plugins
    • ? Key-Value per user for configuration (f.ex authentication token)
    a:feature in:server request-for-comments 
    opened by jmattheis 22
  • Error 401 when sending token through body or header key in lowercase

    Error 401 when sending token through body or header key in lowercase

    Can the issue be reproduced with the latest available release? (y/n) Yes

    Which one is the environment gotify server is running in?

    • [x] Docker
    • [ ] Linux machine
    • [ ] Windows machine
    Docker startup command or config file here (please mask sensitive information)

    Docker compose file

    version: "3"
    
    services:
      gotify:
        image: gotify/server
        ports:
          - 8087:80
        environment:
          - GOTIFY_DEFAULTUSER_PASS=password
          - TZ=Europe/Paris
        volumes:
          - "./data:/app/data"
        labels:
          com.centurylinklabs.watchtower.enable: "true"
    

    Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)

    • [ ] None
    • [ ] Apache
    • [x] Nginx
    • [ ] Caddy
    Reverse proxy configuration (please mask sensitive information)
    I use Nginx Proxy Manager
    

    On which client do you experience problems? (Select as many as you can see)

    • [ ] WebUI
    • [ ] gotify-cli
    • [ ] Android Client
    • [x] 3rd-party API call (Please include your code)

    What did you do?

    I try to send gotify message through the notification system of Synology. After many fails attempt, I have tested my request with Postman.

    When I'm sending the following request with Postman:

    {
      "token": "my-token",
      "title": "BlackBox",
      "priority": 5,
      "message": "Un nouvel événement système s'est produit sur votre BlackBox le 02/09/2021 à 10:36.\nMessage test de BlackBox"
    }
    

    I got the following error:

    {
        "error": "Unauthorized",
        "errorCode": 401,
        "errorDescription": "you need to provide a valid access token or user credentials to access this api"
    }
    

    If I use the header key instead (X-Gotify-Key), it works.

    a:bug 
    opened by Salamafet 18
  • Fix websocket reconnect logic

    Fix websocket reconnect logic

    The code is obsolete now that there is the improved auto reconnect function

    It also did never actually work anyway. This will call listen with an undefined callback, thus leading to the following error and effectively preventing the client from reconnecting automatically.

    TypeError: e is not a function WebSocketStore.ts:33:33

    opened by quthla 17
  • Reverse proxy usage still not working with subpath in url (still static URL in code?)

    Reverse proxy usage still not working with subpath in url (still static URL in code?)

    Still the webinterface is not working (white page) in reverse proxy konfiguration when you use a SUBPATH in URL like "https://mydomain.com/gotify" Looks like "/static/..." and maybe some other pathes have still leading "/"

    --- apache
    ProxyPass        /gotify         http://localhost:86
    ProxyPassReverse /gotify         http://localhost:86
    
    [06/Mar/2019:14:04:05 +0100] "GET /gotify HTTP/1.1" 200 1071 "-"
    [06/Mar/2019:14:04:06 +0100] "GET /static/css/main.99a0ea00.css HTTP/1.1" 404 561 "https://mydomain.com/gotify"
    [06/Mar/2019:14:04:06 +0100] "GET /static/js/main.93537239.js HTTP/1.1" 404 559 "https://mydomain.com/gotify"
    
    question 
    opened by pm-pm 16
  • Connect MYSQL

    Connect MYSQL

    Hi I have little bit confusion in config.yml setup I want to connect MYSQL instead of SQLite I created a File on /etc/gotify/ location

    docker run -p 8080:80 -v "`pwd`:/etc/gotify/" -v /var/gotify/data:/app/data gotify/server
    

    Outptut

    panic: dial tcp 127.0.0.1:3306: connect: connection refused
    
    goroutine 1 [running]:
    main.main()
    	/proj/app.go:47 +0x4bb
    
    
    gotify:[email protected]/gotifydb?charset=utf8&parseTime=True&loc=Local
    
    question 
    opened by mskian 15
  • Tables failed to initialize on MariaDB

    Tables failed to initialize on MariaDB

    Initial installation and configuration directions do not show that specific mysql configuration values need to be set for the following issue:

    (Error 1709: Index column size too large. The maximum column size is 767 bytes.) [2019-03-15 19:09:51]

    More details about how to fix the issue are in https://stackoverflow.com/questions/24853828/index-column-size-too-large-the-maximum-column-size-is-767-bytes-for-int-dat

    a:bug in:server 
    opened by rerobins 15
  • Proxy error with docker

    Proxy error with docker

    Hi,

    Now, Gotify works in my docker container. But, I've a reverse proxy with my apache2. Sadly, I've a 502 Proxy Error. The is my VH:

    <VirtualHost *:80>                                                                
            ServerName push.blabla.fr                                               
            Redirect / https://push.blabla.fr/                                      
            ServerSignature Off                                                       
            #RewriteEngine on                                                         
            #RewriteCond %{SERVER_NAME} =push.blabla.fr                             
            #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]  
    </VirtualHost>                                                                    
                                                                                      
    <VirtualHost *:443>                                                               
            ServerName push.blabla.fr                                               
            SSLEngine On                                                              
            ProxyPass "/" http://127.0.0.1:2083/ retry=0 timeout=5                    
            ProxyPassReverse / http://127.0.0.1:2083/                                 
            ServerSignature Off                                                       
                                                                                      
            CustomLog /var/log/apache2/blabla_access.log combined                       
            ErrorLog /var/log/apache2/blabla_error.log                                  
                                                                                      
            Include /etc/letsencrypt/options-ssl-apache.conf                          
            Include /etc/letsencrypt/options-ssl-apache.conf                          
            SSLCertificateFile /etc/letsencrypt/live/push.blabla.fr/fullchain.pem   
            SSLCertificateKeyFile /etc/letsencrypt/live/push.blabla.fr/privkey.pem  
    </VirtualHost>        
    

    Does anybody a idea ?

    question 
    opened by monsieurpouet 15
  • Gotify Notification for unattended-upgrades

    Gotify Notification for unattended-upgrades

    Have you read the documentation?

    • [X] Yes, but it does not include related information regarding my question.
    • [ ] Yes, but the steps described in the documentation do not work on my machine.
    • [ ] Yes, but I am having difficulty understanding it and wants clarification.

    You are setting up gotify in

    • [X] Docker
    • [ ] Linux native platform
    • [ ] Windows native platform

    Describe your problem Hi, I am struggling with my first self-hosted server and I have set up automatic system updates by installing and configuring unattended-upgrades; I would however like to get a notification on gotify with the updates it has installed. Is this possible? By default it is possible to send an email with unattended-upgrades but I would prefer to use gotify to have all notifications with one service. Thank you.

    question 
    opened by ImFilippo 6
  • feature request: Notifications actions

    feature request: Notifications actions

    Is your feature request related to a problem? Please describe. I miss the possibility to react directly from some notifications, from the notification itself, without the need to open the main gotify interface.

    Describe the solution you'd like I would be able to pass some "extras" parameters that add some actions directly in the notifcations, like copy a text, open a link, or share a text/link, even why not call/text a contact.

    Describe alternatives you've considered I tried a simple implementation of "share" and "open" a link here, its working but can be done better maybe, please take time to read this PR thread: https://github.com/gotify/android/pull/236 .

    Additional context Please see this link https://github.com/gotify/android/pull/236 where you can find an example of integration with hauk-snitch project for example. Another common example is the integration of gotify with a monitoring, on-call setup. You can receive some events/alert and want to add some actions, open a link, ack an alert, escalade to another guy through call or text, copy a code you receive to the clipboard.

    a:feature 
    opened by cyrinux 3
  • Delete All Button confirmation

    Delete All Button confirmation

    Describe the solution you'd like I clicked by mistake on the button "Delete all" where I wanted to hit the refresh Button. A confirmation or undo feature would be helpful before all messages are deleted.

    a:feature 
    opened by okuzlu 5
  • Using large integers can lead to database corruption

    Using large integers can lead to database corruption

    Can the issue be reproduced with the latest available release? (y/n)

    Which one is the environment gotify server is running in?

    • [ ] Docker
    • [X] Linux machine
    • [ ] Windows machine
    Docker startup command or config file here (please mask sensitive information)
    export GOTIFY_SERVER_PORT=30080
    ./gotify-linux-amd64
    

    Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)

    • [X] None
    • [ ] Nginx
    • [ ] Apache
    • [ ] Caddy
    Reverse proxy configuration (please mask sensitive information)
    
    

    On which client do you experience problems? (Select as many as you can see)

    • [ ] WebUI
    • [ ] gotify-cli
    • [ ] Android Client
    • [X] 3rd-party API call (python w/ requests)
    
    import requests
    
    r = requests.post(
        "http://localhost:30080/application?token=Cxxx",
        json={"name": "TestApplication", "id": 9223372036854775808},
    )
    
    print(r.json())
    
    r = requests.get("http://localhost:30080/application?token=Cxxx")
    
    print(r.json())
    
    

    What did you do?

    I created an application with id 9223372036854775808 and tried to get the list of all applications.

    What did you expect to see?

    An error while creating the application because the value is too large or an error because of specifying the 'id' field (which is read-only according to the swagger configuration).

    What did you see instead? (Include screenshots, android logcat/request dumps if possible)

    The applications couldn't be listed anymore because the id overflowed and was stored as a negative value in the database.

    {'id': 9223372036854775808, 'token': 'A_pITbCDbj.7S1Y', 'name': 'TestApplication', 'description': '', 'internal': False, 'image': 'static/defaultapp.png'}
    {'error': 'Internal Server Error', 'errorCode': 500, 'errorDescription': 'sql: Scan error on column index 0, name "id": converting driver.Value type int64 ("-9223372036854775808") to a uint: invalid syntax'}
    

    I think it should also be clear if fields like 'id', 'image' etc. can be used by the client or not. If they are supported, they should be specified in the API documentation, otherwise you should get a 400 Bad Request response when using them.

    a:bug 
    opened by d-k-bo 5
  • Remove uploaded app image

    Remove uploaded app image

    Is your feature request related to a problem? Please describe. Once an image is added to an app, it cannot be removed

    Describe the solution you'd like A button to remove the uploaded image for an app, so that the default image appears again.

    Describe alternatives you've considered Workaround is finding the original default app image and uploading that but that is too elaborate.

    Additional context

    a:feature 
    opened by PanderMusubi 0
Releases(v2.1.7)
Owner
Gotify
A self-hosted push notification service.
Gotify
command-line tool to publish, subscribe, and process messages for AMQP 0.9.1 compliant message brokers

Bunny A BSD licenced, go-powered CLI tool for publishing and subscribing to RabbitMQ

SkunkWerks GmbH 3 Sep 11, 2021
Open-IM-Server is open source instant messaging Server.Backend in Go.

Open-IM-Server is open source instant messaging Server.Backend in Go.

OpenIM Corporation 9.2k Sep 17, 2022
Simple TCP-based chat server

hub-server Simple TCP-based chat server. Client can be found: https://github.com/alankritjoshi/hub-client Setup go run server.go 1234 How it works Use

Alankrit Joshi 0 Oct 25, 2021
Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).

Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).

Miguel Ángel Ortuño 1.3k Sep 18, 2022
Self hosted live chat server written in Go

goch is a self-hosted live-chat server written in Go. It allows you to run a live-chat software on your own infrastructure. You can create multip

Emir Ribić 163 Sep 15, 2022
A Go package for sending and receiving ethernet frames. Currently supporting Linux, Freebsd, and OS X.

ether ether is a go package for sending and receiving ethernet frames. Currently supported platform: BPF based OS X FreeBSD AF_PACKET based Linux Docu

Song Gao 77 Jun 20, 2022
Enforcing per team quota (sum of used resources across all their namespaces) and delegating the per namespace quota to users.

Quota Operator Enforcing per team quota (sum of used resources across all their namespaces) and delegating the per namespace quota to users. Instructi

Snapp Cab Incubators 17 Aug 4, 2022
Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Shivanshu Raj Shrivastava 2 Sep 12, 2022
Real-time Map displays real-time positions of public transport vehicles in Helsinki

Real-time Map Real-time Map displays real-time positions of public transport vehicles in Helsinki. It's a showcase for Proto.Actor - an ultra-fast dis

ASYNKRON 28 Jul 12, 2022
A LoRaWAN nodes' and network simulator that works with a real LoRaWAN environment (such as Chirpstack) and equipped with a web interface for real-time interaction.

LWN Simulator A LoRaWAN nodes' simulator to simulate a LoRaWAN Network. Table of Contents General Info Requirements Installation General Info LWN Simu

ARSLab 26 Jul 16, 2022
CLI for publishing/receiving CloudEvent messages through NATS

cenats CLI for publishing/receiving CloudEvent messages through NATS Use Case cenats is designed to make testing services that generate or consume eve

null 0 Nov 5, 2021
rtsp to webrtc proxy with websocket signaling, currently limited to single h264 stream per endpoint

rtp-to-webrtc rtp-to-webrtc demonstrates how to consume a RTP stream video UDP, and then send to a WebRTC client. With this example we have pre-made G

Game On 5 Aug 6, 2022
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.

Fortio Fortio (Φορτίο) started as, and is, Istio's load testing tool and now graduated to be its own project. Fortio is also used by, among others, Me

Fortio (Φορτίο) 2.7k Sep 21, 2022
A simple way of sending messages from the CLI output to your Discord channel with webhook.

discat A simple way of sending messages from the CLI output to your Discord channel with webhook. Actually, this is a fork version of slackcat that I

dw1 30 Jul 20, 2022
A utility for sending and listening for OSC messages.

A simple utility to send and listen for OSC messages. It can also be used to send MIDI messages.

Tim Thompson 3 Mar 5, 2022
A site displaying musical groups information by receiving a public API. The server was written in Go.

A site displaying musical groups information by receiving a public API. The API consists of 4 parts with each represent a subset of the information. W

Julia C 0 Dec 13, 2021
Cpu-profiling - Basic example of CPU Profiling in Golang which shows the bottlenecks and how much time is spent per function

cpu-profiling Basic example of CPU Profiling in Golang which shows the bottlenec

Felipe Azevedo 0 Aug 2, 2022
graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Go (Golang) to Graylog

graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Go (Golang) to Graylog

Robert Kowalski 79 Aug 12, 2022
Notify - Notification microservice for sending templated payloads as Slack messages

Notify Notify is a microservice that takes an event & payload from an applicatio

BritBus 1 May 23, 2022