---
title: Cloudflare
description: Quick Guide to Domain Registration and Cloudflare Tunnel Configuration
---

# Comprehensive Guide to Domain Registration and Configuring Cloudflare Tunnel

## Registering Your Domain

### Step 1: Choose Your Domain Name
- Select a domain name that aligns with your brand identity and is memorable. Avoid complex spellings.
- Use online tools from domain registrars like Cloudflare, Namecheap, GoDaddy, etc., to check if your preferred domain name is available.

### Step 2: Select a Domain Registrar
- Evaluate registrars based on their pricing, customer support, additional features (such as email, SSL certificates), and user reviews.
- Pay special attention to privacy protection services (WHOIS privacy), as this helps keep your personal information private.

### Step 3: Purchase and Register the Domain
- Follow the registrar's purchase process, which involves providing your contact information and completing the payment.
- Thoroughly read the terms of service and note the domain's expiration date to avoid unexpected lapses.

## Configuring Cloudflare Tunnels

### Step 1: Add Your Domain to Cloudflare
- If your domain was purchased via Cloudflare, this step is skipped as your domain is already configured to use Cloudflare's nameservers.
- Log into your Cloudflare account and add your new domain. Follow the instructions to replace your domain's nameservers with those provided by Cloudflare, which is necessary for activating Cloudflare's services.

### Step 3: Create a Tunnel

<Cards>
   <Cards.Card href="https://one.dash.cloudflare.com/" title="Step 1" image arrow>
      ![image](https://github.com/danny-avila/LibreChat/assets/32828263/ae54133f-34ed-476d-9004-d269a8707609)
   </Cards.Card>
   <Cards.Card href="https://one.dash.cloudflare.com/" title="Step 2" image arrow>
      ![image](https://github.com/danny-avila/LibreChat/assets/32828263/643e878e-e418-48aa-ac53-6c144ed463f0)
   </Cards.Card>
   <Cards.Card href="https://one.dash.cloudflare.com/" title="Step 3" image arrow>
      ![image](https://github.com/danny-avila/LibreChat/assets/32828263/e219fd49-baad-4da0-84e7-09e754068c57)
   </Cards.Card>
</Cards>

![image](https://github.com/danny-avila/LibreChat/assets/32828263/c851d405-1e90-4ad1-b65e-03cee5ae7111)

#### Name your Tunnel

![image](https://github.com/danny-avila/LibreChat/assets/32828263/212b8b95-5901-40d4-bc46-3b3b3997767e)

#### Install Cloudflare's `cloudflared` on Your Server

![image](https://github.com/danny-avila/LibreChat/assets/32828263/82520d5c-8524-415f-82ae-c297bde3288d)

<Callout type="tip" title="Tip">
- For continuous operation, consider setting up `cloudflared` to run as a service on your system. This ensures the tunnel remains active after reboots and crashes.
</Callout>

- Download and install the [`cloudflared`](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/) tool from Cloudflare's official site onto your server. This software will facilitate the secure connection between your domain and the internal services.
- Authenticate `cloudflared` using your Cloudflare account credentials to link it to your domain.

#### Configure your Tunnel

- Initiate a tunnel using either the Cloudflare dashboard under the "Tunnels" section

![image](https://github.com/danny-avila/LibreChat/assets/32828263/0232a545-115a-4c91-99e3-1240542bbea2)


### Step 6: Verify the Tunnel
- Test the connection by accessing your domain/subdomain in a web browser, ensuring it resolves to your server via the Cloudflare Tunnel without errors.
- Monitor your tunnel's performance and status directly from the Cloudflare dashboard under the "Tunnels" section.

![image](https://github.com/danny-avila/LibreChat/assets/32828263/2ad741d5-8cdd-46c6-982c-7fa05a5858a8)

## Conclusion
By securing your domain registration and configuring a Cloudflare Tunnel, you strengthen the security and reliability of connecting to your network services. Regularly review and update your domain and tunnel settings to adapt to any new requirements or changes in network configuration. Stay proactive about maintaining your online presence and security stance.