Vaultwarden with nginx

I want to use nginx as a reverse proxy for vaultwarden but I’m having trouble getting it to work.

When I forward my URL in nginx on the vaultwarden port, I don’t get the service.

Instead, I receive the default page from nginx stating that the URL is not configured.
It’s not the first time I’ve used nginx.

Is anyone able to assist me?

I’m using TrueNAS Scale ElectricEel-24.10.0.

Thank you for your help!

Why are you using nginx, and not nginx proxy manager?

Btw, can you share some info on how you setup nginx?

Sorry for the confusion. Yes, I’m using the Nginx Proxy Manager from the TrueNAS catalog.

Below is my Nginx Proxy Manager configuration, set with the correct port for my VaultWarden service:


I haven’t configured HTTPS yet. I prefer to start with HTTP, and if that works correctly, I’ll proceed to set up HTTPS.

When I try to access my service through my URL, I get this result:


On TrueNAS, I have configured VaultWarden as follows:
image
image

Thanks for your help.

Best regards,

The NPM setting seems correct to me.

Despite, honestly don’t know what this env variable i see in the screenshot of VW Is supposed to do, but i would try to check the enable websocket as first thing.

Im using this simple conf on 2 different machine flawlessy, maybe give It a try if you want exclude problemi on NPM and focus on VW

services:
  vaultwarden:
    container_name: vaultwarden
    environment:
      - ROCKET_PORT=80
      - ROCKET_ENV=production
    image: vaultwarden/server:latest
    ports:
      - '83:80'
      - '84:443'
    restart: unless-stopped
    volumes:
      - ***:/data
version: '3.8'

Hi,

I apologize for my late response. I’m currently a student, so I don’t have much time for my hobbies due to classes.

I was wondering if you could probably tell me what filename I need to modify manually to set up Nginx Proxy Manager on Vault Warden. If possible, I would prefer not to reinstall Vault Warden as I’ve been using this instance for a long time.

Recently, I learned about Nginx Proxy Manager and decided to move all my services onto it to remember only the URL without port numbers. My Vault Warden has a very important database, so if there’s an alternative solution, that would be greatly appreciated.

Thank you for your help.
Best regards,

Hi!

No, i can’t, and you shouldn’t act that way.

Totally fair, my bad on that (through was a new install). Btw, until you don’t lose the mounted folder, a new install keep ur data.

Can you ping your Vaultwarden from nginx? Nor ip and hostname