Nextcloud onion address serves raw index.php instead of executing PHP — LAN works, Tor broken

Setup:

  • Start9 Server One (4TB / 32GB RAM)
  • StartOS 0.3.5.1 (fresh install, flashed from startos-0.3.5.1-39de098_x86_64-nonfree.iso)
  • Nextcloud 32.0.11 from the marketplace, fresh install
  • Clients: Windows 11 laptop + iPhone 16e

Problem: Nextcloud works over LAN but is broken over Tor. Visiting the onion address in Tor Browser downloads index.php (3.6 KB) as a file instead of rendering the page. Same behavior at / and /index.php directly, after clearing Tor Browser data and restarting the browser, and after restarting the Nextcloud service.

Diagnostics: Install logs are clean — PostgreSQL initializes, Nextcloud installs successfully, trusted_domains are set for both the .onion and .local addresses, and php-fpm reports “ready to handle connections.” The only ERROR is a transient oc_circle_circles does not exist during the first-run Circles upgrade, which appears self-resolving.

Fetching headers over Tor shows the onion port serving the docroot as static files rather than proxying to PHP:

curl -x socks5h://127.0.0.1:9150 -I http://.onion/
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html
Content-Length: 331
Last-Modified:
ETag: “6a571460-14b”
Accept-Ranges: bytes

The 331-byte response with Last-Modified/ETag/Accept-Ranges looks like nginx serving a static index.html (the stub that redirects to index.php), then serving index.php itself as a static file — i.e., the Tor interface appears wired to a static-file server block instead of the PHP-enabled vhost. LAN access to the same instance renders normally.

Also seeing nginx warnings at startup: the “listen … http2” directive is deprecated (default.conf lines 25/26) — possibly unrelated.

Impact: No Tor access from any device. On iOS (iPhone 16e) this leaves

Just add the s to http. Then bookmark the link, for future use.

Tried that of course, thanks. All I get is a spinning wheel on my iPhone app. Scanned the QR code from the desktop, spinning wheel. Can’t figure this out. Tried another phone, spinning wheel.

AI told me that because my home wi-fi uses pods that it could be causing the issue. Can’t figure this out.

Solution found: install Orbot on iPhone and use the .onion address!