Browse Source

Update README.md

Automatically retrieve and use the server's public IP address in the Docker run command

- Added a step to dynamically fetch the server's public IP address using curl.
- Updated the Docker run command to use the retrieved IP address for the WG_HOST environment variable.
pull/1182/head
Devanshu Panigrahi 2 years ago
committed by Philip H
parent
commit
60e961dc93
  1. 5
      README.md

5
README.md

@ -50,6 +50,7 @@ If you haven't installed Docker yet, install it by running:
```bash ```bash
curl -sSL https://get.docker.com | sh curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $(whoami) sudo usermod -aG docker $(whoami)
exit
``` ```
And log in again. And log in again.
@ -59,10 +60,12 @@ And log in again.
To automatically install & run wg-easy, simply run: To automatically install & run wg-easy, simply run:
``` ```
IP=$(curl -s http://checkip.amazonaws.com)
docker run -d \ docker run -d \
--name=wg-easy \ --name=wg-easy \
-e LANG=en \ -e LANG=en \
-e WG_HOST=<🚨YOUR_SERVER_IP> \ -e WG_HOST=$IP \
-e PASSWORD_HASH=<🚨YOUR_ADMIN_PASSWORD_HASH> \ -e PASSWORD_HASH=<🚨YOUR_ADMIN_PASSWORD_HASH> \
-e PORT=51821 \ -e PORT=51821 \
-e WG_PORT=51820 \ -e WG_PORT=51820 \

Loading…
Cancel
Save