<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Travis Calvert</title>
    <description>The latest articles on DEV Community by Travis Calvert (@travis_calvert).</description>
    <link>https://dev.to/travis_calvert</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4196979%2F35a144c1-07fa-427b-92f0-7e46744ad390.png</url>
      <title>DEV Community: Travis Calvert</title>
      <link>https://dev.to/travis_calvert</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/travis_calvert"/>
    <language>en</language>
    <item>
      <title>How to Automatically Start FastAPI When You Sign In to Windows 10 or 11</title>
      <dc:creator>Travis Calvert</dc:creator>
      <pubDate>Sat, 24 Oct 2026 16:16:30 +0000</pubDate>
      <link>https://dev.to/travis_calvert/how-to-automatically-start-fastapi-when-you-sign-in-to-windows-10-or-11-3142</link>
      <guid>https://dev.to/travis_calvert/how-to-automatically-start-fastapi-when-you-sign-in-to-windows-10-or-11-3142</guid>
      <description>&lt;p&gt;If you're developing or running a FastAPI application on Windows, manually opening a terminal and starting Uvicorn every time you sign in gets old quickly.&lt;/p&gt;

&lt;p&gt;Windows Task Scheduler provides a built-in way to launch your application automatically when you log in—without turning it into a Windows service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Windows sign-in startup vs. a Windows service
&lt;/h2&gt;

&lt;p&gt;These are two different approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task Scheduler at sign-in:&lt;/strong&gt; Starts your FastAPI application after you sign in to your Windows account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows service:&lt;/strong&gt; Can run independently of an interactive user session, including before anyone signs in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're running a local development tool, personal dashboard, or an application you use during your Windows session, Task Scheduler may be sufficient.&lt;/p&gt;

&lt;p&gt;If you need an unattended production server, a properly configured Windows service or another dedicated deployment environment may be more appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Configure FastAPI startup manually
&lt;/h2&gt;

&lt;p&gt;Suppose your project lives in:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;C:\Projects\my-fastapi-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And your virtual environment is located at:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;C:\Projects\my-fastapi-app\.venv&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;First, verify that your application starts normally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;C:\Projects\my-fastapi-app&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\.venv\Scripts\python.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uvicorn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;main:app&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--host&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;127.0.0.1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;8000&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;main:app&lt;/code&gt; with your actual application import path.&lt;/p&gt;

&lt;p&gt;Once that works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Task Scheduler&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Create Task&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Name the task &lt;code&gt;FastAPI Startup&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Triggers&lt;/strong&gt;, select &lt;strong&gt;At log on&lt;/strong&gt; for your Windows account.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Actions&lt;/strong&gt;, select &lt;strong&gt;Start a program&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Program/script&lt;/strong&gt; to &lt;code&gt;C:\Projects\my-fastapi-app\.venv\Scripts\python.exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Add arguments&lt;/strong&gt; to &lt;code&gt;-m uvicorn main:app --host 127.0.0.1 --port 8000&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Start in&lt;/strong&gt; to &lt;code&gt;C:\Projects\my-fastapi-app&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Save the task and test it using &lt;strong&gt;Run&lt;/strong&gt; in Task Scheduler.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should now be able to visit:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;http://127.0.0.1:8000/docs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If your application exposes FastAPI's default documentation endpoint, it should be available while Uvicorn is running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common problems
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The task runs but FastAPI doesn't respond&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check the Python executable path, project working directory, application import path, and whether the expected port is available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It works in a terminal but fails in Task Scheduler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your application may rely on environment variables, relative file paths, or an activated virtual environment. Using the virtual environment's Python executable directly and setting the working directory can eliminate some of these problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple copies of Uvicorn are running&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check whether you've launched the application manually in addition to the scheduled task. Review the task's settings for handling an instance that is already running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You need the application running before sign-in&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A logon-triggered task is not the right solution for that requirement. Consider a service-based deployment instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: Use a packaged automation kit
&lt;/h2&gt;

&lt;p&gt;The manual Task Scheduler approach is free and may be all you need.&lt;/p&gt;

&lt;p&gt;For developers who would rather avoid assembling and managing the startup configuration themselves, &lt;strong&gt;Blacktop Logic's FastAPI Auto-Start Kit for Windows&lt;/strong&gt; is a $19 toolkit designed to launch an existing FastAPI application when you sign in.&lt;/p&gt;

&lt;p&gt;The product advertises Windows Task Scheduler integration, process management, duplicate-instance prevention, graceful shutdown, and a simplified setup process.&lt;/p&gt;

&lt;p&gt;It's intended for Windows 10 and 11 sign-in workflows—not as a replacement for an unattended production Windows service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn more:&lt;/strong&gt; &lt;a href="https://payhip.com/b/g7SeV" rel="noopener noreferrer"&gt;FastAPI Auto-Start Kit for Windows&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;You don't need to install extra software just to start FastAPI when you sign in to Windows. Task Scheduler can handle the basic job.&lt;/p&gt;

&lt;p&gt;The decision is whether you'd prefer to configure and maintain the workflow yourself or use a packaged toolkit that handles more of the setup and process management.&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSV Rescue: Let Local AI Do the Tedious CSV Cleanup — Without Giving It the Keys</title>
      <dc:creator>Travis Calvert</dc:creator>
      <pubDate>Wed, 21 Oct 2026 22:00:01 +0000</pubDate>
      <link>https://dev.to/travis_calvert/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys-4iig</link>
      <guid>https://dev.to/travis_calvert/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys-4iig</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;CSV files are everywhere. Unfortunately, so are the little inconsistencies that make them frustrating to work with: extra whitespace, currency symbols, inconsistent date formats, missing-value placeholders, and duplicate records.&lt;/p&gt;

&lt;p&gt;Cleaning those problems manually is tedious. Automating the process blindly can be worse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSV Rescue&lt;/strong&gt; is a local-first, open-source application that uses AI to identify useful cleaning operations, lets the user approve them, and then applies the selected changes through predictable Python code.&lt;/p&gt;

&lt;p&gt;The idea is simple: &lt;strong&gt;let AI figure out what might need fixing, but don't let it invent the fixes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The workflow has three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Upload a CSV file for local analysis.&lt;/li&gt;
&lt;li&gt;Review and select recommended cleaning operations.&lt;/li&gt;
&lt;li&gt;Preview the changes, inspect any flagged issues, and download a cleaned CSV.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The original file is never overwritten.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb4z2qoxili75xqdzdrrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb4z2qoxili75xqdzdrrk.png" alt="CSV Rescue showing AI-assisted cleaning rules and before-and-after results" width="800" height="770"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the demonstration, I generated a deliberately messy 500-row CSV containing inconsistent currency and date formats, extra whitespace, missing-value markers, and duplicate records.&lt;/p&gt;

&lt;p&gt;With five cleaning operations selected, CSV Rescue produced:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input rows&lt;/td&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output rows&lt;/td&gt;
&lt;td&gt;475&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cell changes&lt;/td&gt;
&lt;td&gt;739&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flagged issues&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The application removed 25 duplicate rows while preserving ambiguous values for review.&lt;/p&gt;

&lt;p&gt;For example, when a currency field contains &lt;code&gt;unknown&lt;/code&gt; or &lt;code&gt;TBD&lt;/code&gt;, CSV Rescue flags the issue instead of pretending it knows the correct amount.&lt;/p&gt;

&lt;p&gt;The before-and-after preview also includes a change log identifying the affected row, column, operation, original value, and resulting value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/BlacktopLogic/csv-rescue" rel="noopener noreferrer"&gt;https://github.com/BlacktopLogic/csv-rescue&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes the FastAPI application, deterministic cleaning engine, CSV profiler, sample data, automated tests, setup instructions, and an MIT license.&lt;/p&gt;

&lt;p&gt;It's designed to run locally rather than requiring a hosted application or cloud AI account.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;CSV Rescue uses a small, intentionally straightforward stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python and FastAPI&lt;/strong&gt; for the application and browser interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; to run AI inference locally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qwen3:8b&lt;/strong&gt; as the open-weight language model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A CSV profiling layer&lt;/strong&gt; to summarize the uploaded data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A deterministic cleaning engine&lt;/strong&gt; to perform approved transformations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pytest&lt;/strong&gt; for automated regression testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model receives a statistical profile of the CSV and recommends operations from a restricted set of supported cleaning rules.&lt;/p&gt;

&lt;p&gt;Those operations currently include trimming whitespace, normalizing currency, normalizing dates, normalizing blank values, and removing duplicate rows.&lt;/p&gt;

&lt;p&gt;The model does not get to generate arbitrary Python code for execution. Its suggestions are validated against supported operations, and the user chooses what to apply.&lt;/p&gt;

&lt;p&gt;That separation is intentional. Language models are useful for recognizing patterns and suggesting actions, but data transformation needs to be predictable, inspectable, and repeatable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Local inference is central to the design.&lt;/p&gt;

&lt;p&gt;CSV files often contain customer information, business records, or operational data that people would rather not send to an external AI service.&lt;/p&gt;

&lt;p&gt;By using Ollama and an open-weight model, CSV Rescue can analyze a file's statistical profile on the user's own computer without requiring a cloud inference API.&lt;/p&gt;

&lt;p&gt;This also makes the project easier to experiment with. The AI layer can evolve independently from the cleaning engine, and the core cleaning functionality doesn't depend on a paid AI subscription.&lt;/p&gt;

&lt;p&gt;Just as importantly, open source makes the transformation logic inspectable. Users can see how their data is processed instead of having to trust an opaque AI-generated result.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;The goal isn't to remove people from the process. It's to remove the repetitive work while keeping the important decisions.&lt;/p&gt;

&lt;p&gt;Instead of manually inspecting hundreds of rows, searching for formatting inconsistencies, and applying spreadsheet operations one at a time, the user can review a small set of suggested rules and inspect the resulting changes.&lt;/p&gt;

&lt;p&gt;During testing, CSV Rescue processed a 500-row sample, identified five useful operations, and produced a cleaned file with 739 cell changes.&lt;/p&gt;

&lt;p&gt;I also tested the project from a fresh GitHub clone: installing dependencies in a new virtual environment, running all 15 regression tests successfully, launching the application, generating AI recommendations, previewing the results, and downloading the cleaned CSV.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All 15 automated tests passed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is an early release, not a replacement for full-featured data preparation software. But it demonstrates a useful principle: AI can take on the tedious pattern-recognition work without being given unrestricted control over the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slow and steady, with a human still holding the steering wheel.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Built by &lt;strong&gt;Blacktop Logic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/BlacktopLogic/csv-rescue" rel="noopener noreferrer"&gt;Explore CSV Rescue on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>How to Automatically Start a Cloudflare Tunnel When You Sign In to Windows</title>
      <dc:creator>Travis Calvert</dc:creator>
      <pubDate>Tue, 20 Oct 2026 22:45:49 +0000</pubDate>
      <link>https://dev.to/travis_calvert/how-to-automatically-start-a-cloudflare-tunnel-when-you-sign-in-to-windows-1095</link>
      <guid>https://dev.to/travis_calvert/how-to-automatically-start-a-cloudflare-tunnel-when-you-sign-in-to-windows-1095</guid>
      <description>&lt;p&gt;If you use Cloudflare Tunnel to expose a local development server, self-hosted application, or internal dashboard, you've probably encountered this problem:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everything works until you restart Windows.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your application might still be running, but the Cloudflare Tunnel process isn't. Suddenly, your public hostname is unreachable until you manually launch &lt;code&gt;cloudflared&lt;/code&gt; again.&lt;/p&gt;

&lt;p&gt;Here's how to automate that process using Windows Task Scheduler.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;A typical Cloudflare Tunnel setup uses a command like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;cloudflared.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tunnel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;YOUR_TUNNEL_TOKEN&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That works perfectly well in an interactive terminal.&lt;/p&gt;

&lt;p&gt;But closing the terminal, signing out, or restarting Windows stops the process.&lt;/p&gt;

&lt;p&gt;You can solve this by configuring Windows to launch the tunnel automatically when you sign in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create a startup script
&lt;/h2&gt;

&lt;p&gt;Create a PowerShell script named &lt;code&gt;Start-Tunnel.ps1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$cloudflared&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Tools\cloudflared.exe"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nv"&gt;$tokenFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;LOCALAPPDATA&lt;/span&gt;&lt;span class="s2"&gt;\CloudflareTunnel\token.txt"&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Test-Path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-LiteralPath&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cloudflared&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="kr"&gt;throw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cloudflared.exe was not found."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Test-Path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-LiteralPath&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$tokenFile&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="kr"&gt;throw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Tunnel token file was not found."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nv"&gt;$token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Get-Content&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-LiteralPath&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$tokenFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="kr"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;IsNullOrWhiteSpace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$token&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="kr"&gt;throw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Tunnel token is empty."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$cloudflared&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tunnel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$token&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update the executable path to match your installation.&lt;/p&gt;

&lt;p&gt;The script reads the tunnel token from a separate local file instead of embedding it directly in the script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security note:&lt;/strong&gt; Your tunnel token is a credential. Don't commit it to GitHub, include it in screenshots, or share it in support requests. Restrict access to the token file to your Windows account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Configure Windows Task Scheduler
&lt;/h2&gt;

&lt;p&gt;Open &lt;strong&gt;Task Scheduler&lt;/strong&gt; and select &lt;strong&gt;Create Task&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Under &lt;strong&gt;General&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give the task a descriptive name, such as &lt;code&gt;Cloudflare Tunnel Startup&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Run only when user is logged on&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Use your normal Windows account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under &lt;strong&gt;Triggers&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a trigger that runs &lt;strong&gt;At log on&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select your Windows account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under &lt;strong&gt;Actions&lt;/strong&gt;, create a new action:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Program/script:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;powershell.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add arguments:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-NoProfile -NonInteractive -ExecutionPolicy Bypass -File "C:\Scripts\Start-Tunnel.ps1"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the script path with your actual location.&lt;/p&gt;

&lt;p&gt;Under &lt;strong&gt;Settings&lt;/strong&gt;, review the options that control whether the task can start again while an existing instance is running.&lt;/p&gt;

&lt;p&gt;Save the task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Test it
&lt;/h2&gt;

&lt;p&gt;Right-click the task and select &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Check Task Manager for the &lt;code&gt;cloudflared.exe&lt;/code&gt; process.&lt;/p&gt;

&lt;p&gt;Then verify that your public hostname actually reaches your local application.&lt;/p&gt;

&lt;p&gt;A running process alone doesn't prove the tunnel is connected successfully.&lt;/p&gt;

&lt;p&gt;Finally, sign out and sign back in to confirm that the task launches automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about running the tunnel before login?
&lt;/h2&gt;

&lt;p&gt;A sign-in task starts only after the specified user logs on.&lt;/p&gt;

&lt;p&gt;If you need the tunnel to be available immediately after Windows boots, before anyone signs in, you'll need a different approach, such as a properly configured Windows service.&lt;/p&gt;

&lt;p&gt;That distinction matters for unattended servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this basic approach gets complicated
&lt;/h2&gt;

&lt;p&gt;Task Scheduler handles the initial launch, but a production-quality setup involves more than just running a PowerShell script.&lt;/p&gt;

&lt;p&gt;You may also want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protection against duplicate launchers&lt;/li&gt;
&lt;li&gt;A predictable way to stop the tunnel&lt;/li&gt;
&lt;li&gt;Logging for troubleshooting&lt;/li&gt;
&lt;li&gt;Secure token storage&lt;/li&gt;
&lt;li&gt;Clean installation and removal&lt;/li&gt;
&lt;li&gt;Reliable cleanup of child processes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These details can take longer to get right than the initial scheduled task.&lt;/p&gt;

&lt;h2&gt;
  
  
  A ready-made alternative
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;Cloudflare Tunnel Auto-Start Kit for Windows&lt;/strong&gt; under Blacktop Logic to package the Windows sign-in approach into a reusable toolkit.&lt;/p&gt;

&lt;p&gt;It includes PowerShell installation, startup, status, and uninstall scripts, along with process management and logging.&lt;/p&gt;

&lt;p&gt;It is designed for &lt;strong&gt;user sign-in startup&lt;/strong&gt;, not as a replacement for a Windows service.&lt;/p&gt;

&lt;p&gt;The kit is available as a one-time $19 purchase:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://payhip.com/b/FnwaJ" rel="noopener noreferrer"&gt;https://payhip.com/b/FnwaJ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're comfortable maintaining your own scheduled task, the manual approach above may be all you need.&lt;/p&gt;

&lt;p&gt;If you'd rather avoid building and troubleshooting the supporting scripts yourself, the kit is another option.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Published by Blacktop Logic — practical software utilities for developers and self-hosters.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloudflare</category>
      <category>windows</category>
      <category>powershell</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
