Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Containers/notify-push/start.sh
Comment thread
h4fnp marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ if grep -q "1" /sys/module/ipv6/parameters/disable \
fi
export BIND

# Trust additional CA certificates, if the user provided NEXTCLOUD_TRUSTED_CACERTS_DIR
# The container is read-only, so we build a custom bundle in /tmp (tmpfs) and
# point the push server's TLS stack to it via SSL_CERT_FILE.
if mountpoint -q /usr/local/share/ca-certificates; then
echo "Trusting additional CA certificates..."
set -x
cp /etc/ssl/certs/ca-certificates.crt /tmp/ca-certificates.crt
for cert in /usr/local/share/ca-certificates/*; do
if [ -f "$cert" ]; then
cat "$cert" >> /tmp/ca-certificates.crt
fi
done
export SSL_CERT_FILE=/tmp/ca-certificates.crt
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
set +x
fi
fi

echo "notify-push was started"


Expand Down
8 changes: 8 additions & 0 deletions php/containers.json
Comment thread
h4fnp marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@
"source": "nextcloud_aio_nextcloud",
"destination": "/var/www/html",
"writeable": false
},
{
"source": "%NEXTCLOUD_TRUSTED_CACERTS_DIR%",
"destination": "/usr/local/share/ca-certificates",
"writeable": false
}
],
"environment": [
Expand All @@ -324,6 +329,9 @@
],
"restart": "unless-stopped",
"read_only": true,
"tmpfs": [
"/tmp"
],
"cap_drop": [
"NET_RAW"
]
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ In certain situations you might want to keep Nextcloud apps that are disabled in

For some applications it might be necessary to establish a secure connection to another host/server which is using a certificate issued by a Certification Authority that is not trusted out of the box. An example could be configuring LDAPS against a domain controller (Active Directory or Samba-based) of an organization.

You can make the Nextcloud container trust any Certification Authority by providing the environmental variable `NEXTCLOUD_TRUSTED_CACERTS_DIR` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). The value of the variables should be set to the absolute paths of the directory on the host, which contains one or more Certification Authorities certificates. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted.
You can make the Nextcloud, Talk and Notify Push containers trust any Certification Authority by providing the environmental variable `NEXTCLOUD_TRUSTED_CACERTS_DIR` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). The value of the variables should be set to the absolute paths of the directory on the host, which contains one or more Certification Authorities certificates. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted.

When using `docker run`, the environmental variable can be set with `--env NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`.

Expand Down