Sample Header Ad - 728x90

503 Service Temporarily Unavailable while using nginx/traefik with EasyPanel & BTCPayServer?

0 votes
1 answer
306 views
I'm doing this all on Debian 12 VPS. * I can install [easypanel](https://easypanel.io) separately & get it working with SSL enabled. * I can install [btcpayserver](https://github.com/btcpayserver/btcpayserver-docker/) separately using [this guide](https://sethforprivacy.com/guides/accepting-monero-via-btcpay-server/) to get BTC/XMR working. * But I can't manage to get both of them working on the same VPS at the same time. I'v tried installing Easypanel first & then installing BTCPayServer but BTCPayServer doesn't get installed at all giving me an error that says:
ERROR: for nginx: Bind for 0.0.0.0:443 failed: port is already allocated
Now I've went the opposite way & installed BTCPayServer first & later on installed EasyPanel. Now it is working. But I can't access my Next.js app that is running on easypanel. I can't even setup a custom URL that on easypanel.mysite.com for some reason. I'm thinking this is due to Nginx which BTCPayServer uses or Traefik which EasyPanel uses. I currently get 503 Service Temporarily Unavailable when I try to open the Next.js app I installed on EasyPanel. How do I go about solving this problem? Easypanel has a [doc about this](https://easypanel.io/docs/guides/custom-traefik-config) . So I did what it said with the help of [Perplexity](https://perplexity.ai) : ### /etc/easypanel/traefik/config/custom.yaml
# Enable debug logs
log:
  level: DEBUG

# Define the entry points
entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"

# Enable and configure Let's Encrypt
certificatesResolvers:
  myresolver:
    acme:
      email: "myemail@gmail.com"
      storage: "/etc/traefik/acme/acme.json"
      httpChallenge:
        entryPoint: "web"

# Configure the API
api:
  insecure: true
  dashboard: true

# Define the global configuration
global:
  checkNewVersion: true
  sendAnonymousUsage: true

# Configure access to Docker
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false

# Configure the entry points for the services
http:
  routers:
    btcpayserver-router:
      rule: "Host(btcpay.mysite.com)"
      service: "btcpayserver-service"
      entryPoints:
        - "websecure"
    easypanel-router:
      rule: "Host(easypanel.mysite.com)"
      service: "easypanel-service"
      entryPoints:
        - "websecure"

  services:
    btcpayserver-service:
      loadBalancer:
        servers:
          - url: "http://btcpayserver-docker:80 "
    easypanel-service:
      loadBalancer:
        servers:
          - url: "http://easypanel:80 "
But I can't find out what http://btcpayserver-docker:80 should be replaced with. When I ran docker ps --format "table {{.ID}}\t{{.Names}}" I got this:
CONTAINER ID   NAMES
969e4c50ec21   easypanel.1.vzayltvbta10oaqc3wpnztkq2
37e61e15eab5   sinister-kings_nextjs-app.1.lym2ck5oa18gdtfr3lcirz9rf
7999d7177605   letsencrypt-nginx-proxy-companion
24691446a0bd   nginx-gen
d295cc6dbcd3   btcpayserver_monero_wallet
9f2ed203c36d   generated_nbxplorer_1
b9b8b4463c3d   btcpayserver_bitcoind
f6337df09401   generated_btcpayserver_1
696ff12c318d   tor-gen
aa89e0b619b2   generated_postgres_1
fe8d006707dd   nginx
11cf23a5363d   btcpayserver_monerod
f7d42ade4300   tor
Which one of the btcpayserver do I use on the custom traefik config? Is that config all I need? I know I have to use Reverse Proxy & make one of them go through the others ports but I'm confused on how do I make that work?
Asked by deadcoder0904 (101 rep)
Jan 12, 2024, 07:18 AM
Last activity: Jan 12, 2024, 08:07 PM