question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

running BTCPay Server on ports other than 80 and 443

See original GitHub issue

Describe the problem/bug after setting up btcpayserver docker on rpi 3b+ with custom ports http 8083 and https 4430 I can’t access btcpay webpage. I get error 503 and btcpayserver sevice has “active (exited)” status

Your environment rpi 3b+

  • Version of BTCPay Server: latest docker
  • Deployment method: docker on rpi
  • Other relevant environment details: traffic is forwaded to btcpayserver using nginx reverse proxy on another rpi config part: `# Redirect all http traffic to https server { listen 80; return 301 https://$host$request_uri; } #SSL termination and offload for btcpay

upstream btcpayserver { server 192.168.2.135:8083; }

server { listen 443 ssl http2; server_name btcpay.bereskapi-ha.duckdns.org;

ssl_certificate /etc/letsencrypt/live/btcpay.bereskapi-ha.duckdns.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/btcpay.bereskapi-ha.duckdns.org/privkey.pem;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl_prefer_server_ciphers on;

location / {
    proxy_pass http://btcpayserver;

proxy_http_version 1.1;

proxy_set_header Connection “upgrade”;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_set_header X-Forwarded-Proto https;
}

} `

Logs (if applicable) -------SETUP----------- Parameters passed: BTCPAY_PROTOCOL:https BTCPAY_HOST:btcpay.bereskapi-ha.duckdns.org REVERSEPROXY_HTTP_PORT:8083 REVERSEPROXY_HTTPS_PORT:4430 REVERSEPROXY_DEFAULT_HOST:none LIBREPATRON_HOST: WOOCOMMERCE_HOST: BTCTRANSMUTER_HOST: BTCPAY_HOST_SSHKEYFILE: LETSENCRYPT_EMAIL: NBITCOIN_NETWORK:mainnet LIGHTNING_ALIAS: BTCPAYGEN_CRYPTO1:btc BTCPAYGEN_CRYPTO2: BTCPAYGEN_CRYPTO3: BTCPAYGEN_CRYPTO4: BTCPAYGEN_CRYPTO5: BTCPAYGEN_CRYPTO6: BTCPAYGEN_CRYPTO7: BTCPAYGEN_CRYPTO8: BTCPAYGEN_CRYPTO9: BTCPAYGEN_REVERSEPROXY:nginx BTCPAYGEN_LIGHTNING:lnd BTCPAYGEN_ADDITIONAL_FRAGMENTS:opt-save-storage-xs;opt-save-memory BTCPAYGEN_EXCLUDE_FRAGMENTS:nginx-https BTCPAY_IMAGE: ACME_CA_URI:https://acme-v01.api.letsencrypt.org/directory

Additional exported variables: BTCPAY_DOCKER_COMPOSE=/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml BTCPAY_BASE_DIRECTORY=/root/BTCPayServer BTCPAY_ENV_FILE=/root/BTCPayServer/.env BTCPAYGEN_OLD_PREGEN=false BTCPAY_SSHKEYFILE= BTCPAY_SSHTRUSTEDFINGERPRINTS: BTCPAY_CRYPTOS:btc BTCPAY_ANNOUNCEABLE_HOST:btcpay.bereskapi-ha.duckdns.org

BTCPay Server environment variables successfully saved in /etc/profile.d/btcpay-env.sh

BTCPay Server docker-compose parameters saved in /root/BTCPayServer/.env

Using default tag: latest latest: Pulling from btcpayserver/docker-compose-generator fac132c5d16f: Pull complete 70db87399586: Pull complete e027ade004a6: Pull complete 2e1cf48644bb: Pull complete 3af75769c023: Pull complete 6e041858ef5e: Pull complete 7bc274dbb2fb: Pull complete Digest: sha256:59945a6a60d2651a7684a31a6331484b3e13dbaf30ac9c09b62359cea889f2e9 Status: Downloaded newer image for btcpayserver/docker-compose-generator:latest Crypto: btc Lightning: lnd ReverseProxy: nginx Generating /app/Generated/docker-compose.generated.yml With fragments: nginx btcpayserver-nginx btcpayserver opt-add-tor nbxplorer postgres bitcoin bitcoin-lnd opt-save-storage-xs opt-save-memory Generated /app/Generated/docker-compose.generated.yml

Adding btcpayserver.service to systemd Setting limited log files in /etc/docker/daemon.json BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service

Created symlink /etc/systemd/system/multi-user.target.wants/btcpayserver.service → /etc/systemd/system/btcpayserver.service. BTCPay Server starting… this can take 5 to 10 minutes… BTCPay Server started generated_nbxplorer_1 is up-to-date generated_lnd_bitcoin_rtl_1 is up-to-date tor is up-to-date generated_postgres_1 is up-to-date btcpayserver_bitcoind is up-to-date btcpayserver_lnd_bitcoin is up-to-date tor-gen is up-to-date generated_btcpayserver_1 is up-to-date nginx is up-to-date nginx-gen is up-to-date Installed bitcoin-cli.sh to /usr/local/bin: Command line for your Bitcoin instance Installed bitcoin-lncli.sh to /usr/local/bin: Command line for your Bitcoin LND instance Installed btcpay-clean.sh to /usr/local/bin: Command line for deleting old unused docker images Installed btcpay-down.sh to /usr/local/bin: Command line for stopping all services related to BTCPay Server Installed btcpay-restart.sh to /usr/local/bin: Command line for restarting all services related to BTCPay Server Installed btcpay-setup.sh to /usr/local/bin: Command line for restarting all services related to BTCPay Server Installed btcpay-up.sh to /usr/local/bin: Command line for starting all services related to BTCPay Server Installed btcpay-update.sh to /usr/local/bin: Command line for updating your BTCPay Server to the latest commit of this repository Installed changedomain.sh to /usr/local/bin: Command line for changing the external domain of your BTCPay Server pi@bereskapi:~ $ sudo systemctl status btcpayserver ● btcpayserver.service - BTCPayServer service Loaded: loaded (/etc/systemd/system/btcpayserver.service; enabled; vendor preset: enabled) Active: active (exited) since Mon 2019-06-24 00:25:57 MSK; 32min ago Process: 10493 ExecStop=/bin/bash -c . /etc/profile.d/btcpay-env.sh && cd "$BTCPAY_BASE_DIRECTORY/btc Process: 11341 ExecStart=/bin/bash -c . /etc/profile.d/btcpay-env.sh && cd "$BTCPAY_BASE_DIRECTORY/bt Main PID: 11341 (code=exited, status=0/SUCCESS) Memory: 0B CPU: 0 CGroup: /system.slice/btcpayserver.service

Jun 24 00:25:21 bereskapi bash[11341]: Creating generated_postgres_1 … Jun 24 00:25:21 bereskapi bash[11341]: Creating generated_lnd_bitcoin_rtl_1 … Jun 24 00:25:29 bereskapi bash[11341]: [158B blob data] Jun 24 00:25:29 bereskapi bash[11341]: Creating tor-gen … Jun 24 00:25:36 bereskapi bash[11341]: [276B blob data] Jun 24 00:25:45 bereskapi bash[11341]: [99B blob data] Jun 24 00:25:45 bereskapi bash[11341]: Creating nginx … Jun 24 00:25:50 bereskapi bash[11341]: [158B blob data] Jun 24 00:25:57 bereskapi bash[11341]: [59B blob data] Jun 24 00:25:57 bereskapi systemd[1]: Started BTCPayServer service. To Reproduce Steps to reproduce the behavior:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior Tell us what happens instead

Screenshots/Links If applicable, add screenshots or links to help explain your problem.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bereskacommented, Jun 28, 2019

@NicolasDorier, it’s ok) please keep up your great coding work on btcpay server and other apps! I’ll keep on experimenting with the btcpay server on arm devices since it’s the cheapeast, most distributed and non-custodial way of growing bitcoin and lightning networks. By the way, upgrading to lnd v0.7.0-beta-rc2 and btcpay server v1.0.3.118 on my rpi’s did bring the memory and CPU usage down and improve overall web-front user experience a lot. So if rpi 3 with just 1 gb ram can pull it off, the new rpi 4 with 2-4 gb ram will rock)

0reactions
NicolasDoriercommented, Jun 29, 2019

docker is way easier to learn than managing to build all the stuff by yourself on a PI!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction | BTCPay Server
First, make sure you have a domain name pointing to your host A record , with ports 443 and 80 externally accessible. For...
Read more >
Deployment FAQ | BTCPay Server
How can I run BTCPay on testnet? Can I start BTCPay only when I'm expecting a payment? Can I connect to my BTCPay...
Read more >
Extended Manual Setup
If your server is behind NAT then you need to forward port 80 to your instance. The certbot script works by checking for...
Read more >
BTCxZelko / btcpayserver-docker
Docker resources for hosting BTCPayServer easily. ... Can I run BTCPay Server on ports other than 80 and 443? You can change the...
Read more >
Hardware Deployment
BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes. ... Static IP; Domain Name; Ability to open ports (80,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found