From 22b0ed049622aad934d8cdb8ae9bbb507744d317 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 29 Sep 2022 10:31:10 +0100 Subject: [PATCH 1/4] Added Caddy --- docs/guide/installation.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 2b058754d..e77e301d2 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -292,6 +292,41 @@ Save the file and run the following commands: sudo systemctl enable lnbits.service sudo systemctl start lnbits.service ``` +## Running using Caddy reverse proxy with automatic https + +Point your domain at the IP of the server you're running LNbits on, by making an `A` record. + +Install Caddy on the server +https://caddyserver.com/docs/install#debian-ubuntu-raspbian + +``` +sudo caddy stop +``` +Create a Caddyfile +``` +sudo nano Caddyfile +``` +Assuming your LNbits is running on port `5000`: +``` +yourdomain.com { + handle /api/v1/payments/sse* { + reverse_proxy 0.0.0.0:5000 { + header_up X-Forwarded-Host legend.lnbits.com + transport http { + keepalive off + compression off + } + } + } + reverse_proxy 0.0.0.0:5000 { + header_up X-Forwarded-Host legend.lnbits.com + } +} +``` +Save and exit `CTRL + x` +``` +sudo caddy start +``` ## Running behind an apache2 reverse proxy over https Install apache2 and enable apache2 mods From 55b0814d932bda58545ba25cf95f5cac02477039 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 29 Sep 2022 10:34:03 +0100 Subject: [PATCH 2/4] added intro --- docs/guide/installation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index e77e301d2..21ee307a8 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -292,7 +292,9 @@ Save the file and run the following commands: sudo systemctl enable lnbits.service sudo systemctl start lnbits.service ``` -## Running using Caddy reverse proxy with automatic https +## Setting up a Caddy reverse proxy with automatic https + +USe Caddy to easily make your LNbits install accessible over clearnet with a domain and https cert. Point your domain at the IP of the server you're running LNbits on, by making an `A` record. From 7de17485d39e262f81e0dfd0cbc61b22cab3f1dc Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 29 Sep 2022 10:34:53 +0100 Subject: [PATCH 3/4] typo --- docs/guide/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 21ee307a8..d79363af3 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -294,7 +294,7 @@ sudo systemctl start lnbits.service ``` ## Setting up a Caddy reverse proxy with automatic https -USe Caddy to easily make your LNbits install accessible over clearnet with a domain and https cert. +Use Caddy to make your LNbits install accessible over clearnet with a domain and https cert. Point your domain at the IP of the server you're running LNbits on, by making an `A` record. From 9c575b7d3a46f355ec01dad4b27de70b9be4c440 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 29 Sep 2022 10:37:16 +0100 Subject: [PATCH 4/4] typo --- docs/guide/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index d79363af3..7f2aefdcf 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -292,7 +292,7 @@ Save the file and run the following commands: sudo systemctl enable lnbits.service sudo systemctl start lnbits.service ``` -## Setting up a Caddy reverse proxy with automatic https +## Reverse proxy with automatic https using Caddy Use Caddy to make your LNbits install accessible over clearnet with a domain and https cert. @@ -308,7 +308,7 @@ Create a Caddyfile ``` sudo nano Caddyfile ``` -Assuming your LNbits is running on port `5000`: +Assuming your LNbits is running on port `5000` add: ``` yourdomain.com { handle /api/v1/payments/sse* {