Go to file
Jannis Mattheis e63876053f Add Swagger consistency check 2018-02-28 20:22:25 +01:00
api Make password strength configurable 2018-02-23 19:39:34 +01:00
auth Make password strength configurable 2018-02-23 19:39:34 +01:00
config Make password strength configurable 2018-02-23 19:39:34 +01:00
database Make password strength configurable 2018-02-23 19:39:34 +01:00
docker Add docker & build on tags 2018-02-23 19:01:06 +01:00
docs Add Swagger consistency check 2018-02-28 20:22:25 +01:00
error Format & reorder imports 2018-02-18 12:56:42 +01:00
model Improve documentation 2018-02-28 20:22:25 +01:00
router Improve documentation 2018-02-28 20:22:25 +01:00
runner Add some logging & version info building 2018-02-21 19:27:31 +01:00
stream Rename to gotify 2018-02-12 16:48:01 +01:00
.gitignore Use Makefile instead of bash scripts 2018-02-24 16:05:00 +01:00
.travis.yml Only execute before deploy one time 2018-02-24 17:17:39 +01:00
Gopkg.lock Add support for ssl. 2018-02-19 17:40:05 +01:00
Gopkg.toml Add support for ssl. 2018-02-19 17:40:05 +01:00
LICENSE Add license 2018-02-08 19:52:58 +01:00
Makefile Adjust spec tasks 2018-02-28 20:22:25 +01:00
README.md Adjust README 2018-02-24 16:05:00 +01:00
app.go Remove branch from version info 2018-02-24 16:05:00 +01:00
docker-push.sh Add docker & build on tags 2018-02-23 19:01:06 +01:00

README.md

Gotify Server

Build Status codecov Go Report Card Swagger Valid Api Docs latest release version

Motivation

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

  • API (see api docs) for
    • sending messages
    • receiving messages per websocket
    • user management
    • client/device & application management
  • [In Progress] Web-UI
  • [In Progress] Android-App -> gotify/android

Installation

Docker

The docker image is available on docker hub at gotify/server.

docker run -p 80:80 gotify/server

Also there is a specific docker image for arm-7 processors (raspberry pi), named gotify/server-arm7.

docker run -p 80:80 gotify/server-arm7

Binary

Visit the releases page and download the zip for your OS.

Configuration

File

server:
  port: 80 # the port for the http server
  ssl:
    enabled: false # if https should be enabled
    redirecttohttps: true # redirect to https if site is accessed by http
    port: 443 # the https port
    certfile: # the cert file (leave empty when using letsencrypt)
    certkey: # the cert key (leave empty when using letsencrypt)
    letsencrypt:
      enabled: false # if the certificate should be requested from letsencrypt
      accepttos: false # if you accept the tos from letsencrypt
      cache: certs # the directory of the cache from letsencrypt
      hosts: # the hosts for which letsencrypt should request certificates
      - mydomain.tld
      - myotherdomain.tld
database: # for database see (configure database section)
  dialect: sqlite3
  connection: gotify.db
defaultuser: # on database creation, gotify creates an admin user
  name: admin # the username of the default user
  pass: admin # the password of the default user
passstrength: 10 # the bcrypt password strength (higher = better but also slower)

Environment

GOTIFY_SERVER_PORT=80
GOTIFY_SERVER_SSL_ENABLED=false
GOTIFY_SERVER_SSL_REDIRECTTOHTTPS=true
GOTIFY_SERVER_SSL_PORT=443
GOTIFY_SERVER_SSL_CERTFILE=
GOTIFY_SERVER_SSL_CERTKEY=
GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED=false
GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS=false
GOTIFY_SERVER_SSL_LETSENCRYPT_CACHE=certs
# lists are a little weird but do-able (:
GOTIFY_SERVER_SSL_LETSENCRYPT_HOSTS=- mydomain.tld\n- myotherdomain.tld
GOTIFY_DATABASE_DIALECT=sqlite3
GOTIFY_DATABASE_CONNECTION=gotify.db
GOTIFY_DEFAULTUSER_NAME=admin
GOTIFY_DEFAULTUSER_PASS=admin
GOTIFY_PASSSTRENGTH=10

Database

Dialect Connection
sqlite3 path/to/database.db
mysql gotify:secret@/gotifydb?charset=utf8&parseTime=True&loc=Local
postgres host=localhost port=3306 user=gotify dbname=gotify password=secret

Building

The app can be built with the default golang build command.

go build app.go

Cross-Platform

The project has a CGO reference (because of sqlite3), therefore a GCO cross compiler is needed for compiling for other platforms. We use karalabe/xgo for this, xgo is a bundle of docker containers for building go apps.

VERSION=mybuild1 make build-binary

Tests

The tests can be executed with:

make test
# or
go test ./...

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