* docs: move canonical documentation to the website The website now hosts the full documentation at /docs with a proper docs layout: sidebar navigation, on-page table of contents, mobile nav, theme support, canonical and OG meta, and overflow-safe code blocks and tables. Ten pages, all rewritten from the current code rather than copied from the old in-app docs: quickstart, deployment (Docker, Helm, Nix, LXC, bare metal), configuration, environment variable reference, notifications (all four providers including webhook payload signing), authentication (including header auth), force-push protection, architecture, advanced, and custom CA certificates. This fixes every inaccuracy found in the docs audit: the wrong raylabs/gitea-mirror image name, JWT_SECRET presented as the live auth secret instead of BETTER_AUTH_SECRET, the missing auth env vars, both wrong DATABASE_URL defaults, the contradicting starred-org default, and health endpoint fields the API deliberately does not return. The in-app /docs pages are retired: a stub redirects old bookmarks to the website, and the sidebar and 404 links point there directly. The markdown files under docs/ stay as the versioned offline reference; NOTIFICATIONS.md now covers Gotify and Webhook. README links the docs site, mentions notifications, and drops stale version markers. The app viewport meta gains initial-scale=1. * docs: mark new-repo notification as unimplemented, bump helm appVersion to 3.24.0
5.0 KiB
Notifications
Gitea Mirror supports push notifications for mirror events. You can be alerted when jobs succeed, fail, or when new repositories are discovered.
Supported Providers
1. Ntfy.sh (Direct)
Ntfy.sh is a simple HTTP-based pub-sub notification service. You can use the public server at https://ntfy.sh or self-host your own instance.
Setup (public server):
- Go to Configuration > Notifications
- Enable notifications and select Ntfy.sh as the provider
- Set the Topic to a unique name (e.g.,
my-gitea-mirror-abc123) - Leave the Server URL as
https://ntfy.sh - Subscribe to the same topic on your phone or desktop using the ntfy app
Setup (self-hosted):
- Deploy ntfy using Docker:
docker run -p 8080:80 binwiederhier/ntfy serve - Set the Server URL to your instance (e.g.,
http://ntfy:8080) - If authentication is enabled, provide an Access token
- Set your Topic name
Priority levels:
min/low/default/high/urgent- Error notifications automatically use
highpriority regardless of the default setting
2. Apprise API (Aggregator)
Apprise is a notification aggregator that supports 100+ services (Slack, Discord, Telegram, Email, Pushover, and many more) through a single API.
Setup:
- Deploy the Apprise API server:
# docker-compose.yml services: apprise: image: caronc/apprise:latest ports: - "8000:8000" volumes: - apprise-config:/config volumes: apprise-config: - Configure your notification services in Apprise (via its web UI at
http://localhost:8000or API) - Create a configuration token/key in Apprise
- In Gitea Mirror, go to Configuration > Notifications
- Enable notifications and select Apprise API
- Set the Server URL to your Apprise instance (e.g.,
http://apprise:8000) - Enter the Token/path you created in step 3
Tag filtering:
- Optionally set a Tag to only notify specific Apprise services
- Leave empty to notify all configured services
3. Gotify (Direct)
Gotify is a simple self-hosted push notification server.
Setup:
- In Gotify, create an application and copy its token
- In Gitea Mirror, go to Configuration > Notifications
- Enable notifications and select Gotify
- Set the Server URL to your Gotify instance (e.g.,
https://gotify.example.com) - Paste the Application token
- Pick a Default priority (0 to 10; error notifications are always sent at priority 8)
The token is encrypted at rest like all other provider credentials.
4. Webhook (Generic)
Sends a plain JSON POST to any URL you control. Works with n8n, Home Assistant, or any service that accepts a generic webhook.
Setup:
- In Gitea Mirror, go to Configuration > Notifications
- Enable notifications and select Webhook
- Set the Webhook URL to your endpoint
- Optionally set a Signing secret
Payload:
{
"title": "Mirror Failed: my-repo",
"message": "Repository my-repo failed to mirror",
"type": "sync_error",
"timestamp": "2026-08-03T02:33:29.707Z"
}
Signature verification:
When a signing secret is set, every request includes an X-Webhook-Signature header containing sha256=<hex>, an HMAC-SHA256 digest of the raw request body. Verify it on the receiving end:
const crypto = require("node:crypto");
const expected = "sha256=" +
crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const valid = crypto.timingSafeEqual(
Buffer.from(signatureHeader), Buffer.from(expected));
The secret is encrypted at rest.
Event Types
| Event | Default | Description |
|---|---|---|
| Sync errors | On | A mirror job failed |
| Sync success | Off | A mirror job completed successfully |
| New repo discovered | Off | Not yet implemented; the toggle is disabled in the UI |
Testing
Use the Send Test Notification button on the Notifications settings page to verify your configuration. The test sends a sample success notification to your configured provider.
Troubleshooting
Notifications not arriving:
- Check that notifications are enabled in the settings
- Verify the provider configuration (URL, topic/token)
- Use the Test button to check connectivity
- Check the server logs for
[NotificationService]messages
Ntfy authentication errors:
- Ensure your access token is correct
- If self-hosting, verify the ntfy server allows the topic
Apprise connection refused:
- Verify the Apprise API server is running and accessible from the Gitea Mirror container
- If using Docker, ensure both containers are on the same network
- Check the Apprise server logs for errors
Tokens and security:
- Notification tokens (ntfy access tokens, Apprise tokens) are encrypted at rest using the same AES-256-GCM encryption as GitHub/Gitea tokens
- Tokens are decrypted only when sending notifications or displaying in the settings UI