Linux serverlinux web serverNETWORK ADMINISTRATIONS

Cloudflare Tunnel Setup Guide – Self-Hosting for EVERYONE

Many people have issues self-hosting their services if they’re behind a CG-NAT. Luckily, we can get around that with the help of Cloudflare tunnels.

Setup Guide – https://raidowl.hostyboi.com/2022/08/22/Cloudflare-Tunnel/

Cloudflare Guide – https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/
Ingress – https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/configuration-file/ingress/
Run as service – https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/as-a-service/

——————————————————————————————-
🛒 Amazon Shop – https://www.amazon.com/shop/raidowl
👕 Merch – https://www.youtube.com/c/RaidOwl/store
——————————————————————————————-
🔥 Check out this week’s BEST DEALS in PC Gaming from Best Buy: https://shop-links.co/cgDzeydlH34
💰 Premium storage solutions from Samsung: https://shop-links.co/cgDzWiEKhB8
⚡ Keep your devices powered up with charging solutions from Anker: https://shop-links.co/cgDzZ755mwl
——————————————————————————————-
Become a Channel Member!
https://www.youtube.com/channel/UC9evhW4JB_UdXSLeZGy8lGw/join

Support the channel on:
Patreon – https://www.patreon.com/RaidOwl
Discord – https://bit.ly/3J53xYs
Paypal – https://bit.ly/3Fcrs5V

Affiliate Links:
Ryzen 9 5950x – https://amzn.to/3z29yko
Samsung 980 2TB – https://amzn.to/3myEa85
Logitech G513 – https://amzn.to/3sPS6yv
Logitech G703 – https://amzn.to/3sATW5R
WD Ultrastar 12TB – https://amzn.to/3EvOPXc

My Studio Equipment:
Sony FX3 – https://amzn.to/3qq4Jxl
Sony 24mm 1.4 GM – https://amzn.to/3mA1TEK
Tascam DR-40x Audio Recorder – https://amzn.to/3EvTPeq
Rode NTG4+ Mic – https://amzn.to/3JuElLs
Atmos NinjaV – https://amzn.to/3Hi0ue1
Godox SL150 Light – https://amzn.to/3Es0Qg3

Join the Discord: https://discord.gg/CUzhMSS7qd

https://links.hostowl.net/

0:00 Intro
1:12 What are Cloudflare tunnels?
2:06 Setup
4:43 Create the tunnel
5:12 Setup the config file
6:34 DNS
8:00 Ingress setup
9:30 Run the tunnel
10:52 IT WORKS
11:20 Let’s make another route
12:45 Install as a service
12:59 We did it
14:29 Comment of the Week
15:16 Conclusion

source

by Raid Owl

linux web server

20 thoughts on “Cloudflare Tunnel Setup Guide – Self-Hosting for EVERYONE

  • What can I do if I don't have organization I can't use tunnels …

  • Excellent, I have a question. Can I do something similar for iredmail? I want to use the same tunnel I have already done it for iredmail. Thank You and Best regards.

  • I have a question kind sir! a comment first so that you understand.

    I am running on my own server in my home. If I run the tunnel (cloudflared tunnel run name) it works fine. as soon as I exit out of the path /cloudflared# the tunnel server stops. The only solution for me is to use an ssh source to constantly have it up. Or constantly have it up on my main server.

    Is there a way to have the tunnel constantly run in the background? I really dont undersstand why its doing this.

  • I was thinking can I use it to route anyconnect ssl vpn traffic over ? Or it won't work?
    Surprisingly there is no tunnel option anymore under traffic (update, it's under zero trust, access ,tunnels)

  • could someone help me understand how this would work with hosting a few websites of my home server as Im still kind of confused.
    I am running linux ubuntu server but would I need to use apache or nginx and port forward my ip and the 443

  • Thank you very much we appreciate your time and effort. From where you got the 10.0.0.26:9444 for the ingress? I'm also facing an error "unable to reach the origin service" what could be the issue and it's resolution?

  • would this be workable to host a minecraft server without constantly opening and closing the port when using the server? I have a dedicated machine that is constantly hosting the server, and Nord VPN doesnt offer port forwarding, so I need a work around to keep the server accessible to friends, rather than me opening the port when i need to

  • This is really helpful, thank you for your sharing! 👍

  • This is an awesome solution! So I am trying to limit the incoming connection to my host to just Cloudflare tunnels. Trying to locate what Cloudflare's IPs are (assuming it's on port 443) to configure my firewall. Has anyone successfully done it? If so, could you please share?

  • Can you set it up with Warp l7 access?

  • i have proximox and a virtiual machine with portainer, i put on portainer vaultwarden and it works i can access the vaultwarden page. but when i put the ip address on the tunnel it doesn't open anything i can't figure out why

  • Love your content. Your sense of humor keeps me engaged but your knowledge is impeccable

  • If the IP address changes every time, how does cloudflare know the location of our local server?

  • Will the tunnel also work in a linode? I'd like to only allow traffic from cloudflare to the website and not allow bad actors to circumvent Cloudflare to get to the site.

  • How make Minecraft java localhost play with friends in Cloudflare Tunnel?

  • I'm happy to say that I got this to work, but I'm getting the following messages when I run the tunnel:

    WRN The user running cloudflared process has a GID (group ID) that is not within ping_group_range. You might need to add that user to a group within that range, or instead update the range to encompass a group the user is already in by modifying /proc/sys/net/ipv4/ping_group_range. Otherwise cloudflared will not be able to ping this network error="Group ID 0 is not between ping group 65534 to 65534"

    2023-02-13T00:00:14Z WRN ICMP proxy feature is disabled error="cannot create ICMPv4 proxy: Group ID 0 is not between ping group 65534 to 65534 nor ICMPv6 proxy: socket: permission denied"

    I must have set up my container incorrectly, but I don't know what I did wrong. On the one hand, not being able to ping is probably more secure, but if Cloudflare needs it to do it's thing, I might see problems down the road. The warning gives me two options to fix it. Does anyone know if one is preferred over the other?

Comments are closed.