Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

How to add a service to the setup? #196

Closed
thimplicity opened this issue Jun 22, 2023 · 2 comments
Closed

How to add a service to the setup? #196

thimplicity opened this issue Jun 22, 2023 · 2 comments

Comments

@thimplicity
Copy link

Hi,
I know that this is definitely not an issue with the package itself. That works great and thanks for putting this together.

I would like to enhance the setup by adding ntfy to my setup. I am OK familiar with adding it to authelia, but I have no idea, how to add the subdomain to duckdns or get from the IP:port of the ntfy docker image to the URL. At home I use NPM for that, but I was not able to find the bunkerweb config files to check whether I can add it there. If that is the place to look.

Although it is not connected to your project, I would appreciate some guidance.

@k-wlosek
Copy link

Assuming you got the original playbook working, just add the subdomain in similar fashion to previous ones (unless you're using wildcard subdomain, then you don't need to do that).

If you want to add ntfy to Bunkerweb reverse proxy, you can:

  1. Add ntfy container to common network with Bunkerweb - ex. wg_network, created by the playbook. Also, give the container a name (or hostname).
  2. In roles/bunkerweb/templates/env.j2
SERVER_NAME = <existing ones> yourdomain.com

# Allow Bunkerweb to serve ntfy
yourdomain.com_REVERSE_PROXY_URL=/
yourdomain.com_REVERSE_PROXY_HOST=http://ntfy-container-hostname:80
## If using authelia for ntfy
yourdomain.com_REVERSE_PROXY_AUTH_REQUEST=/authelia
yourdomain.com_REVERSE_PROXY_AUTH_REQUEST_SIGNIN_URL=https://{{ authelia_host }}/?rd=$scheme%3A%2F%2F$host$request_uri

Also, if you're using authelia, add the neccessary configuration for it as well.
3. Re-run the playbook. As we're only editing bunkerweb, it should be ok to only run ansible-playbook --ask-vault-pass run.yml --tags bunkerweb

As a result, you should be able to reach ntfy at yourdomain.com.

@MacchiaGuardala
Copy link

newbie doubts about vaultwarden container:

On my vps I set roles/bunkerweb/templates/env.j2 as @k-wlosek suggests, but trying to create the account for valutwarden I get an error about HTTPS required, while if I prepend https:// to domain:port I get SSL_ERROR_RX_RECORD_TOO_LONG
Will @Schwarzeisc00l from #129 succeed?

My docker-compose.yml for test

version: '3'

services:
  vaultwarden:
    image: vaultwarden/server:alpine
    networks:
      - default
    restart: always
    container_name: vaultwarden
    ports:
      - 8080:80
    volumes:
      - ${PWD}/data:/data
    environment:
      - WEBSOCKET_ENABLED=true
      - SIGNUPS_ALLOWED=true

I should read well and really understand this stuff at least:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants