From 7f03b4efda1737451a8393ce0c9f5fcd900fa91e Mon Sep 17 00:00:00 2001
From: FreDTV <70434961+Fred-DTV@users.noreply.github.com>
Date: Tue, 24 Jan 2023 12:49:09 +0100
Subject: [PATCH] Add Synology instructions (#1813)
---
php/templates/containers.twig | 2 ++
readme.md | 22 +++++++++++++++++++++-
reverse-proxy.md | 2 ++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/php/templates/containers.twig b/php/templates/containers.twig
index b3df6b69..16372604 100644
--- a/php/templates/containers.twig
+++ b/php/templates/containers.twig
@@ -163,6 +163,7 @@
The folder path that you enter must start with / and must not end with /.
An example for Linux is /mnt/backup.
+ On Synology it could be /volume1/docker/nextcloud/backup.
For macOS it may be /var/backup.
On Windows it must be nextcloud_aio_backupdir. You need to create the 'nextcloud_aio_backupdir' volume beforehand by following this documentation: click here
⚠️ Please note that the backup archive must be located in a subfolder of the folder that you enter here and the subfolder which contains the archive must be named 'borg'. Otherwise will the backup container not find the backup archive!
@@ -325,6 +326,7 @@
The folder path that you enter must start with / and must not end with /.
An example for Linux is /mnt/backup.
+ On Synology it could be /volume1/docker/nextcloud/backup.
For macOS it may be /var/backup.
On Windows it must be nextcloud_aio_backupdir. You need to create the 'nextcloud_aio_backupdir' volume beforehand by following this documentation: click here
{% endif %}
diff --git a/readme.md b/readme.md
index 6237b607..9acbb54c 100644
--- a/readme.md
+++ b/readme.md
@@ -126,6 +126,26 @@ Also, you may be interested in adjusting Nextcloud's Datadir to store the files
⚠️ **Please note:** Almost all commands in this project's documentation use `sudo docker ...`. Since `sudo` is not available on Windows, you simply remove `sudo` from the commands and they should work.
+
+### How to run AIO on Synology DSM
+On Synology, there are two things different in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /volume1/docker/docker.sock:/var/run/docker.sock:ro` to run it. You also need to add `-e DOCKER_SOCKET_PATH="/volume1/docker/docker.sock"`to the startup command. Apart from that it should work and behave the same like on Linux. Obviously the Synology Docker GUI will not work with that so you will need to either use SSH or create a user-defined script task in the task scheduler as the user 'root' in order to run the command.
+
+Also, you may be interested in adjusting Nextcloud's Datadir to store the files on the host system. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
+
+You'll also need to adjust Synology's firewall, see below:
+
+
+Click here to expand
+
+The Synology DSM is vulnerable to attacks with it's open ports and login interfaces, which is why a firewall setup is always recommended. If a firewall is activated it is necessary to have exceptions for ports 80,443, the subnet of the docker bridge which includes the nextcloud containers, your public static IP (if you don't use DDNS) and if applicable your NC-Talk ports 3478 TCP+UDP:
+
+![Screenshot 2023-01-19 at 14 13 48](https://user-images.githubusercontent.com/70434961/213677995-71a9f364-e5d2-49e5-831e-4579f217c95c.png)
+
+If you have the NAS setup on your local network (which is most often the case) you will need to setup the Synology DNS to be able to access Nextcloud from your network via its domain. Also don't forget to add the new DNS to your DHCP server and your fixed IP settings:
+
+![Screenshot 2023-01-20 at 12 13 44](https://user-images.githubusercontent.com/70434961/213683295-0b39a2bd-7a26-414c-a408-127dd4f07826.png)
+
+
### How to run AIO with Portainer?
The easiest way to run it with Portainer on Linux is to use Portainer's stacks feature and use [this docker-compose file](./docker-compose.yml) in order to start AIO correctly.
@@ -194,7 +214,7 @@ See https://dev.to/ozorest/fedora-32-how-to-solve-docker-internal-network-issue-
Simply run the following: `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ your-command`. Of course `your-command` needs to be exchanged with the command that you want to run.
### How to resolve `Security & setup warnings displays the "missing default phone region" after initial install`?
-Simply run the following command: `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `EN` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
+Simply run the following command: `sudo docker exec --user www-data nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `EN` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
### How to run multiple AIO instances on one server?
See [multiple-instances.md](./multiple-instances.md) for some documentation on this.
diff --git a/reverse-proxy.md b/reverse-proxy.md
index 70313569..7d5f1e9c 100644
--- a/reverse-proxy.md
+++ b/reverse-proxy.md
@@ -507,6 +507,8 @@ Also, you may be interested in adjusting Nextcloud's Datadir to store the files
+On Synology DSM see https://github.com/nextcloud/all-in-one#how-to-run-aio-on-synology-dsm
+
### Inspiration for a docker-compose file
Simply translate the docker run command into a docker-compose file. You can have a look at [this file](https://github.com/nextcloud/all-in-one/blob/main/docker-compose.yml) for some inspiration but you will need to modify it either way. You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588