mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 10:17:23 +00:00
Additional information for the Cloudflare component (#11374)
* Another clarification added
* Update cloudflare.markdown
* Update cloudflare.markdown
* Update cloudflare.markdown
* Update cloudflare.markdown
Added text tags in code blocks
* Apply suggestions from code review
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* ✏️ Tweak
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
3bf731534a
commit
7fb3968e63
@ -7,13 +7,13 @@ ha_category:
|
|||||||
ha_release: 0.74
|
ha_release: 0.74
|
||||||
---
|
---
|
||||||
|
|
||||||
With the `cloudflare` integration you can keep your Cloudflare records up to date.
|
With the `cloudflare` integration, you can keep your Cloudflare records up to date.
|
||||||
|
|
||||||
The integration will run every hour, but can also be started manually by using the service `cloudflare.update_records` under services.
|
The integration runs every hour, but can also be started manually by using the service `cloudflare.update_records` under services.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
You will find your global API key in your Cloudflare account settings.
|
You can find your global API key in your Cloudflare account settings.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ cloudflare:
|
|||||||
api_key: YOUR_GLOBAL_API_KEY
|
api_key: YOUR_GLOBAL_API_KEY
|
||||||
zone: EXAMPLE.COM
|
zone: EXAMPLE.COM
|
||||||
records:
|
records:
|
||||||
- bin
|
- ha
|
||||||
- www
|
- www
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -40,15 +40,79 @@ api_key:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
zone:
|
zone:
|
||||||
description: The DNS zone you want to update.
|
description: The DNS zone (domain) you want to update.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
records:
|
records:
|
||||||
description: A list of records you want to update.
|
description: A list of records (subdomains) you want to update.
|
||||||
required: true
|
required: true
|
||||||
type: list
|
type: list
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
## Additional information
|
||||||
|
|
||||||
|
### Usage of external service
|
||||||
|
|
||||||
This platform uses the API from [ipify.org](https://www.ipify.org/) to set the public IP address.
|
This platform uses the API from [ipify.org](https://www.ipify.org/) to set the public IP address.
|
||||||
|
|
||||||
For SSH usage (according to [this](https://blog.cloudflare.com/cloudflare-now-supporting-more-ports/) source), you need to connect directly to your server (bypassing Cloudflare). To do that create a `CNAME` DNS record, e.g., `ssh.example.com`, with proxy status as "DNS only" (to do that click on orange icon, it will change color to gray) and then connect to `ssh.example.com` using your server SSH port.
|
### API Key
|
||||||
|
|
||||||
|
Please note that the `api_key` is the [global API key](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys#12345682) of your Cloudflare account (not the API Token).
|
||||||
|
|
||||||
|
### Home Assistant Companion App
|
||||||
|
|
||||||
|
If you would like to use [iOS App](https://companion.home-assistant.io/) via Cloudflare set **Minimum TLS version as 1.2**, in order to do that, do the following:
|
||||||
|
1. Login to your [Cloudflare](https://dash.cloudflare.com/) account.
|
||||||
|
2. Choose your domain.
|
||||||
|
3. Click on the `SSL/TLS` icon.
|
||||||
|
4. Go to tab `Edge Certificates`.
|
||||||
|
5. Find `Minimum TLS Version` and set it to **1.2**.
|
||||||
|
|
||||||
|
Other settings should not cause any issues.
|
||||||
|
|
||||||
|
### SSH over Cloudflare
|
||||||
|
|
||||||
|
For SSH usage (according to [this](https://blog.cloudflare.com/cloudflare-now-supporting-more-ports/) source), you need to connect directly to your server (bypassing Cloudflare). To do that, create a `CNAME` DNS record, e.g., `ssh.example.com`, with proxy status as "DNS only" (to do that click on orange icon, it will change color to gray) and then connect to `ssh.example.com` using your server SSH port.
|
||||||
|
|
||||||
|
### Using Cloudflare domain only for Home Assistant
|
||||||
|
|
||||||
|
If you want to update just a main domain, place in the records list only your domain, e.g., `example.com`. It will update your `A` DNS record with your IP every hour.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry for one domain
|
||||||
|
cloudflare:
|
||||||
|
email: YOUR_EMAIL_ADDRESS
|
||||||
|
api_key: YOUR_GLOBAL_API_KEY
|
||||||
|
zone: EXAMPLE.COM
|
||||||
|
records:
|
||||||
|
- EXAMPLE.COM
|
||||||
|
```
|
||||||
|
|
||||||
|
#### The minimum DNS record settings are (if you have set up https already):
|
||||||
|
|
||||||
|
To redirect from your domain to the IP address of your Home Assistant server set this DNS record:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Type: A
|
||||||
|
Name: @
|
||||||
|
IPv4 Address: your.ip.address
|
||||||
|
```
|
||||||
|
|
||||||
|
You can find your current IP address using [this](https://api.ipify.org/) page.
|
||||||
|
|
||||||
|
In order to redirect from `https://www` to `https://` you need to set this DNS record:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Type: CNAME
|
||||||
|
Name: @
|
||||||
|
Target: example.com (your actual domain)
|
||||||
|
```
|
||||||
|
|
||||||
|
And also create Page Rule:
|
||||||
|
|
||||||
|
```text
|
||||||
|
If the URL matches: www.example.com*
|
||||||
|
Then the settings are: Forwarding URL
|
||||||
|
Status: 302 - Temporary redirect
|
||||||
|
Destination URL: https://example.com/$1
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user