From ae7eb1b6233716e198bf454d99803343225d7349 Mon Sep 17 00:00:00 2001
From: Pascal <pilzinsel64@gmx.de>
Date: Mon, 16 Oct 2023 18:00:40 +0200
Subject: [PATCH] New instructions for Nextcloud Snap (#345)

* README: Revers Proxy configuration with Nextcloud Snap

Signed-off-by: Pilzinsel64 <pilzinsel64@gmx.de>

* README: update snap notes

Signed-off-by: Pilzinsel64 <pilzinsel64@gmx.de>

* README: polish up

Signed-off-by: Pilzinsel64 <pilzinsel64@gmx.de>

---------

Signed-off-by: Pilzinsel64 <pilzinsel64@gmx.de>
---
 README.md | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index f878be6..9b06538 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,9 @@ The setup required consists of three steps
 - Configuring the reverse proxy
 - Configuring the nextcloud app
 
+> __For Nextcloud Snap users:__ \
+The snap team made a wiki page how to install Client Push in Nextcloud snap. See [their Wiki page](https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-HPB-client-push-for-Nextcloud-snap)!
+
 ### Push server
 
 The push server should be setup to run as a background daemon, the recommended way is by setting it up as a system service in the init system.
@@ -63,28 +66,6 @@ User=www-data
 WantedBy = multi-user.target
 ```
 
-<details>
-<summary>Snap configuration (click to expand)</summary>
-
-If you have installed Nextcloud via Snap, you need to use the following file instead and replace `CHANGEME` in `DATABASE_URL` with the value of `dbpassword` from `/var/snap/nextcloud/current/nextcloud/config/config.php`
-
-```ini
-[Unit]
-Description = Push daemon for Nextcloud clients
-
-[Service]
-Environment=PORT=7867 # Change if you already have something running on this port
-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
-ExecStart=/var/snap/nextcloud/current/nextcloud/extra-apps/notify_push/bin/x86_64/notify_push /var/snap/nextcloud/current/nextcloud/config/config.php
-User=root
-
-[Install]
-WantedBy = multi-user.target
-```
-
-</details>
-
 #### OpenRC
 
 For OpenRC based setups, you can create an OpenRC service by creating a file named `/etc/init.d/notify_push` with the following content.
@@ -220,7 +201,7 @@ sudo systemctl enable notify_push-watcher.path
 It is **strongly** recommended to set up the push service behind a reverse proxy, this both removes the need to open
 a new port to the internet and handles the TLS encryption of the connection to prevent sending credentials in plain text.
 
-You can probably use the same webserver that you're already using for your nextcloud
+You can probably use the same webserver that you're already using for your nextcloud.
 
 #### Nginx
 
-- 
GitLab