EDIT: if you use the 3-container stack, it’s a bit easier to make changes to the nginx config, see multiarch-letsencrypt-nginx-proxy/docker-compose.yaml at master · stefaang/multiarch-letsencrypt-nginx-proxy · GitHub
I have a WD My Cloud, too. I always use Windows OS. As the WD My Cloud Desktop is not working a long time, and I have to visit it by Western Digital. While my WD device has not been able to connect mostly. It makes the device becomes a storage disk at home.
Coincidently I found this post. While I know almost nothing about this. Although I tried and searched a lot, it seems still very difficult for me.
Following your steps and my understanding,
- I installed a Docker Desktop on my Win10, not run a NextCloud image till now.
- I applied a free domain online.
- I set and open the port 80 and 443 in the router.
- I installed a PuTTY to into My Cloud.
That’s all I did. And I am stuck here and I don’t how to do next. I think I have a misunderstanding on Step 1. Please give me more guide.
And I want to make sure if it works finally, does that mean I can access my cloud using the NextCloud’s applications for Desktop and mobile?
If you can’t get past step 1, this guide won’t be for you. Sorry mate.
I’ve been playing with Owncloud and Nextcloud on lighttpd via Entware on an EX2 Ultra box and added my findings here:
I added these features to the original guide:
- LetsEncrypt certificates
- Redis cache
- MySQL data store
- Browser caching for better browser experience
It’s an alternative to the docker based setup and seems to be a bit more stable.
I may even put all of it into a simple package.
there are plans to officially support the nextcloud
There’s no official support planned.
But I did spend a lot of time tweaking my entware based installation and it runs way smoother than the docker based installation. I also have a workaround for the disabled WD web interface.
I’d say, stay tuned and subscribe to this topic as a huge update is on the way.
At first: thanks a lot for this Guide !.
My NextCloud with Docker installation is already finish.
Only one question : How do I connect my NextCloud container to the MySQL database?
Using the standard SQlite I can setup the NextCloud without issues, but if I try to change the Database (at the setup beginning) an error message appears saying the following :
“Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000]  No such file or directory”
My NAS: PR2100 FW: 2.31.195
Thanks in advance for any help
The WD OS runs a MySQL server.
ps w | grep mysql netstat -tulnp | grep 3306
Either you stop this server or you run the docker MySQL on another port.
I’d suggest to remove all containers (docker-compose down and docker container prune).
Then setup again and verify the db container is running
I believe I had to link them in the last field with 127.0.0.1:3306, I remember some issues with name resolution for localhost.
docker logs for anything going wrong.
Thank you so much for your help Tfl !.
The solution was:
1 - I completed the Setup instalaltion again using the standard SQlite DB
2 - Using the “Portainer” I just add this Container: - apache_app_1; apache_letsencrypt_companion_1; apache_proxy_1 to the “Network” : apaIche_default (see image attached).
3 - docker-compose down
4 - COMPOSE_HTTP_TIMEOUT=120 docker-compose up
and now the docker container is connected to the MySQL DB.
I have no Idea why , but I’m very happy to see that is working fine.
And thanks again Tfl for your help and for this incredible GUIDE!
Glad it works for you. I think you may remove that apache_proxy-tier network, just put all containers in a single network.
Question, by typing this command:
docker-compose up -d
i get this error:
-sh: docker-compose: not found
Any Ideas ?
I don’t get past “pip install docker-compose” keeps saying not enough space on the device.
Any idea what I can delete or something? I tried using the -t option but it doesn’t work…
As mycloud.com is down since more than ten days, I’ll give nextcloud a try. However, one question in advance before I try: Does “web interface” refers to the web frontend accessible via mycloud.com or to the admin frontend accessible from your LAN? If the latter, how do you admin your device than? Thanks.
Thanks a lot for your efforts. Are there any updates on the entware based installation?
Does this guide also work on the EX2 Ultra on My Cloud OS 5?
I didn’t manage to make if fully dummy proof, so it won’t work out of the box.
But I’ve been running this on an EX2Ultra for a while and it was way better than the docker version, especially when I preprocessed the pictures with libepeg (2 to 5 times faster than libjpeg) to generate previews and thumbnails.
Unfortunately it’s been left untouched for a while now.
I’m very interested in this project.
I have laying around a My Cloud HOME (MCH), and I was wondering if this version is capable to run the NextCloud.
I know it’s a ARM CPU and there are some instructions here form ARM CPU, but in the 3rd party applications I see no reference to the to the MCH version bin file.
Would be great to be able to change to NextCloud.
Hi,in your case,nextcloud container do not share an IP with MySQL server, so if you want to connect nextcloud to mycloud built in MySQL:
- MySQL user ‘username’@‘%’ must be created
- The IP(the same as Mycloud LAN IP) of MySQL sever instead of “localhost” in nextcloud initialize page
Even if you can connect to the buildin MySQL server,there is still something error(utf8mb4 problem) because the version of MySQL is too low.I haven’t figure out how to solve this yet
Nice tutorial! Bit late to the game!
The file /usr/local/apache2/conf/extra/ports.conf on my PR4100 looks completely different that what’s shown in this tutorial.
root@MyCloudPro home # cat /usr/local/apache2/conf/extra/ports.conf Listen 127.0.0.1:8000
I’m running My Cloud OS 5 Firmware 5.22.113.
Is there any other file to change the ports 80 & 443 for the WD Dashboard?
Edit: /usr/local/config/config.xml contains the config to the web interface including a line with ‘port 80’ in it.
root@MyCloudPro home # cat /usr/local/config/config.xml | grep -B 3 -A 1 '>80<' <web> <ssl_enable>0</ssl_enable> <ssl_port>8543</ssl_port> <port>80</port> </web>