How to Set Inotify Limit PERMANENTLY on a Synology Diskstation

Go to Control Panel -> Task Scheduler. Create a New Task -> Triggered Task -> User-defined script.

In General Settings tab: give it a name (e.g. “Syncthing Sysctl Inotify Fix”) and Event = Boot-up.

In the Task Settings tab: enter this in the Run Command box:

sh -c '(sleep 90 && echo 204800 > /proc/sys/fs/inotify/max_user_watches)&'

The sleep is to delay the setting to (hopefully) skip past any initialization that Synology does at boot time.

Click OK to close the task dialog, then enable the task and hit the Save button.

Reference

https://forum.syncthing.net/t/setting-inotify-limit-permanently-on-synology-diskstation/12221/3

How To Resize a Cloud Server File System

This guide explains how to expand the file system on a Vultr cloud server instance. If you have upgraded your cloud server to a plan with a larger disk or need to expand a partition while preserving data, follow these steps. A cloud server instance is sometimes called a Virtual Private Server or VPS.

This guide uses Ubuntu 20.04 as an example but applies to any Linux distribution with the fdisk and resize2fs tools. The example server has a 10 GB virtual disk with two partitions:

The virtual disk vda is 10 GB.

The first partition vda1 is 6 GB.

The second partition vda2 is 4 GB.

# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 10G 0 disk
├─vda1 252:1 0 6G 0 part /
└─vda2 252:2 0 4G 0 part

As an example, this guide will remove the second partition (vda2), then expand the first partition (vda1) to fill the virtual disk. This will preserve all data on vda1 and delete all data on vda2.
Use this example as a general guide for your particular situation. Continue reading

How to Install Nextcloud on a Synology the Easy Way

Begin by installing a package called “Container Manager”. This should have created a new folder in your drive volume called ‘docker’. Create a new folder within this folder called “nextcloud”. Then create 3 new folders inside the nextcloud folder called “config”, “db-config”, and “data”. Now open up the “Container Manager” package and click on “Project”. Name it “nextcloud” and select “/docker/nextcloud” for the project path. Choose “Create docker-compose.yml” for source and add the following:

---
services:
  nextcloud:
    image: lscr.io/linuxserver/nextcloud:28.0.3
    container_name: nextcloud
    environment:
      - PUID=1026
      - PGID=100
      - TZ=America/Los_Angeles
    volumes:
      - ./config:/config
      - ./data:/data
    ports:
      - 9333:443
    restart: unless-stopped
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: nextcloud-mariadb
    environment:
      - PUID=1026
      - PGID=100
      - TZ=America/Los_Angeles
      - MYSQL_ROOT_PASSWORD=[PASSWORD]
      - MYSQL_DATABASE=nextcloud #optional
      - MYSQL_USER=nextcloud #optional
      - MYSQL_PASSWORD=[PASSWORD] #optional
    volumes:
      - ./db-config:/config
    ports:
      - 9444:3306
    restart: unless-stopped

Replace [PASSWORD] with unique strong passwords. Continue to build the project. Once completed, you should be able to access the Nextcloud UI by typing “https://[SYNOLOGY_IP]:9333” in your web browser. Go ahead and create an admin user and set it up to use MariaDB with the credentials you entered above. Once installed, you will be logged in. If you are using LDAP you can enable the “LDAP user and group backend” app and configure it with uid=root,cn=users,dc=[SUBDOMAIN],dc=[DOMAIN],dc=[DOMAINSUFFIX] for the User DN. Now we just need to create a reverse proxy so that we don’t have to access Nextcloud with an IP address and port number. This can be done by going to Control Panel -> Login Portal -> Advanced in your Synology and clicking on the “Reverse Proxy” button. Enter your domain name for source and the IP address of your Synology for the destination. Be sure to specify port 9333 for the destination. Last, you will need to add your domain name to Nextcloud’s trusted domains which is located in /docker/nextcloud/config/www/nextcloud/config/config.php. That’s it! Now you should be able to access Nextcloud with your domain name.