{"id":2374,"date":"2025-01-22T18:33:15","date_gmt":"2025-01-22T10:33:15","guid":{"rendered":"https:\/\/pjq.me\/?p=2374"},"modified":"2025-01-22T18:40:49","modified_gmt":"2025-01-22T10:40:49","slug":"how-to-create-cloudflare-tunnel-for-ollama","status":"publish","type":"post","link":"https:\/\/pjq.me\/?p=2374","title":{"rendered":"How to create Cloudflare Tunnel for ollama"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/pjq.me\/?p=2374\/#Create_tunnel\" >Create tunnel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/pjq.me\/?p=2374\/#Update_the_Public_Hostname\" >Update the Public Hostname<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Create_tunnel\"><\/span>Create tunnel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First create one Tunnel in the Web Dashboard<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Networks-&gt;Tunnels-&gt;Create a tunnel<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"723\" src=\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png\" alt=\"\" class=\"wp-image-2375\" srcset=\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png 1017w, https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3-300x213.png 300w, https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3-768x546.png 768w\" sizes=\"auto, (max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n\n\n\n<p>Then install the cloudflared on Mac<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew install cloudflared &amp;&amp; \n\nsudo cloudflared service install eyJhIjoiNGNkZWY4xxxxx.......<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Update_the_Public_Hostname\"><\/span>Update the Public Hostname<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After you finished the cloudflared installation, then you can update the &#8220;Public Hostname&#8221;, which means when you visit the subdomain, Cloudflare will forward the request to the local server, e.g.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>https:\/\/ollama.pjq.me -&gt; http:\/\/localhost:11434<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"819\" src=\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-4-1024x819.png\" alt=\"\" class=\"wp-image-2376\" srcset=\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-4-1024x819.png 1024w, https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-4-300x240.png 300w, https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-4-768x614.png 768w, https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-4.png 1053w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It&#8217;s very interesting to see the tool have one special params &#8216;&#8211;post-quantum&#8217;, well, Cloudflare it&#8217;s already consider about the post quantum secure connection, so I suppose they already integrate some special encryption algorithms.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--post-quantum, --pq When given creates an experimental post-quantum secure tunnel (default: false) &#91;$TUNNEL_POST_QUANTUM]<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create tunnel First create one Tunnel in the Web Dashboard Then install the cloudflared on Mac Update the Public Hostname After you finished the cloudflared installation, then you can update the &#8220;Public Hostname&#8221;, which means when you visit the subdomain,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[169],"tags":[],"class_list":["post-2374","post","type-post","status-publish","format-standard","hentry","category-tech"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to create Cloudflare Tunnel for ollama - Jianqing&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pjq.me\/?p=2374\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create Cloudflare Tunnel for ollama - Jianqing&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Create tunnel First create one Tunnel in the Web Dashboard Then install the cloudflared on Mac Update the Public Hostname After you finished the cloudflared installation, then you can update the &#8220;Public Hostname&#8221;, which means when you visit the subdomain,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pjq.me\/?p=2374\" \/>\n<meta property=\"og:site_name\" content=\"Jianqing&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-22T10:33:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-22T10:40:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1017\" \/>\n\t<meta property=\"og:image:height\" content=\"723\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"pengjianqing\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pengjianqing\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/pjq.me\/?p=2374#article\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/?p=2374\"},\"author\":{\"name\":\"pengjianqing\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"headline\":\"How to create Cloudflare Tunnel for ollama\",\"datePublished\":\"2025-01-22T10:33:15+00:00\",\"dateModified\":\"2025-01-22T10:40:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/pjq.me\/?p=2374\"},\"wordCount\":108,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"image\":{\"@id\":\"https:\/\/pjq.me\/?p=2374#primaryimage\"},\"thumbnailUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png\",\"articleSection\":[\"Tech\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/pjq.me\/?p=2374#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pjq.me\/?p=2374\",\"url\":\"https:\/\/pjq.me\/?p=2374\",\"name\":\"How to create Cloudflare Tunnel for ollama - Jianqing&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/pjq.me\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/pjq.me\/?p=2374#primaryimage\"},\"image\":{\"@id\":\"https:\/\/pjq.me\/?p=2374#primaryimage\"},\"thumbnailUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png\",\"datePublished\":\"2025-01-22T10:33:15+00:00\",\"dateModified\":\"2025-01-22T10:40:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/pjq.me\/?p=2374#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pjq.me\/?p=2374\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pjq.me\/?p=2374#primaryimage\",\"url\":\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png\",\"contentUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png\",\"width\":1017,\"height\":723},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pjq.me\/?p=2374#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pjq.me\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create Cloudflare Tunnel for ollama\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pjq.me\/#website\",\"url\":\"https:\/\/pjq.me\/\",\"name\":\"Jianqing&#039;s Blog\",\"description\":\"Thoughts and Future\",\"publisher\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pjq.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60\",\"name\":\"pengjianqing\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"contentUrl\":\"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png\",\"width\":460,\"height\":752,\"caption\":\"pengjianqing\"},\"logo\":{\"@id\":\"https:\/\/pjq.me\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/pjq.me\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create Cloudflare Tunnel for ollama - Jianqing&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pjq.me\/?p=2374","og_locale":"en_US","og_type":"article","og_title":"How to create Cloudflare Tunnel for ollama - Jianqing&#039;s Blog","og_description":"Create tunnel First create one Tunnel in the Web Dashboard Then install the cloudflared on Mac Update the Public Hostname After you finished the cloudflared installation, then you can update the &#8220;Public Hostname&#8221;, which means when you visit the subdomain,","og_url":"https:\/\/pjq.me\/?p=2374","og_site_name":"Jianqing&#039;s Blog","article_published_time":"2025-01-22T10:33:15+00:00","article_modified_time":"2025-01-22T10:40:49+00:00","og_image":[{"width":1017,"height":723,"url":"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png","type":"image\/png"}],"author":"pengjianqing","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pengjianqing","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pjq.me\/?p=2374#article","isPartOf":{"@id":"https:\/\/pjq.me\/?p=2374"},"author":{"name":"pengjianqing","@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"headline":"How to create Cloudflare Tunnel for ollama","datePublished":"2025-01-22T10:33:15+00:00","dateModified":"2025-01-22T10:40:49+00:00","mainEntityOfPage":{"@id":"https:\/\/pjq.me\/?p=2374"},"wordCount":108,"commentCount":0,"publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"image":{"@id":"https:\/\/pjq.me\/?p=2374#primaryimage"},"thumbnailUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png","articleSection":["Tech"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pjq.me\/?p=2374#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pjq.me\/?p=2374","url":"https:\/\/pjq.me\/?p=2374","name":"How to create Cloudflare Tunnel for ollama - Jianqing&#039;s Blog","isPartOf":{"@id":"https:\/\/pjq.me\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pjq.me\/?p=2374#primaryimage"},"image":{"@id":"https:\/\/pjq.me\/?p=2374#primaryimage"},"thumbnailUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png","datePublished":"2025-01-22T10:33:15+00:00","dateModified":"2025-01-22T10:40:49+00:00","breadcrumb":{"@id":"https:\/\/pjq.me\/?p=2374#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pjq.me\/?p=2374"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pjq.me\/?p=2374#primaryimage","url":"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png","contentUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2025\/01\/image-3.png","width":1017,"height":723},{"@type":"BreadcrumbList","@id":"https:\/\/pjq.me\/?p=2374#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pjq.me\/"},{"@type":"ListItem","position":2,"name":"How to create Cloudflare Tunnel for ollama"}]},{"@type":"WebSite","@id":"https:\/\/pjq.me\/#website","url":"https:\/\/pjq.me\/","name":"Jianqing&#039;s Blog","description":"Thoughts and Future","publisher":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pjq.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/pjq.me\/#\/schema\/person\/0eb1e72d1e69fbbd9b5c0bfd8e2aae60","name":"pengjianqing","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/","url":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","contentUrl":"https:\/\/pjq.me\/wp-content\/uploads\/2021\/12\/Screen-Shot-2021-12-02-at-6.10.58-PM.png","width":460,"height":752,"caption":"pengjianqing"},"logo":{"@id":"https:\/\/pjq.me\/#\/schema\/person\/image\/"},"url":"https:\/\/pjq.me\/?author=1"}]}},"views":3011,"_links":{"self":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/2374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2374"}],"version-history":[{"count":2,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/2374\/revisions"}],"predecessor-version":[{"id":2379,"href":"https:\/\/pjq.me\/index.php?rest_route=\/wp\/v2\/posts\/2374\/revisions\/2379"}],"wp:attachment":[{"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pjq.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}