Skip to content

Commit daec74a

Browse files
committed
Updated README.md to add cloudflared info for macos
1 parent 2c274a9 commit daec74a

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export CF_TUNNEL_NAME=fzryzen
9393
export CF_TARGET_DOMAIN=fzryzen.afzalex.com
9494
```
9595

96-
9796
Prerequisites
9897
- `afzalex.com` or any other domain is added to Cloudflare
9998
- Nameservers are pointing to Cloudflare
@@ -126,17 +125,19 @@ Create the Cloudflared config file
126125
export TUNNEL_ID=$(basename ~/.cloudflared/*.json .json)
127126
cat <<EOF | envsubst | tee /tmp/cloudflared-config.yml
128127
tunnel: ${TUNNEL_ID}
129-
credentials-file: /root/.cloudflared/${TUNNEL_ID}.json
128+
credentials-file: ${HOME}/.cloudflared/${TUNNEL_ID}.json
130129
131130
ingress:
132-
- hostname: $CF_TARGET_DOMAIN
131+
- hostname: ${CF_TARGET_DOMAIN}
133132
service: http://localhost:80
134133
135134
- service: http_status:404
136135
EOF
137136
```
138137

139-
Copy this config into /etc/cloudflared directory and then install cloudflared service
138+
**Install service and enable it**
139+
140+
For unix based systems :
140141
```bash
141142
sudo mkdir -p /etc/cloudflared
142143
sudo cp /tmp/cloudflared-config.yml /etc/cloudflared/config.yml
@@ -145,6 +146,16 @@ sudo systemctl enable cloudflared
145146
sudo systemctl start cloudflared
146147
```
147148

149+
For macOS :
150+
```bash
151+
cp /tmp/cloudflared-config.yml ~/cloudflared/config.yml
152+
sudo cloudflared service install
153+
```
154+
155+
To check if it is routing from internet
156+
```bash
157+
cloudflared tunnel info fzmacair
158+
```
148159

149160

150161
### EC2 user-data to add web server with web page on 80 port number

0 commit comments

Comments
 (0)