emelianov / Synology-NextCloud

Setup NextCloud on Synology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Synology-NextCloud

Setup NextCloud on Synology

  1. Synology DSM 6.2 with following packages are installed
  • Web Station
  • Apache Server 2.2
  • Maria DB 10
  • PHP 5.6
  1. Create share to store NextCloud data. Make sure allow read/write to http group share-permission

  2. Login to Synology using your favorite ssh client as admin

  3. Switch to root. (Use admin password again)

admin@DSM6:/$ sudo -i
password:
  1. Go to to web server folder
root@DSM6:~# cd /volume1/web/
root@DSM6:/volume1/web#
  1. Go to Install - NextCloud, click Detail download and options and Copy Link to tar.bz2 archive. (https://download.nextcloud.com/server/releases/nextcloud-12.0.2.tar.bz2 now)

  2. Download NextCloud package to local

root@DSM6:/volume1/web# wget https://download.nextcloud.com/server/releases/nextcloud-12.0.2.tar.bz2
--2017-08-21 20:21:34--  https://download.nextcloud.com/server/releases/nextcloud-12.0.2.tar.bz2
Resolving download.nextcloud.com... 88.198.160.133
Connecting to download.nextcloud.com|88.198.160.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 42756355 (41M) [application/x-bzip2]
Saving to: 'nextcloud-12.0.2.tar.bz2'

100%[=====================================================================================================>] 42,756,355  3.64MB/s   in 20s

2017-08-21 20:21:55 (1.99 MB/s) - 'nextcloud-12.0.2.tar.bz2' saved [42756355/42756355]

root@DSM6:/volume1/web#
  1. Extract downloaded package
root@DSM6:/volume1/web# tar -xf nextcloud-12.0.2.tar.bz2
  1. Change owner to http
root@DSM6:/volume1/web# chown -R http:http nextcloud
  1. Change ownership for NextCloud data directory
root@DSM6:/volume1/web# chown root:http /volume1/nextcloud
  1. Restrict everyone access to NextCloud data
root@DSM6:/volume1/web# chmod 770 /volume1/nextcloud

That's all with CLI.

  1. Open Web Station. Go General settings tab. Set http back-server to Apache 2.2 and PHP to 5.6 back-server

  2. Add :/dev/urandom:/volume1/nextcloud to end of open_basedir php-settings

  3. Make sure that following Extensions are enabled

  • culr
  • gd
  • openssl
  • pdo_mysql
  • zip
  1. Reset Maria DB password to known. Also note port on which DB is listen for requests (3307 at screenshot). php-settings

  2. Open <synology_ip>/nextcloud in browser. Fill

  • Username
  • Password
  • Path to NextCloud Share (created at step 1.)
  • DB user (root)
  • DB user password (set at step 13.)
  • DB name
  • Maria DB IP:PORT (from step 13.) It's better to specify IP (127.0.0.1) rather than name (localhost) as name may not work in same cases. nextcloud-start
  1. Click Finish and wait while NextCloud to be initialized

About

Setup NextCloud on Synology