NextCloud Install Instructions Attached

Has anyone gotten NextCloud to successfully install on the DL Series?

Hopefully an experienced User will be able to assist, if possible. On any case, please bear in mind such proceedings are not warranted or supported by Western Digital.

Nextcloud is working. Here’s my setup…

(I have attached a word document that uses XML fields to help you use your own parameters…)
nextcloud on my cloud 3.zip (25.3 KB)

I am predominantly using commands that I find here:
https://hub.docker.com/r/wonderfall/nextcloud/

Variable that you will need to decide on:
Item Name
Share for Storage: nextcloudfiles
Share for NC Config: ncconfig
Share for NC Apps: ncapps
Share for DataBase: ncdb
Root User Pass for MariaDB: dbrootpass
Name of Next Cloud Database: nc_database
Name of DB User for Next Cloud Database: ncd_user
Pass of DB User for Next Cloud Database: ncd_pass
MariaDB Container Name: MariaDB
NextCloud Container Name: NextCloud
NextCloud Admin User: admin
NextCloud Admin User Pass: myadminpass
Port Mapping 8080

Presteps:

  1. Created nextcloudfiles share for housing the main files while logged into the web admin interface on the DL4100. This will be at “/shares/nextcloudfiles” to my docker stuff.
  2. Created ncconfig share for housing the main files while logged into the web admin interface on the DL4100. This will be at “/shares/ncconfig” to my docker stuff.
  3. Created ncapps share for housing the main files while logged into the web admin interface on the DL4100. This will be at “/shares/ncapps” to my docker stuff.
  4. Created ncdb share for housing data using the web admin interface on the DL4100. This will be at “/shares/ncdb” to my docker stuff.
  5. Make sure admin has full access to the shares created in steps 1-4 using the MyCloud Interface
  6. Enabled SSH from web admin interface.

Download Docker Images

Used putty.exe to SSH into the DL4100

docker pull wonderfall/nextcloud:11.0
This didn’t complete, so I repeated it a few times until it was successful.
docker pull mariadb:10.1
This didn’t complete, so I repeated it a few times until it was successful.
Testing:
Use Command: docker images to see results:
root@WDMyCloudDL4100 root # docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
mariadb 10.1 ee0ad06aeba6 3 weeks ago 390 MB
wonderfall/nextcloud 11.0 70810a5bd5aa 4 weeks ago 236 MB

Start MariaDB using the storage space we created in the prestep:

docker run --name MariaDB -v /shares/ncdb:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=dbrootpass -e MYSQL_DATABASE=nc_database -e MYSQL_USER=ncd_user -e MYSQL_PASSWORD=ncd_pass -d mariadb:10.1

(Tip: Copy above command line and use right mouse button to paste into putty terminal session)

Start NextCloud

docker run --name NextCloud --link MariaDB:db_nextcloud -v /shares/nextcloudfiles:/data -v /shares/ncconfig:/config -v /shares/ncapps:/apps2 -e UID=1000 -e GID=1000 -e UPLOAD_MAX_SIZE=10G -e APC_SHM_SIZE=128M -e OPCACHE_MEM_SIZE=128 -e REDIS_MAX_MEMORY=64mb -e CRON_PERIOD=15m -e TZ=Etc/UTC -e ADMIN_USER=admin -e ADMIN_PASSWORD=myadminpass -e DB_TYPE=mysql -e DB_NAME=nc_database -e DB_USER=ncd_user -e DB_PASSWORD=ncd_pass -e DB_HOST=MariaDB -p 8080:8888 -d wonderfall/nextcloud:11.0

Nextcloud did not let me in, as the domain was untrusted… so I stopped the container (docker stop nextcloud), and went to share/ncconfig and used nano to add host file in config.php using instructions I found in https://help.nextcloud.com/t/adding-a-new-trusted-domain/26. I then restarted the container using (docker start nextcloud)

I could then login locally. (using https://IPaddress:8080)

I will add more fun on the next reply.

ADVANCED (To me anyway!):

To access remotely is a different animal. My ISP blocks port 80, so I purchased an SSL Cert, and also did some port mappings… the following may help, or you will need to follow the instructions of your SSL place. If you have port 80, I would suggest using let’s encrypt.

I used the SSL certificate through rapidssl.

I used their instructions to create an SSL. I needed to modify the nginx.conf. It was stored in /etc/nginx within the alpine linux distro in docker. To get there, or for any reason you wish to enter the container and poke around, use
docker exec -i -t CONT_ID /bin/sh

I stored my ssl certificates in my config directory, stored at /config/RapidSSL

I Added the following to nginx.conf using vi

ssl on;
ssl_certificate /config/RapidSSL/ssl_cert.cer;
ssl_certificate_key /config/RapidSSL/Private-Key-File.key;

Remember to stop and start container to commit changes:

Type exit to return to the MYCloud Shell. Then:

docker stop CONT_ID
docker commit CONT_ID
docker start CONT_ID

Hello Robclay,

Thx for you’re great tutorial.

I tried and succed to install nextcloud on WD DL 2100. i can access it from my localnetwork.

But i can’t access to nextcloud from outside my network. Edit : i can acces on port 8080 for remote access but i didn’t succeed on port 443.

I tried to follow you’re advanced tuto to enabled SSL but i didn’t succeed it.

I use open ssl to create my own ssl certificate. it gives me an certificate.crt and not *.cer…

Could you detail the port mappings change you did for you’re mycloud devices ?

Did you change listenning port in nginx.conf or did you just add ssl on…

THx in advance.