[skip ci] add nginx reverse proxy setup
MODIFY
WalletWasabi.Documentation/BackendDeployment.md
WalletWasabi.Documentation/BackendDeployment.md
@@ -205,12 +205,55 @@ tor
pgrep -ilfa tor
```
+## 8. Setup nginx
+
+https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.0&tabs=aspnetcore2x#install-nginx
+Only setup nginx if you want to expose the autogenerated website to the clearnet.
+
+```sh
+sudo apt-get install nginx -y
+sudo service nginx start
+```
+Verify a browser displays the default landing page for Nginx. The landing page is reachable at `http://<server_IP_address>/index.nginx-debian.html`.
+
+```sh
+sudo pico /etc/nginx/sites-available/default
+```
+
+Create a temporary self-signed certificate just so people would be able to access it if they write https. ToDo: purchase a real certificate.
+```
+user@WalletWasabi:~$ mkdir ~/certs && cd ~/certs/ && openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out TempCert.crt -keyout TempCertKey.key && cd ~
+```
+
+Fill out the server name with the server's IP and domain.
+
+```
+server {
+ listen 80;
+ listen [::]:80;
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ server_name example.com *.example.com;
+ ssl_certificate /home/user/certs/TempCert.crt;
+ ssl_certificate_key /home/user/certs/TempCertKey.key;
+ location / {
+ proxy_pass http://localhost:37127;
+ }
+}
+```
+
+```sh
+sudo nginx -t
+sudo nginx -s reload
+```
+
# Update
Consider updating the versions in `WalletWasabi.Helpers.Constants`. If versions are updated, make sure Client Release is already available before updating the backend.
```sh
sudo apt-get update && cd ~/WalletWasabi && git pull && cd ~
+sudo service nginx stop
systemctl stop walletwasabi.service
sudo killall tor
bitcoin-cli stop
@@ -218,9 +261,10 @@ sudo apt-get upgrade -y && sudo apt-get autoremove -y
bitcoind
bitcoin-cli getblockchaininfo
tor
+sudo service nginx start
dotnet publish ~/WalletWasabi/WalletWasabi.Backend --configuration Release --self-contained false
systemctl start walletwasabi.service
-pgrep -ilfa tor && pgrep -ilfa bitcoin && pgrep -ilfa wasabi
+pgrep -ilfa tor && pgrep -ilfa bitcoin && pgrep -ilfa wasabi && pgrep -ilfa nginx
tail -10 ~/.walletwasabi/backend/Logs.txt
```
@@ -230,6 +274,8 @@ TestNet: http://testwnp3fugjln6vh5vpj7mvq3lkqqwjj3c2aafyu7laxz42kgwh2rad.onion/s
Main: http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion/swagger/
GET fees
+http://www.wasabiwallet.io/
+
# Check Statuses
```sh

[skip ci] add nginx reverse proxy setup