---
title: "Gotify Docker Compose and one-click hosting"
description: "Gotify is an open-source server for push messages: scripts send over a REST API, apps receive live. A Pushover alternative you self-host in one click."
---

[← All templates](https://pethost.dev/templates/) · [Analytics and monitoring](https://pethost.dev/templates/monitoring/)

# Deploy Gotify in one click

A push message server: scripts send over a REST API, and the web app and the Android app show it live

A self-hosted alternative to Pushover and Pushbullet.

[Deploy on Pethost](https://console.pethost.dev/?template=gotify)

## What is Gotify?

Gotify is an open-source server for sending and receiving messages, written in Go and run in place of Pushover or Pushbullet. A script, a cron job or a monitoring tool sends a message with one HTTP request and an application's token; the web app and the Android app receive it at once over a WebSocket and show it as a notification. Each message has a title, a text and a priority, and its extras can render it as Markdown or open a link when the notification is tapped.

Gotify tells applications from clients: an application can only send, and a client, such as a phone or a browser, receives and manages. Each user has their own applications, clients and messages, and an admin adds users in the web app. The Android app is on Google Play and F-Droid, the gotify CLI sends from a terminal, and plugins written in Go add features on the server.

This template runs Gotify's official image, version 3, with its SQLite database and uploaded images in a volume. The admin is made from the username and password you give when Gotify first creates its database, before it answers anyone, and registration stays closed.

## Hosting Gotify on Pethost

1. You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
2. New project opens at Gotify. You fill in what it asks for and click Create project: **Username**, **Admin password**.
3. In a minute or two Gotify is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
4. It is a project like any other: you or your agent can change it, roll it back or restore it.

## Questions about Gotify

**Is Gotify free and open source?**

Yes. Gotify's server, web app, Android app and CLI are open source under the MIT license, and there is no paid edition: running it costs only the server it runs on.

**How do I send a message to Gotify with curl?**

Create an application in the web app, copy its token, and POST to /message: curl https://gotify.example.com/message -H "X-Gotify-Key: <token>" -F title=Backup -F message=Done -F priority=5. Only message is required.

**Gotify vs ntfy: which should I pick?**

Both push messages from scripts to phones. Gotify gives each sender an application token and each user their own inbox, and its own app is for Android. ntfy publishes to topics anyone with access can subscribe to, and has apps for Android and iOS.

**Does Gotify work on iPhone?**

Gotify's own app is for Android only. On an iPhone the web app shows messages while it is open, and third-party apps such as iGotify forward them through Apple's push service.

**Can I see my Gotify token again?**

No. Since Gotify 3 an application's token is shown once, when it is created or rotated, so copy it then. If it is lost, rotate it in the Apps page and update the script that sends with it.

**How much memory and disk does Gotify need?**

Gotify is very light: about 10 MB of memory, and its SQLite database grows only with the messages you keep. On Pethost the Starter plan is enough for it, with room for other apps beside it.

## Gotify Docker Compose file

The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.

**Containers:** gotify (gotify/server:3).

**Volumes, in the nightly backup:** data.

```
services:
  gotify:
    image: gotify/server:3
    restart: unless-stopped
    environment:
      # The admin is made from these when Gotify creates its database, at the first start, before
      # it answers anyone; a later change of the password is made in Gotify's Users page.
      GOTIFY_DEFAULTUSER_NAME: ${ADMIN_USERNAME}
      GOTIFY_DEFAULTUSER_PASS: ${ADMIN_PASSWORD}
      # Only the admin adds users: nobody registers by the address.
      GOTIFY_REGISTRATION: "false"
      # The machine's proxy, whose X-Forwarded-For carries the visitor's address.
      GOTIFY_SERVER_TRUSTEDPROXIES: 10.192.0.0/10
      GOTIFY_SERVER_SECURECOOKIE: "true"
      TZ: Etc/UTC
    volumes:
      - data:/app/data
volumes:
  data:
```

[compose.yaml](https://pethost.dev/templates/gotify/compose.yaml)[See it on GitHub](https://github.com/pethost-dev/templates/tree/main/gotify)

## [More in Analytics and monitoring](https://pethost.dev/templates/monitoring/)

- [**Umami**Web analytics for your sites, without cookies](https://pethost.dev/templates/umami/)
- [**Uptime Kuma**Uptime monitoring with alerts and status pages](https://pethost.dev/templates/uptime-kuma/)
- [**Kener**A status page with uptime monitors and incidents](https://pethost.dev/templates/kener/)
- [**Beszel**Lightweight server monitoring: CPU, memory, disk, network and Docker stats, with history and alerts](https://pethost.dev/templates/beszel/)
- [**changedetection.io**Watches web pages and tells you when they change: prices, restocks, news](https://pethost.dev/templates/changedetection/)
- [**Checkmate**Uptime, page speed and infrastructure monitoring, with status pages](https://pethost.dev/templates/checkmate/)

Pethost · Stephan Gomer · NIP 1133096755

Pethost

- [Templates](https://pethost.dev/templates/)
- [About](https://pethost.dev/about/)
- [Docs](https://pethost.dev/docs/)
- [Blog](https://pethost.dev/blog/)
- [API](https://pethost.dev/docs/api/)
- [CLI](https://pethost.dev/docs/cli/)
- [Plugin](https://github.com/pethost-dev/plugin)
- [Terms](https://pethost.dev/terms/)
- [Privacy](https://pethost.dev/privacy/)
- [Refunds](https://pethost.dev/refunds/)
- [support@pethost.dev](mailto:support@pethost.dev)

Databases

- [Postgres](https://pethost.dev/postgres/)

Comparisons

- [Coolify vs Dokploy vs CapRover vs Dokku](https://pethost.dev/blog/coolify-vs-dokploy-vs-caprover-vs-dokku/)
- [Coolify Cloud vs Dokploy Cloud](https://pethost.dev/blog/coolify-cloud-vs-dokploy-cloud/)
- [Railway vs Render vs Fly.io pricing](https://pethost.dev/blog/railway-vs-render-vs-fly-io-pricing/)
- [Managed Docker Compose hosting](https://pethost.dev/blog/managed-docker-compose-hosting/)

Alternatives

- [Railway alternatives](https://pethost.dev/blog/railway-alternatives/)
- [Heroku alternatives](https://pethost.dev/blog/heroku-alternatives/)
- [Dokploy alternatives](https://pethost.dev/blog/dokploy-alternatives/)
- [Coolify alternatives](https://pethost.dev/blog/coolify-alternatives/)
- [Render alternatives](https://pethost.dev/blog/render-alternatives/)
- [Sliplane alternatives](https://pethost.dev/blog/sliplane-alternatives/)
