diff --git a/Containers/clamav/Dockerfile b/Containers/clamav/Dockerfile index 8deede4..cbb9223 100644 --- a/Containers/clamav/Dockerfile +++ b/Containers/clamav/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:latest # Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.3/alpine/Dockerfile -FROM clamav/clamav:1.4.1-8 +FROM clamav/clamav:1.4.1-9 COPY clamav.conf /clamav.conf COPY --chmod=775 start.script /start.script diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 1abbcd5..ae57767 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -20,6 +20,11 @@ run_upgrade_if_needed_due_to_app_update() { fi } +# Adjust DATABASE_TYPE to by Nextcloud supported value +if [ "$DATABASE_TYPE" = postgres ]; then + export DATABASE_TYPE=pgsql +fi + # Only start container if redis is accessible # shellcheck disable=SC2153 while ! nc -z "$REDIS_HOST" "6379"; do @@ -237,12 +242,12 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then ); DATADIR_PERMISSION_CONF - echo "Installing with PostgreSQL database" + echo "Installing with $DATABASE_TYPE database" # Set a default value for POSTGRES_PORT if [ -z "$POSTGRES_PORT" ]; then POSTGRES_PORT=5432 fi - INSTALL_OPTIONS+=(--database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST" --database-port "$POSTGRES_PORT") + INSTALL_OPTIONS+=(--database "$DATABASE_TYPE" --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST" --database-port "$POSTGRES_PORT") echo "Starting Nextcloud installation..." if ! php /var/www/html/occ maintenance:install "${INSTALL_OPTIONS[@]}"; then diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 0bbea73..37aa4d9 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -17,6 +17,11 @@ done POSTGRES_USER="oc_$POSTGRES_USER" export POSTGRES_USER +# Check that db type is not empty +if [ -z "$DATABASE_TYPE" ]; then + export DATABASE_TYPE=postgres +fi + # Fix false database connection on old instances if [ -f "/var/www/html/config/config.php" ]; then sleep 2 diff --git a/Containers/notify-push/start.sh b/Containers/notify-push/start.sh index 1f77b0f..21b291d 100644 --- a/Containers/notify-push/start.sh +++ b/Containers/notify-push/start.sh @@ -1,13 +1,13 @@ #!/bin/bash if [ -z "$NEXTCLOUD_HOST" ]; then - echo "NEXTCLOUD_HOST need to be provided. Exiting!" + echo "NEXTCLOUD_HOST needs to be provided. Exiting!" exit 1 elif [ -z "$POSTGRES_HOST" ]; then - echo "POSTGRES_HOST need to be provided. Exiting!" + echo "POSTGRES_HOST needs to be provided. Exiting!" exit 1 elif [ -z "$REDIS_HOST" ]; then - echo "REDIS_HOST need to be provided. Exiting!" + echo "REDIS_HOST needs to be provided. Exiting!" exit 1 fi @@ -52,9 +52,16 @@ fi if [ -z "$REDIS_DB_INDEX" ]; then REDIS_DB_INDEX=0 fi +# Set a default for db type +if [ -z "$DATABASE_TYPE" ]; then + DATABASE_TYPE=postgres +elif [ "$DATABASE_TYPE" != postgres ] && [ "$DATABASE_TYPE" != mysql ]; then + echo "DB type must be either postgres or mysql" + exit 1 +fi # Set sensitive values as env -export DATABASE_URL="postgres://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" +export DATABASE_URL="$DATABASE_TYPE://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST/$REDIS_DB_INDEX" # Run it diff --git a/local-instance.md b/local-instance.md index ac0b9fb..f247187 100644 --- a/local-instance.md +++ b/local-instance.md @@ -9,7 +9,7 @@ The recommended way is the following: 1. Enter the ip-address of your local dns-server in the daemon.json file for docker so that you are sure that all docker containers use the correct local dns-server. 1. Now, entering the domain in the AIO-interface should work as expected and should allow you to continue with the setup -Here is a video that does shows this a bit more in detail: https://youtu.be/zk-y2wVkY4c +**Hint:** You may have a look at [this video](https://youtu.be/zk-y2wVkY4c) for a more complete but possibly outdated example. ## 2. Use the ACME DNS-challenge You can alternatively use the ACME DNS-challenge to get a valid certificate for Nextcloud. Here is described how to set it up: https://github.com/nextcloud/all-in-one#how-to-get-nextcloud-running-using-the-acme-dns-challenge diff --git a/php/public/toggle-dark-mode.js b/php/public/toggle-dark-mode.js index 9fc1719..773a9f1 100644 --- a/php/public/toggle-dark-mode.js +++ b/php/public/toggle-dark-mode.js @@ -22,5 +22,5 @@ function applySavedTheme() { } } -// Immediately apply the saved theme -applySavedTheme(); +// Apply theme when the page loads +document.addEventListener('DOMContentLoaded', applySavedTheme); diff --git a/readme.md b/readme.md index 88972ec..913f18e 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,7 @@ Included are: - A+ security in Nextcloud security scan - Ready to be used behind existing [Reverse proxies](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md) - Can be used behind [Cloudflare Tunnel](https://github.com/nextcloud/all-in-one#how-to-run-nextcloud-behind-a-cloudflare-tunnel) +- Can be used inside [Tailscale network](https://github.com/nextcloud/all-in-one/discussions/5439) - Ready for big file uploads up to 10 GB on public links, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud) (logged in users can upload much bigger files using the webinterface or the mobile/desktop clients since chunking is used in that case) - PHP and web server timeouts set to 3600s, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud) (important for big file uploads) - Defaults to a max of 512 MB RAM per PHP process, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud) @@ -239,6 +240,9 @@ Another but untested way is to install Portainer on your TrueNAS SCALE from here ### How to run Nextcloud behind a Cloudflare Tunnel? Although it does not seems like it is the case but from AIO perspective a Cloudflare Tunnel works like a reverse proxy. So please follow the [reverse proxy documentation](./reverse-proxy.md) where is documented how to make it run behind a Cloudflare Tunnel. However please see the [caveats](https://github.com/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel) before proceeding. +### How to run Nextcloud inside a Tailscale network? +For a reverse proxy example guide for Tailscale, see this guide by @flll: https://github.com/nextcloud/all-in-one/discussions/5439 + ### Disrecommended VPS providers - *Older* Strato VPS using Virtuozzo caused problems though ones from Q3 2023 and later should work. If your VPS has a `/proc/user_beancounters` file and a low `numproc` limit set in it diff --git a/reverse-proxy.md b/reverse-proxy.md index 205d789..1345b58 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -145,6 +145,8 @@ To make the config work you can run the following command: click here to expand +**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/575#discussion-4055615) for a more complete but possibly outdated example. + Add this to your Caddyfile: ``` @@ -204,6 +206,9 @@ For a reverse proxy example guide for Citrix ADC VPX / Citrix Netscaler, see thi click here to expand + +**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/2845#discussioncomment-6423237) for a more complete but possibly outdated example. + Although it does not seem like it is the case but from AIO perspective a Cloudflare Tunnel works like a reverse proxy. Please see the [caveats](https://github.com/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel) before proceeding. Here is then how to make it work: 1. Install the Cloudflare Tunnel on the same machine where AIO will be running on and point the Tunnel with the domain that you want to use for AIO to `http://localhost:11000`.
@@ -317,6 +322,8 @@ backend Nextcloud click here to expand +**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-2811152) for a more complete but possibly outdated example. + **Disclaimer:** This config was tested and should normally work on all modern Nginx versions. Improvements to the config are very welcome! Add the below template to your Nginx config. @@ -401,8 +408,6 @@ server { ⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration. -**Advice:** You may have a look at [this](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-2811152) for a more complete example. - ### Nginx-Proxy-Manager - NPM @@ -411,6 +416,8 @@ server { click here to expand +**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-3040493) for a more complete but possibly oudated example. + First, make sure the environmental variables `PUID` and `PGID` in the `compose.yaml` file for NPM are either unset or set to `0`. If you need to change the GID/PID then please add `net.ipv4.ip_unprivileged_port_start=0` at the end of `/etc/sysctl.conf`. Note: this will cause that non root users can bind privileged ports. @@ -560,6 +567,8 @@ See these screenshots for a working config: click here to expand +**Hint:** You may have a look at [this video](https://www.youtube.com/watch?v=VLPSRrLMDmA) for a more complete but possibly outdated example. + **Disclaimer:** it might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome! Traefik's building blocks (router, service, middlewares) need to be defined using dynamic configuration similar to [this](https://doc.traefik.io/traefik/providers/file/#configuration-examples) official Traefik configuration example. Using **docker labels _won't work_** because of the nature of the project. @@ -638,7 +647,6 @@ The examples below define the dynamic configuration in YAML files. If you rather --- ⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration. -**Hint**: see https://www.youtube.com/watch?v=VLPSRrLMDmA for a video on configuring Traefik. @@ -710,6 +718,17 @@ Add the following `web.config` file to the root of the site you created as the r +### Tailscale + +
+ +click here to expand + +For a reverse proxy example guide for Tailscale, see this guide by @flll: https://github.com/nextcloud/all-in-one/discussions/5439 + +
+ + ### Others