1
submitted 1 year ago by ram@lemmy.ca to c/selfhosted@lemmy.world

I'm used to cloudflared CLI, and would prefer to keep the config files server-side.

My docker-compose.yml file is:

version: '3.9'
services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: always
    environment:
      - WEBSOCKET_ENABLED=true
    volumes:
      - ./vw-data:/data
  tunnel:
    container_name: cloudflared-tunnel
    image: cloudflare/cloudflared
    restart: always
    command: tunnel --config /etc/.cloudflared/config.yml run
    volumes:
        - ./cloudflared:/etc/.cloudflared

My config.yml is:

tunnel: [tunnelid]
credentials-file: /etc/.cloudflared/[tunnelid].json
ingress:
 - hostname: [mydomain]
   service: http://localhost:80
 - service: http_status:404

I've noticed online people setting an env variable TUNNEL_TOKEN, but since I'm using self-hosted files, my token is a cert.pem.

Another issue however is that when I run this and try to browse to the page, I get the error ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:80: connect: connection refused.

Any assistance would be beloved ♥

top 6 comments
sorted by: hot top controversial new old
[-] singinwhale@lmy.singinwhale.com 1 points 1 year ago

Out of curiosity: why are you putting vaultwarden behind a cloudflare tunnel?

[-] ram@lemmy.ca 2 points 1 year ago

My ISP blocks ports 80 and 443. Cloudflare tunnelling was the only workaround I could figure to get web interfaces working ^^

[-] ALERT@sh.itjust.works 0 points 1 year ago

That's a shitty ISP. Why the fuck do they tell you how you operate your access to the interwebz?!

[-] ram@lemmy.ca 1 points 1 year ago

It's against their TOS to use it for a webserver 🥴

[-] ALERT@sh.itjust.works 3 points 1 year ago

It's against my TOS to use shitty ISPs :D

[-] jalim@jalim.xyz 1 points 1 year ago

You’re using localhost in your config file so probably want to change that to http://vaultwarden/ so it knows which docker service to point to.

load more comments
view more: next ›
this post was submitted on 03 Jul 2023
1 points (54.5% liked)

Selfhosted

39251 readers
209 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS