mbignami/nextcloud-hpb
Project ID: 152678
Description
This repository aims to contain the High Performance Backup to some of Nextcloud Apps and make it easy to set it up on EL/Fedora systems. Right now this means the Nextcloud Talk HPB and the Nextcloud Files HPB.
The Nextcloud Talk HPB combines a signaling server with a WebRTC backend server and a nat traversal mechanism.
The Nextcloud Files HPB integrates the normal file modification system with a push notification mechanism to minimize normal polling.
Installation Instructions
Nextcloud Talk HPB
These instructions are for install in a single machine. Also these instructions are written based on EL9, but should work with all supported systems.
Generate secrets
During installation a few secrets are needed, I will reference them as Shell variables and define them as following:
- COTURN_SECRET=$(openssl rand -hex 32)
- TURN_API_KEY=$(openssl rand -base64 16)
- SIGNALING_HASH_KEY=$(openssl rand -hex 16)
- SIGNALING_BLOCK_KEY=$(openssl rand -hex 16)
- NEXCLOUD_SHARED_SECRET=$(openssl rand -hex 16)
Setup NATS Server
dnf install nats-server
The NATS-Server default configuration is already good for Talk HBC so we can enable it and start it up.
systemctl enable nats-server && systemctl start nats-server
Setup coturn
Install coturn from EPEL
dnf install coturn
Adjust the configuration file to include the following parameters:
- fingerprint
- lt-cred-mech
- use-auth-secret
- static-auth-secret=${COTURN_SECRET}
- realm=talk.your.domain
- bps-capacity=0
- no-multicast-peers Finally we enable and start up coturn
systemctl enable coturn && systemctl start coturn
Setup Janus WebRTC
dnf install janus-gateway janus-gateway-transport-websockets janus-gateway-plugin-videoroom
Edit the main configuration file /etc/janus/janus.jcfg
setting the following parameters in the [nat]
section
- stun_server = "127.0.0.1"
- stun_port = 3478
- full_trickle = true
- turn_server = "127.0.0.1"
- turn_port = 3478
- turn_type = "udp"
- turn_rest_api_key = ${TURN_API_KEY}
Also make sure WebSockets is active and on port 8188 looking at file /etc/janus/janus.transport.websockets.jcfg
before starting up the service.
systemctl enable janus-gateway && systemctl start janus-gateway
Setup nextcloud-spreed-signaling
dnf install nextcloud-spreed-signaling
Edit the server configuration file /etc/signaling/server.conf
editing/adding the settings as follows (first level is section)
- [http]
- listen = 127.0.0.1:8080
- [sessions]
- hashkey = ${SIGNALING_HASH_KEY}
- blockkey = ${SIGNALING_BLOCK_KEY}
- [backend]
- backendtype = static
- backends = you-own-personal-backend
- allowall = false
- [you-own-personal-backend]
- url = https://cloud.your.domain
- secret = ${NEXCLOUD_SHARED_SECRET}
- [nats]
- url = nats://localhost:4222
- [mcu]
- type = janus
- url = ws://127.0.0.1:8188
- [turn]
- apikey = ${TURN_API_KEY}
- secret = ${COTURN_SECRET}
- servers = turn:talk.your.domain:3478?transport=udp,turn:talk.your.domain:3478?transport=tcp
We should now be able to run it.
systemctl enable signaling && systemctl start signaling
Nextcloud configuration
Now you should set the reverse proxy for the signaling service, and afterwards set both the TURN server and the HPB server in Nextcloud settings.
- TURN Server: Select
turn:
for protocol, the address (in our guidetalk.your.domain
), port 3478 and secret ${COTURN_SECRET} - HPC Server: use the url of the reverse proxy (
https://talk.your.domain
) and the secret ${NEXCLOUD_SHARED_SECRET}
Nextcloud Files HPB
These instructions assumes it is installed on the same machine that serves the Nextcloud. I will use the WWW_USER variable to indicate the system user owner of the nextcloud directory. I also assume that nextcloud is correctly configured to use redis as a backend server.
Setup of the push service
dnf install nextcloud-notify-push
Once installed we should configure it's basic parameters, this is done editing the /etc/default/notify-push
file. Setting the base directory of nexcloud in the file will allow the service to reach nextcloud configuration file and read the parameters on its own.
Now we need to enable and start the service:
systemctl enable notify-push && systemctl start notify-push
Nextcloud configuration
After setting up the reverse proxy for the service, we need to install and configure the Nextcloud app to handle it, this can be run in two commands.
To install the app: sudo -u ${WWW_USER} php occ app:install notify_push
To configure it: sudo -u ${WWW_USER} php occ notify_push:setup https://cloud.your.domain/push
Active Releases
The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).
Release | Architectures | Repo Download |
---|---|---|
EPEL 8 | aarch64 (70)*, ppc64le (62)*, s390x (63)*, x86_64 (72)* | EPEL 8 (5 downloads) |
EPEL 9 | aarch64 (4)*, ppc64le (8)*, s390x (50)*, x86_64 (69)* | EPEL 9 (7 downloads) |
Fedora 39 | aarch64 (54)*, ppc64le (56)*, s390x (59)*, x86_64 (56)* | Fedora 39 (3 downloads) |
Fedora 40 | aarch64 (53)*, ppc64le (52)*, s390x (55)*, x86_64 (56)* | Fedora 40 (3 downloads) |
Fedora 41 | aarch64 (56)*, ppc64le (58)*, s390x (60)*, x86_64 (57)* | Fedora 41 (2 downloads) |
* Total number of downloaded packages.