OK, I solved it with ChatGPT’s help.
Full discussion below.
This is very likely fixable. The good news is that you almost certainly did not lose your files — the problem is probably just that the config.php file now has incorrect permissions or formatting after being edited in Notepad++ on Windows.
The specific error:
“Cannot write into config directory”
usually means one of these happened:
-
config.php ownership/permissions changed when you copied it back
-
Windows line endings or encoding broke the file
-
the config folder became owned by the wrong user
-
config_is_read_only was added incorrectly
Here are the safest and simplest steps.
Step 1 — SSH into your Umbrel Pro
From your PC terminal:
ssh umbrel@umbrel.local
(or use the Umbrel Pro IP address if .local doesn’t work)
Step 2 — Find the Nextcloud app folder
Run:
cd ~/umbrel/app-data/nextcloud/data/nextcloud/config
ls -l
You should see config.php.
Paste the result here if you want me to verify it.
Step 3 — Fix ownership and permissions
This is the most likely fix.
Run these commands exactly:
sudo chown -R 33:33 ~/umbrel/app-data/nextcloud/data/nextcloud/config
sudo chmod 750 ~/umbrel/app-data/nextcloud/data/nextcloud/config
sudo chmod 640 ~/umbrel/app-data/nextcloud/data/nextcloud/config/config.php
(33:33 is the www-data user inside the container.)
Step 4 — Check if config.php is broken
Run:
cat ~/umbrel/app-data/nextcloud/data/nextcloud/config/config.php
Look for obvious issues like:
The trusted domains section should look roughly like this:
'trusted_domains' =>
array (
0 => 'umbrel.local',
1 => '100.x.x.x',
),
Do NOT use semicolons inside the array.
Step 5 — Restart Nextcloud
Run:
sudo ~/umbrel/scripts/app restart nextcloud
Wait about 1–2 minutes.
Then try opening Nextcloud again.
Step 6 — If it still fails
Run:
sudo ~/umbrel/scripts/app logs nextcloud --tail 100
and paste the output here.
Important note about Tailscale + Nextcloud
You usually do not need to add your phone’s temporary Tailscale IP to trusted domains every time.
Instead, the better solution is usually to add either:
-
your Umbrel Tailscale hostname
-
or the Umbrel LAN hostname
-
or configure a proper reverse proxy/domain
Adding device IPs manually can become messy.
Also, editing config.php from Windows can sometimes break permissions. In the future, edit it directly on Umbrel using:
nano config.php
instead of copying files back and forth.
I follow step 1 but powershell asks me for the Umbrel’s password and then I can’t type anything
That’s normal — Linux password prompts in PowerShell/Terminal are invisible for security reasons. Nothing appears on screen while typing.
Just:
-
Type your Umbrel password carefully
-
Press Enter
Even though you see no characters, it is accepting input.
If the password is correct, you should then see something like:
umbrel@umbrel:~$
If it says “Permission denied”, try again carefully.
Also:
If ssh umbrel@umbrel.local does not connect at all, use the Umbrel Pro IP instead, for example:
ssh umbrel@192.168.x.x
You can find the IP from your router or from the Umbrel dashboard.
umbrel@umbrel:~$ cd ~/umbrel/app-data/nextcloud/data/nextcloud/config ls -l total 98 -rw-r–r-- 1 www-data www-data 60 Apr 17 14:49 apache-pretty-urls.config.php -rw-r–r-- 1 www-data www-data 70 Apr 17 14:49 apcu.config.php -rw-r–r-- 1 www-data www-data 377 Apr 17 14:49 apps.config.php -rw-r–r-- 1 www-data www-data 2110 Apr 17 14:49 autoconfig.php -rw-r–r-- 1 umbrel umbrel 1479 May 10 11:06 config.php -rw-r–r-- 1 www-data www-data 95671 Apr 17 14:49 config.sample.php -rw-r–r-- 1 www-data www-data 700 Apr 17 14:49 redis.config.php -rw-r–r-- 1 www-data www-data 991 Apr 17 14:49 reverse-proxy.config.php -rw-r–r-- 1 www-data www-data 2235 Apr 17 14:49 s3.config.php -rw-r–r-- 1 www-data www-data 933 Apr 17 14:49 smtp.config.php -rw-r–r-- 1 www-data www-data 1103 Apr 17 14:49 swift.config.php -rw-r–r-- 1 www-data www-data 60 Apr 17 14:49 upgrade-disable-web.config.php umbrel@umbrel:~/umbrel/app-data/nextcloud/data/nextcloud/config$
is this the result for step 2?
Yes — and this already shows the problem.
Every other file is owned by:
www-data www-data
but your config.php is owned by:
umbrel umbrel
That happened when you copied the file back from Windows, and it’s why Nextcloud is failing.
Now run these commands exactly:
sudo chown www-data:www-data ~/umbrel/app-data/nextcloud/data/nextcloud/config/config.php
sudo chmod 640 ~/umbrel/app-data/nextcloud/data/nextcloud/config/config.php
sudo ~/umbrel/scripts/app restart nextcloud
Then wait about 1–2 minutes and try opening Nextcloud again.
There’s a very good chance this alone fixes it.
Followed to the letter and a minute later it worked.