The playbook can install and configure Fluffygate, a simple Push Gateway for Fluffychat.
See the project’s documentation to learn what it does and why it might be useful to you.
Note: most people don’t need to install their own gateway. This optional playbook component is only useful to people who develop/build their own Matrix client applications themselves, as you’ll need access to your own Firebase/FCM and APNS credentials.
To enable Fluffygate, add the following configuration to your inventory/host_vars/matrix.example.com/vars.yml file:
matrix_fluffygate_enabled: true
# Basic app information
matrix_fluffygate_app_name: "Your App Name"
matrix_fluffygate_app_website: "https://example.com"
# Firebase/FCM configuration (for Android / IOS)
matrix_fluffygate_firebase_project: "your-firebase-project-id"
matrix_fluffygate_firebase_key: |
{
# Your Firebase service account key JSON content
}
# Notification settings
matrix_fluffygate_notification_title: "{count} new messages"
matrix_fluffygate_notification_body: "{body}"
# Android specific notification options
matrix_fluffygate_android_notification_options:
priority: high
notification:
sound: "default"
icon: "notifications_icon"
tag: "default_notification"
# APNS specific notification options (for iOS)
matrix_fluffygate_apns_notification_options:
headers:
apns-priority: "10"
payload:
aps:
sound: "default"
badge: "{count}"
mutable-content: 1
For a complete list of available configuration options, see the defaults/main.yml file in the role.
The following settings are required and must be defined:
matrix_fluffygate_hostnamematrix_fluffygate_path_prefixmatrix_fluffygate_container_networkmatrix_fluffygate_app_namematrix_fluffygate_app_websiteBy default, this playbook installs Fluffygate at the root path (/) of the configured hostname. You can customize both the hostname and path prefix using these variables:
# Configure the hostname where Fluffygate will be served
matrix_fluffygate_hostname: "push.example.com"
# Configure a custom path prefix (must either be '/' or not end with a slash)
matrix_fluffygate_path_prefix: /push
Fluffygate includes built-in support for Traefik as a reverse proxy. The following settings control this integration:
# Enable/disable Traefik labels
matrix_fluffygate_container_labels_traefik_enabled: true
# Configure the Traefik network
matrix_fluffygate_container_labels_traefik_docker_network: "{{ matrix_fluffygate_container_network }}"
# Additional Traefik configuration
matrix_fluffygate_container_labels_traefik_rule: "Host(`{{ matrix_fluffygate_container_labels_traefik_hostname }}`)"
matrix_fluffygate_container_labels_traefik_priority: 0
matrix_fluffygate_container_labels_traefik_entrypoints: web-secure
Once you’ve decided on the domain and path, you may need to adjust your DNS records to point the Fluffygate domain to the Matrix server.
By default, you will need to create a CNAME record for push. See Configuring DNS for details about DNS changes.
If you’ve decided to reuse the matrix. domain, you won’t need to do any extra DNS configuration.
After configuring the playbook and adjusting your DNS records, run the installation command:
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
To install only Fluffygate, you can use:
ansible-playbook -i inventory/hosts setup.yml --tags=setup-fluffygate,start
To make use of your Fluffygate installation:
If you need to troubleshoot issues:
Enable debug logs by setting:
matrix_fluffygate_debug_logs: true
Check the container logs:
docker logs matrix-fluffygate
To remove Fluffygate, first disable it in your inventory/host_vars/matrix.example.com/vars.yml:
matrix_fluffygate_enabled: false
Then run the playbook:
ansible-playbook -i inventory/hosts setup.yml --tags=setup-fluffygate,start
This will stop the service and remove all associated files.