Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instuctions for updating cloudflared binary. #215

Merged
merged 5 commits into from
Aug 31, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion docs/guides/dns-over-https.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ sudo useradd -s /usr/sbin/nologin -r -M cloudflared
Proceed to create a configuration file for `cloudflared` by copying the following in to `/etc/default/cloudflared`. This file contains the command-line options that get passed to cloudflared on startup:

```bash
# Commandline args for cloudflared
# Commandline args for cloudflared, using Cloudflare DNS
CLOUDFLARED_OPTS=--port 5053 --upstream https://1.1.1.1/dns-query --upstream https://1.0.0.1/dns-query
```

**Note:** The `cloudflared` binary will work with other DoH providers (for example, you could use https://8.8.8.8/dns-query for Google DNS).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Note:** The `cloudflared` binary will work with other DoH providers (for example, you could use https://8.8.8.8/dns-query for Google DNS).
**Note:** The `cloudflared` binary will work with other DoH providers (for example, you could use `https://8.8.8.8/dns-query` for Google DNS).


Update the permissions for the configuration file and `cloudflared` binary to allow access for the cloudflared user:

```bash
Expand Down Expand Up @@ -223,3 +225,23 @@ sudo systemctl daemon-reload
After the above, don't forget to change the DNS back to something else in Pi-hole's DNS settings!

[^guide]: Based on [this guide by Ben Dews | bendews.com](https://bendews.com/posts/implement-dns-over-https/)

### Updating Cloudflared

The `cloudflared` tool will not receive updates through the package manager, however it can be updated
manually by running these commands:

```bash
sudo cloudflared update
sudo systemctl restart cloudflared
```

If you want to have the system update `cloudflared` automatically, simply place the update commands in the
file `/etc/cron.weekly/cloudflared-updater.sh`, and adjust permissions:

```bash
sudo chmod +x /etc/cron.weekly/cloudflared-updater.sh
sudo chown root:root /etc/cron.weekly/cloudflared-updater.sh
```

The system will now attempt to update the cloudflared binary automatically, once per week.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The system will now attempt to update the cloudflared binary automatically, once per week.
The system will now attempt to update the cloudflared binary automatically, once per week.