Nextcloud VM behind npm

,
  • Nextcloud Server version :

    • 33.02
  • Operating system and version:

    • Ubuntu 22.04
  • Web server and version:

    • Apache 2.4.52
  • Reverse proxy and version

    • nginx2.11.3 (in another server)
  • PHP version :

    • 8.2.30
  • Is this the first time you’ve seen this error? (Yes / No):

    • No
  • When did this problem seem to first start?

    • I can't connect with IOS based OS
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)

    • Virtual machine

    Are you using CloudfIare, mod_security, or similar? (Yes / No)

    • No

Summary of the issue you are facing:

I’m using the VM provided by Nextcloud VM – T&M Hansson IT AB

By default this VM is configured to use https, but I need it only works with http, as it will be behind a npm proxy that redirects the request.

When I point to http, it shows an information page that informs you should use https

I’ve tryed to dissabled the apachee enabled sites but I’ve not solved the issue.

Thanks in advance!

Personally, I would probably not spend too much time trying to adapt that prebuilt VM to this use case.

If it were me, I would rather deploy a clean Ubuntu VM and install Nextcloud AIO from scratch. In the long run, that is usually simpler, cleaner, and easier to troubleshoot.

The main issue with prebuilt appliances is that you inherit a lot of decisions you did not make yourself. In your case, you are already fighting the way that VM handles HTTPS internally, instead of just building the setup exactly the way you want it from the beginning.

A few reasons why I would prefer a clean VM:

  • that image is still based on Ubuntu 22.04, while for a new deployment I would rather start with 24.04

  • you do not really know what filesystem and storage layout were chosen there

  • for example, I personally prefer XFS, especially for working with larger files

  • you can also define your own swap during setup; in my case, an 8 GB swap file was definitely a good choice

  • same with Docker: with a prebuilt VM, you do not fully control what exactly is installed and how it is configured, and that can later create unnecessary complications

So from my perspective, it is often easier and also more time-efficient to do a fresh install where you know exactly what you have, instead of trying to reverse-engineer a preconfigured appliance and then chasing side effects.

If your goal is to run Nextcloud behind Nginx Proxy Manager, I would strongly lean toward a clean VM + Nextcloud AIO deployment. You can take inspiration from my guide here, where I documented a working Proxmox + NPM + Nextcloud AIO setup:

So in short:
for a fresh deployment, I think a clean install is the more transparent and future-proof route than trying to make the appliance behave differently from how it was originally built.

Thank you very much for your answer.
Definetly I will follow your advice ant start from the beginning with a fresh installation.
Best regards,
Joaquin.