-
-
Notifications
You must be signed in to change notification settings - Fork 216
Configure HPB client push for Nextcloud snap
HPB = High Performance Backend
The following configuration was tested on a fresh Ubuntu Server 22.04 LTS running on a x86_64 processor & on an Ubuntu Server 20.04 LTS running on an aarch64 processor. You need to adjust this steps depending on your OS.
Follow the instructions here.
Install the "Client Push" app via the App Store or via the cli:
sudo nextcloud.occ app:enable notify_push
- Create and open a new systemd unit file via
sudo nano /etc/systemd/system/notify_push.service
and paste the following template in:
[Unit]
Description = Push daemon for Nextcloud clients
After = snap.nextcloud.nextcloud-fixer.service
[Service]
Environment=SOCKET_PATH=/tmp/snap-private-tmp/snap.nextcloud/tmp/sockets/notify_push.sock
Environment=DATABASE_URL=mysql://nextcloud:CHANGEME@localhost/nextcloud?socket=/tmp/snap-private-tmp/snap.nextcloud/tmp/sockets/mysql.sock
Environment=REDIS_URL=redis+unix:///tmp/snap-private-tmp/snap.nextcloud/tmp/sockets/redis.sock
ExecStartPre=/bin/bash -c 'while /bin/systemctl is-active --quiet snap.nextcloud.nextcloud-fixer.service; do sleep 10; done'
TimeoutStartSec=15m
ExecStart=/var/snap/nextcloud/current/nextcloud/extra-apps/notify_push/bin/ARCHITECTURE/notify_push /var/snap/nextcloud/current/nextcloud/config/config.php
Type=notify
User=root
[Install]
WantedBy = multi-user.target
- Adjust the template with some system configurations:
- Replace
ARCHITECTURE
with one of the following, depending on your system. Some examples:- x86_64
- aarch64
- armv7
- Replace
CHANGEME
inDATABASE_URL
with the config valuedbpassword
.
Get via cli with:sudo nextcloud.occ config:system:get dbpassword
.
sudo systemctl start notify_push
sudo systemctl enable notify_push
Enable the reverse proxy configuration for notify_push using the following command:
sudo snap set nextcloud http.notify-push-reverse-proxy=true
Setup the app via the following command:
sudo nextcloud.occ notify_push:setup https://cloud.example.com/push
Replacing cloud.example.com
with your instance domain.
sudo systemctl stop notify_push
sudo systemctl disable notify_push
Uninstall the "Client Push" app via the App Store or via the cli:
sudo nextcloud.occ app:remove notify_push
Disable the reverse proxy configuration for notify_push using the following command:
sudo snap set nextcloud http.notify-push-reverse-proxy=false
- Ensure you configured
overwrite.cli.url
if required. Otherwise you may not be able to continue the setup. - Ensure you added
127.0.0.1
totrusted_proxies
in config.php:
'trusted_proxies' =>
array (
0 => '127.0.0.1',
),
Nextcloud snap Wiki, use all information and scripts at own risk