Gotify is a simple server for sending and receiving notification messages. It is used a lot throughout this guide for services such as backups and automatic updates, a must-have self-hosted solution.
.
|-- .env
|-- docker-compose.yml
`-- data/
.env
- a file containing all the environment variables used in the docker-compose.ymldocker-compose.yml
- a docker-compose file, use to configure your application’s servicesdata/
- a directory used to store the service's data
Please make sure that all the files and directories are present.
Links to the following docker-compose.yml and the corresponding .env.
- docker-compose.yml
version: "3" services: gotify: image: gotify/server container_name: gotify restart: unless-stopped volumes: - "./data:/app/data" environment: - GOTIFY_DEFAULTUSER_PASS=${GOTIFY_DEFAULTUSER_PASS} networks: - proxy labels: - "traefik.enable=true" - "traefik.http.routers.gotify.rule=Host(`gotify.example.com`)" - "traefik.http.routers.gotify.entrypoints=https" - "traefik.http.routers.gotify.tls=true" - "traefik.http.routers.gotify.tls.certresolver=mydnschallenge" # Watchtower Update - "com.centurylinklabs.watchtower.enable=true" networks: proxy: external: true
- .env
TRAEFIK_GOTIFY=gotify.example.com GOTIFY_DEFAULTUSER_PASS=xxxxxxxxxxxxxxxxx
- Traefik up and running.
- A subdomain of your choice, this example uses
gotify
.- You should be able to create a subdomain with your DNS provider, use a
A record
with the same IP address as your root domain.
- You should be able to create a subdomain with your DNS provider, use a
Replace the environment variables in .env
with your own, then run :
sudo docker-compose up -d
You should then be able to access the gotify web-ui with the default user being admin
and the GOTIFY_DEFAULTUSER_PASS defined in .env
.
The image is automatically updated with watchtower thanks to the following label :
# Watchtower Update
- "com.centurylinklabs.watchtower.enable=true"
Don't forget to change the GOTIFY_DEFAULTUSER_PASS after first using it.
Docker volumes are globally backed up using borg-backup.