<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arturo Vaine on Medium]]></title>
        <description><![CDATA[Stories by Arturo Vaine on Medium]]></description>
        <link>https://medium.com/@arturovaine?source=rss-b0f1edd347f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pGmVnV122DyIKbMOBHYsbA.png</url>
            <title>Stories by Arturo Vaine on Medium</title>
            <link>https://medium.com/@arturovaine?source=rss-b0f1edd347f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 18:34:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arturovaine/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Build Your Own AI Tools in 5 Minutes with FastMCP]]></title>
            <link>https://medium.com/@arturovaine/build-your-own-ai-tools-in-5-minutes-with-fastmcp-ed6017301005?source=rss-b0f1edd347f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed6017301005</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Arturo Vaine]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 22:38:41 GMT</pubDate>
            <atom:updated>2025-11-18T18:58:39.159Z</atom:updated>
            <content:encoded><![CDATA[<p>Want AI to edit your videos, manage your docs, or automate your workflow? You can build custom tools in minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CzsZtSkC5n6jRRbkwrx7rw.png" /><figcaption>AI Image. Prompt: “Generate an image in soft realism style showing a robot assisting a video editor while they organize video clips.”</figcaption></figure><h3>What is MCP?</h3><p>Model Context Protocol (MCP) lets you extend Claude Desktop (or other client) with custom tools. Think of it as giving Claude superpowers specific to your needs.</p><h3>Quick Start</h3><p>Install FastMCP:</p><pre>pip install fastmcp</pre><p>Create server.py:</p><pre>from fastmcp import FastMCP<br>import subprocess<br><br>mcp = FastMCP(&quot;My Tools&quot;)<br><br>@mcp.tool()<br>def compress_video(input_path: str, output_path: str) -&gt; str:<br>    &quot;&quot;&quot;Compress video using FFmpeg&quot;&quot;&quot;<br>    cmd = [&quot;ffmpeg&quot;, &quot;-i&quot;, input_path, &quot;-crf&quot;, &quot;28&quot;, output_path]<br>    subprocess.run(cmd, check=True)<br>    return f&quot;Compressed: {output_path}&quot;<br><br># Resources - Knowledge AI can access<br>@mcp.resource(&quot;docs://ffmpeg-guide&quot;)<br>def ffmpeg_guide() -&gt; str:<br>    &quot;&quot;&quot;FFmpeg compression guide&quot;&quot;&quot;<br>    return &quot;&quot;&quot;<br>    CRF values:<br>    - 18: High quality<br>    - 23: Default<br>    - 28: Lower quality<br>    &quot;&quot;&quot;<br><br>@mcp.tool()<br>def summarize_file(file_path: str) -&gt; str:<br>    &quot;&quot;&quot;Read and return file content for summarization&quot;&quot;&quot;<br>    with open(file_path) as f:<br>        return f.read()<br>if __name__ == &quot;__main__&quot;:<br>    mcp.run()</pre><h3>Connect to Claude Desktop</h3><p>Edit your config file:</p><ul><li><strong>Mac</strong>: ~/Library/Application Support/Claude/claude_desktop_config.json</li><li><strong>Windows</strong>: %APPDATA%\Claude\claude_desktop_config.json</li></ul><p>Add your server:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;my-tools&quot;: {<br>      &quot;command&quot;: &quot;python&quot;,<br>      &quot;args&quot;: [&quot;/full/path/to/server.py&quot;]<br>    }<br>  }<br>}</pre><p>Restart Claude Desktop. Done.</p><h3>Real-World Example</h3><p>You can build a video production server with multiple features:</p><ul><li><strong>Tools</strong> (actions):</li><li>Transcribe videos with <a href="https://github.com/openai/whisper">Whisper</a></li><li>Generate subtitles with AI</li><li>Burn subtitles into video</li><li>Extract audio tracks</li><li>Batch process files</li></ul><p><strong>Resources</strong> (knowledge):</p><ul><li><a href="https://www.ffmpeg.org/">FFmpeg</a> configuration presets</li><li>Video production workflows</li><li>Script templates</li><li>Encoding guidelines</li></ul><p>Now Claude handles my entire video editing workflow. I just describe what I need, and it executes, with full context of my workflow docs.</p><h3>Why This Matters</h3><p>Before MCP: “Claude, how do I compress this video?” <em>Claude explains FFmpeg commands</em></p><p>After MCP: “Claude, compress video.mp4” <em>Claude does it</em></p><p>The shift from assistant to agent is real.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qv4IiDPOzv-BcFmy1pIiMQ.gif" /><figcaption>Example of Google Docs MCP (Source: <a href="https://github.com/a-bonus/google-docs-mcp?tab=readme-ov-file">a-bonus</a>)</figcaption></figure><h3>Build Anything</h3><p><strong>Tools</strong> for actions:</p><ul><li><strong>Database queries</strong>: @mcp.tool() def get_sales_report() → Claude runs SQL and formats results</li><li><strong>API integrations</strong>: @mcp.tool() def send_slack_message() → Claude posts updates to your team</li><li><strong>File processing</strong>: @mcp.tool() def batch_resize_images() → Claude processes 100 photos in seconds</li><li><strong>System automation</strong>: @mcp.tool() def deploy_to_production() → Claude handles your deployment pipeline</li></ul><p><strong>Resources</strong> for knowledge:</p><ul><li><strong>Company docs</strong>: @mcp.resource(&quot;docs://api-guide&quot;) → Claude knows your API structure</li><li><strong>Database schemas</strong>: @mcp.resource(&quot;schema://customers&quot;) → Claude writes correct queries</li><li><strong>Configuration presets</strong>: @mcp.resource(&quot;config://deployment&quot;) → Claude uses right environment variables</li><li><strong>Workflow templates</strong>: @mcp.resource(&quot;template://pr-checklist&quot;) → Claude follows your process</li></ul><p>FastMCP handles all the protocol complexity. You just write Python functions.</p><h3>Get Started</h3><p>Check the <a href="https://github.com/jlowin/fastmcp">FastMCP docs</a> and start building. Your first tool takes 5 minutes. Your tenth tool takes 2.</p><p>The future of AI isn’t just better prompts, it’s better tools.</p><ul><li><a href="https://github.com/jlowin/fastmcp">GitHub - jlowin/fastmcp: 🚀 The fast, Pythonic way to build MCP servers and clients</a></li><li><a href="https://www.anthropic.com/news/model-context-protocol">Introducing the Model Context Protocol</a></li><li><a href="https://github.com/punkpeye/awesome-mcp-servers">GitHub - punkpeye/awesome-mcp-servers: A collection of MCP servers.</a></li><li><a href="https://huggingface.co/blog/Kseniase/mcp">🦸🏻#14: What Is MCP, and Why Is Everyone - Suddenly!- Talking About It?</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7j_NE6Pjv-E%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7j_NE6Pjv-E&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7j_NE6Pjv-E%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8158fde5efe2297109d984dca94ab8f3/href">https://medium.com/media/8158fde5efe2297109d984dca94ab8f3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed6017301005" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D'ya like dags? Build a Scraper with Apache Airflow and Docker]]></title>
            <link>https://medium.com/@arturovaine/dya-like-dags-build-a-scraper-with-apache-airflow-and-docker-3abd4c9e7f8d?source=rss-b0f1edd347f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3abd4c9e7f8d</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Arturo Vaine]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 19:40:08 GMT</pubDate>
            <atom:updated>2025-04-08T19:40:08.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Brad Pitt playing an Irish gypsy in the Guy Ritchie-directed movie ‘Snatch’" src="https://cdn-images-1.medium.com/max/498/1*rCb7bhiFItxFDgHww27Emw.gif" /><figcaption><a href="https://www.imdb.com/title/tt0208092/">Snatch</a> (2000)</figcaption></figure><h3>How to Build a Simple ETL Web Scraper with Apache Airflow and Docker</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lycv1HCoCOFPcqBukYSChA.png" /><figcaption>Mermaid.js project diagram generated <a href="https://gitdiagram.com/">GitDiagram</a></figcaption></figure><p>In this tutorial, I’ll guide you step-by-step through setting up a straightforward yet powerful ETL (Extract, Transform, Load) pipeline using Apache Airflow, Docker, PostgreSQL, and BeautifulSoup. Our pipeline will scrape quotes from a popular demo site (quotes.toscrape.com) and store the results neatly into a PostgreSQL database.</p><p>Check the full project <a href="https://github.com/arturovaine/airflow-web-scraper-etl">here</a>.</p><h3>What You’ll Learn:</h3><ul><li>How to initialize an Apache Airflow project</li><li>How to create a simple scraping DAG</li><li>How to connect Airflow tasks to PostgreSQL with Docker</li><li>Basic Airflow best practices</li></ul><h3>Step-by-Step Setup</h3><h4>1. Setting up the Environment</h4><p>Create your project folder and initialize a Python environment:</p><pre>mkdir airflow-webscraper<br>cd airflow-webscraper<br>python3 -m venv venv<br>source venv/bin/activate<br>pip install --upgrade pip<br>pip install apache-airflow requests psycopg2-binary beautifulsoup4<br>pip freeze &gt; requirements.txt</pre><h4>2. Project Structure</h4><p>Define the recommended Airflow folder structure:</p><pre>mkdir -p dags logs plugins</pre><h4>3. Writing an Airflow DAG</h4><p>Create a DAG file at dags/etl_web_scraper.py. Here’s a brief overview of the pipeline:</p><ul><li><strong>Extract</strong>: Requests data from quotes website.</li><li><strong>Transform</strong>: A placeholder to format/transform data.</li><li><strong>Load</strong>: Inserts data into PostgreSQL database.</li></ul><h4>4. Using Docker Compose to Deploy Airflow &amp; PostgreSQL</h4><p>Create a docker-compose.yaml file to orchestrate Airflow and PostgreSQL containers:</p><pre>version: &#39;3.8&#39;<br>services:<br>  postgres:<br>    image: postgres:13<br>    container_name: airflow-postgres<br>    environment:<br>      POSTGRES_USER: airflow<br>      POSTGRES_PASSWORD: airflow<br>      POSTGRES_DB: scraperdb<br>    ports:<br>      - &quot;5432:5432&quot;<br>    volumes:<br>      - postgres_data:/var/lib/postgresql/data<br>  airflow-webserver:<br>    image: apache/airflow:2.7.2<br>    container_name: airflow-webserver<br>    depends_on:<br>      - postgres<br>    environment:<br>      AIRFLOW__CORE__EXECUTOR: LocalExecutor<br>      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/scraperdb<br>      AIRFLOW__CORE__LOAD_EXAMPLES: &#39;false&#39;<br>    volumes:<br>      - ./dags:/opt/airflow/dags<br>      - ./logs:/opt/airflow/logs<br>    ports:<br>      - &quot;8080:8080&quot;<br>    command: &gt;<br>      bash -c &quot;<br>        airflow db init &amp;&amp;<br>        airflow users create --username admin --password admin --firstname admin --lastname admin --role Admin --email admin@example.com &amp;&amp;<br>        airflow webserver<br>      &quot;<br>  airflow-scheduler:<br>    image: apache/airflow:2.7.2<br>    container_name: airflow-scheduler<br>    depends_on:<br>      - airflow-webserver<br>    environment:<br>      AIRFLOW__CORE__EXECUTOR: LocalExecutor<br>      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/scraperdb<br>    volumes:<br>      - ./dags:/opt/airflow/dags<br>      - ./logs:/opt/airflow/logs<br>    command: airflow scheduler<br>volumes:<br>  postgres_data:</pre><h4>5. Running the Project</h4><pre>docker compose up --build</pre><p>Visit Airflow’s web interface at http://localhost:8080. Log in with user admin and password admin. Trigger your DAG manually and watch it populate the PostgreSQL database with quotes data.</p><h3>Verifying Data in PostgreSQL</h3><p>Connect using any SQL client or command-line tool (psql) and verify your stored data:</p><pre>SELECT * FROM quotes;</pre><h3>Conclusion</h3><p>You have successfully built a simple ETL pipeline to scrape data and persist it into a PostgreSQL database using Apache Airflow and Docker. This foundational project can be scaled and extended for larger, more complex workflows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3abd4c9e7f8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C2F vs. B2M: A New Era in Digital Commerce for Agriculture in Brazil]]></title>
            <link>https://medium.com/@arturovaine/c2f-vs-b2m-a-new-era-in-digital-commerce-for-agriculture-in-brazil-21593a3668ff?source=rss-b0f1edd347f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/21593a3668ff</guid>
            <category><![CDATA[b2b]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[business-development]]></category>
            <category><![CDATA[agriculture]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Arturo Vaine]]></dc:creator>
            <pubDate>Wed, 02 Oct 2024 00:24:45 GMT</pubDate>
            <atom:updated>2024-11-23T22:42:50.240Z</atom:updated>
            <content:encoded><![CDATA[<p>Bridging the Gap: How C2F Model Transforms Cooperative-Farmer Interactions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tC_CcAj1qJUtOVbQ" /><figcaption>“The traditional B2C and B2B e-commerce platforms do not address the business model needs of agricultural cooperatives.” From left to right: Leandro Carvalho (Supercampo CEO), Wagner Figueiredo (VTEX Architect), and Ronald Koch (Supercampo Platform and Product Manager) at <a href="https://www.youtube.com/watch?v=kaPjKAY_PQs&amp;t=1028s">VTEX Day 2024</a>.</figcaption></figure><p>The development of the Cooperative to Farmer (C2F) business model was spearheaded by the Product Manager <a href="https://www.linkedin.com/in/hitkoch/">Ronald Koch</a> in 2023 at the startup Supercampo, and represents a significant shift in the digital commerce landscape, particularly in the context of the Brazilian agrarian economy. To understand the implications and novelty of the C2F model, it’s useful to compare it with other existing business models such as Business-to-Many (B2M) and hybrid e-commerce.</p><h3>Business-to-Many (B2M)</h3><p>B2M is a marketing term describing businesses that sell goods or services to both other businesses and consumers. This model allows a company to target a more specific audience rather than a general market, catering to both B2B and B2C segments​​. B2M companies benefit from increased exposure and funding opportunities, gaining brand awareness through various channels, including word-of-mouth marketing from consumers and business channels from other organizations. This model offers a sustainable source of income thanks to the loyal customer base in B2B relationships, which often involve contracts or long-term agreements​​.</p><p>However, B2M businesses face challenges due to their wider and more varied target audience. Their marketing strategies must be more diversified, and they often need to satisfy the demands of businesses for more face-to-face meetings, customization, and price negotiations, as well as the less reliable consumer market that requires continuous advertising efforts​​.</p><h3>Cooperative to Farmer (C2F)</h3><p>The C2F model, developed at Supercampo, is designed specifically for agricultural cooperatives, addressing the unique needs of this sector that were not met by traditional e-commerce platforms. This model considers the specificities of tax regimes in different states and the dual nature of producers who operate both as individuals and businesses​​​​.</p><p>Developed over six months in collaboration with some of the largest cooperatives in Brazil, the C2F model integrates real-time apps, marketplaces, and ERP systems. It’s tailored to the agricultural business, considering the essential Cadastro de Produtor Rural (CAD/PRO)​​​​. This model is distinctive for its real-time calculation of fiscal benefits related to the specific activities of each property and its integration of various payment methods, including traditional and digital ones​​​​.</p><blockquote>C2F model integrates real-time apps, marketplaces, and ERP systems. It’s tailored to the agricultural business, considering the essential Cadastro de Produtor Rural (CAD/PRO)​​​​.</blockquote><p>Furthermore, the C2F platform allows cooperatives to sell products across Brazil with online payment systems, including <a href="https://www.bcb.gov.br/estabilidadefinanceira/pix">PIX </a>and pre-approved rural credit. It is accessible directly by rural producers, whether they are cooperative members or not, and can also be used in supermarkets and agricultural stores​​​​. The C2F model is currently operational in the marketplaces of 12 major cooperatives and is expected to handle significant financial transactions​​​​.</p><h3>Implications and Comparative Analysis</h3><p>The C2F model stands out in its specific focus on the agricultural sector, particularly in addressing the unique needs of cooperatives and producers. Unlike B2M, which aims to cover a broad range of businesses and consumers, C2F is more niche, targeting the specificities of the agricultural business and its producers. This focus allows for a more tailored approach to e-commerce, considering factors like tax regimes, producer identity, and specific payment methods prevalent in agriculture.</p><p>In contrast, B2M’s broader focus necessitates a more generalized approach, catering to a wider audience but possibly lacking the depth and specificity required by certain sectors like agriculture. The C2F model’s integration of real-time data, specific fiscal benefits, and diverse payment methods illustrates a more specialized approach compared to the broader strategies employed in B2M and hybrid e-commerce models.</p><blockquote>This focus allows for a more tailored approach to e-commerce, considering factors like tax regimes, producer identity, and specific payment methods prevalent in agriculture. In contrast, B2M’s broader focus necessitates a more generalized approach …</blockquote><p>Overall, the C2F model represents a significant advancement in digital commerce for the agricultural sector, offering a tailored solution that addresses the unique challenges and requirements of cooperatives and farmers, a niche that B2M and hybrid e-commerce models may not fully accommodate.</p><p>Sources and media releases:</p><ul><li><a href="https://globorural.globo.com/agtech/noticia/2023/10/startup-cria-novo-modelo-de-comercio-online-para-cooperativas.ghtml">Startup cria novo modelo de comércio online para cooperativas</a></li><li><a href="https://amanha.com.br/categoria/empresa/agtech-supercampo-projeta-faturar-r-500-milhoes-no-ano">Agtech Supercampo projeta faturar R$ 500 milhões no ano</a></li><li><a href="https://www.gazetadopovo.com.br/vozes/parana-sa/supercampo-planeja-superar-r-500-milhoes-em-transacoes-em-2023/">Supercampo planeja superar R$ 500 milhões em transações em 2023</a></li><li><a href="https://mundocoop.com.br/supercampo/supercampo-aumenta-alcance-das-cooperativas-incrementando-volume-de-transacoes-pelo-brasil/">Supercampo aumenta alcance das cooperativas, incrementando volume de transações pelo Brasil - MundoCoop - O Portal de Notícias do Cooperativismo</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21593a3668ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[n8n on Google Cloud Platform (GCP) without Docker: A Simple 6-Step Guide]]></title>
            <link>https://medium.com/@arturovaine/n8n-on-google-cloud-platform-gcp-without-docker-a-simple-6-step-guide-eeeeda195b53?source=rss-b0f1edd347f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeeeda195b53</guid>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[flow-based-programming]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[automation-tools]]></category>
            <dc:creator><![CDATA[Arturo Vaine]]></dc:creator>
            <pubDate>Sun, 15 Sep 2024 16:15:25 GMT</pubDate>
            <atom:updated>2024-09-15T16:25:28.899Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This guide provides step-by-step instructions to deploy </em><a href="https://n8n.partnerlinks.io/91uo871nlyrw"><em>n8n</em></a><em>, an automation and workflow tool, on a Google Cloud Platform (GCP) virtual machine (VM) without using Docker.</em></p><blockquote>If you want to run <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> directly on their server platform, check it <a href="https://n8n.partnerlinks.io/91uo871nlyrw">here</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*31vhzskFQEMv7vtMxpSAMA.png" /><figcaption><a href="https://n8n.partnerlinks.io/91uo871nlyrw"><em>n8n</em></a><em>, an automation and workflow tool</em></figcaption></figure><h4>Overview</h4><p>Deploying <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> involves:</p><p>1. Setting up the GCP VM instance.<br>2. Installing required software (Node.js and npm).<br>3. Installing and configuring <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a>.<br>4. Setting up n8n as a system service.<br>5. Securing and accessing <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a>.</p><h4>Step 1: Set Up Your GCP VM Instance</h4><p>1.1 Create a VM Instance</p><ol><li>Access GCP Console: Go to <a href="https://console.cloud.google.com/">Google Cloud Console</a></li></ol><p>2. Navigate to Compute Engine:<br> — Select Compute Engine &gt; VM Instances from the left-hand menu.</p><p>3. Create a New Instance:<br> — Click on ”Create Instance”.</p><p>4. Configure Instance Settings:<br> — Name: Assign a name, e.g., `n8n-server`.<br> — Region &amp; Zone: Choose a region close to you, e.g., `us-central1-a`.<br> — Machine Type: Select `e2-small` (2 vCPUs, 2 GB RAM) for light usage.<br> — Boot Disk:<br> — OS Image: Choose Ubuntu 20.04 LTS.<br> — Size: Default size is typically sufficient.<br> — Firewall:<br> — Check ”Allow HTTP traffic” and ”Allow HTTPS traffic”.</p><p>5. Create the Instance:<br> — Click ”Create”.</p><p>1.2 Connect to Your VM</p><p>- SSH Access:<br> — In the VM Instances list, click ”SSH” next to your instance.</p><h4>Step 2: Install Node.js and npm</h4><p>2.1 Update Package Lists</p><pre>sudo apt update</pre><p>2.2 Install Node.js (Version 18.x)</p><pre>curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -<br>sudo apt install -y nodejs</pre><p>2.3 Verify the Installation</p><pre>node -v # Should output v18.x.x<br>npm -v # Should output the npm version</pre><h4>Step 3: Install <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a></h4><p>3.1 Install <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> Globally</p><pre>sudo npm install -g n8n</pre><p>3.2 Verify <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> Installation</p><pre>n8n - version # Should display the n8n version</pre><h4>Step 4: Configure <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a></h4><p>4.1 Create a Dedicated User for n8n</p><pre>sudo adduser -system -group n8n</pre><p>4.2 Set Up Environment Variables</p><p>1. Create Environment Directory:</p><pre>sudo mkdir /etc/n8n</pre><p>2. Create Environment File:</p><pre>sudo nano /etc/n8n/.env</pre><p>3. Add Configuration Variables (.env file):</p><pre># Port Configuration<br> N8N_PORT=5678</pre><p>Basic Authentication</p><pre>N8N_BASIC_AUTH_ACTIVE=true<br>N8N_BASIC_AUTH_USER=your_username<br>N8N_BASIC_AUTH_PASSWORD=your_password</pre><p>Encryption Key</p><pre>N8N_ENCRYPTION_KEY=your_encryption_key</pre><p>4. Secure the Environment File:</p><pre>sudo chown -R n8n:n8n /etc/n8n<br>sudo chmod 600 /etc/n8n/.env</pre><h4>Step 5: Set Up <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> as a System Service</h4><p>5.1 Create a Systemd Service File</p><ol><li>Create the Service File:</li></ol><pre>sudo nano /etc/systemd/system/n8n.service</pre><p>2. Add the Following Content:</p><pre>[Unit]<br> Description=n8n Workflow Automation Tool<br> After=network.target<br>[Service]<br> Type=simple<br> User=n8n<br> Group=n8n<br> EnvironmentFile=/etc/n8n/.env<br> ExecStart=/usr/bin/n8n<br> Restart=on-failure<br> RestartSec=5s<br>[Install]<br> WantedBy=multi-user.target</pre><p>5.2 Start and Enable the <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> Service</p><ol><li>Reload Systemd Daemon:</li></ol><pre>sudo systemctl daemon-reload</pre><p>2. Start the Service:</p><pre>sudo systemctl start n8n</pre><p>3. Enable Service on Boot:</p><pre>sudo systemctl enable n8n</pre><p>4. Check Service Status:</p><pre>sudo systemctl status n8n</pre><h4>Step 6: Access and Secure n8n</h4><p>6.1 Access <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> via Browser</p><ul><li>Navigate to `<a href="http://your_server_ip:5678`">http://your_server_ip:5678`</a>.</li><li>Note: If you set up a reverse proxy and HTTPS, use `<a href="https://your_domain`/">https://your_domain`</a>.</li></ul><p>6.2 (Optional) Set Up a Reverse Proxy with Nginx</p><p>Install Nginx</p><pre>sudo apt install -y nginx</pre><p>Configure Nginx for n8n</p><ul><li>Create Nginx Server Block:</li></ul><pre>sudo nano /etc/nginx/sites-available/n8n</pre><ul><li>Add the Configuration:</li></ul><pre>server {<br> listen 80;<br> server_name your_domain_or_ip;<br>location / {<br> proxy_pass http://localhost:5678;<br> proxy_set_header Host $host;<br> proxy_set_header X-Real-IP $remote_addr;<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br> proxy_set_header X-Forwarded-Proto $scheme;<br> }<br> }</pre><ul><li>Enable the Server Block:</li></ul><pre>sudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/</pre><ul><li>Test and Reload Nginx:</li></ul><pre>sudo nginx -t<br>sudo systemctl reload nginx</pre><p>6.3 (Optional) Secure with Let’s Encrypt SSL Certificate</p><ul><li>Install Certbot:</li></ul><pre>sudo apt install -y certbot python3-certbot-nginx</pre><ul><li>Obtain SSL Certificate:</li></ul><pre>sudo certbot - nginx -d your_domain_or_ip</pre><ul><li>Follow Prompts:<br> — Provide an email address.<br> — Agree to terms.<br> — Choose whether to redirect HTTP to HTTPS.</li></ul><h4>Optional Enhancements</h4><p>A. Use a Database Backend (PostgreSQL)</p><p>Install PostgreSQL</p><pre>sudo apt install -y postgresql postgresql-contrib</pre><p>Configure PostgreSQL</p><ul><li>Switch to Postgres User:</li></ul><pre>sudo -i -u postgres</pre><ul><li>Create Database and User:</li></ul><pre>CREATE DATABASE n8n;<br>CREATE USER n8n WITH ENCRYPTED PASSWORD &#39;your_db_password&#39;;<br>GRANT ALL PRIVILEGES ON DATABASE n8n TO n8n;<br>\q<br> exit</pre><p>Update <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> Configuration</p><p>Edit `/etc/n8n/.env`:</p><pre>N8N_DB_TYPE=postgresdb<br>N8N_POSTGRESDB_HOST=localhost<br>N8N_POSTGRESDB_PORT=5432<br>N8N_POSTGRESDB_DATABASE=n8n<br>N8N_POSTGRESDB_USER=n8n<br>N8N_POSTGRESDB_PASSWORD=your_db_password</pre><p>Restart n8n Service</p><pre>sudo systemctl restart n8n</pre><p>B. Set Up a Domain Name</p><p>1. Purchase a Domain:<br> — Use a registrar like [Namecheap](<a href="https://www.namecheap.com/">https://www.namecheap.com/</a>).</p><p>2. Configure DNS Records:<br> — A Record: Point `n8n.yourdomain.com` to your VM’s public IP.</p><p>3. Update Nginx Configuration:<br> — Edit `server_name` in `/etc/nginx/sites-available/n8n`:</p><pre>server_name n8n.yourdomain.com;</pre><p>4. Obtain SSL Certificate for Domain:</p><pre>sudo certbot - nginx -d n8n.yourdomain.com</pre><h4>Troubleshooting Tips</h4><p>n8n Service Fails to Start</p><ul><li>Check Service Status:</li></ul><pre>sudo systemctl status n8n</pre><ul><li>View Logs:</li></ul><pre>sudo journalctl -u n8n -b</pre><p>Cannot Access n8n via Browser</p><ul><li>Verify n8n is Running:</li></ul><pre>sudo systemctl status n8n</pre><ul><li>Check Firewall Rules:</li></ul><pre>sudo ufw status</pre><p>SSL Certificate Issues</p><ul><li>Check DNS Propagation: use tools like <a href="https://www.whatsmydns.net/">WhatsMyDNS</a> to verify.</li><li>Review Certbot Logs:</li></ul><pre>sudo less /var/log/letsencrypt/letsencrypt.log</pre><h4>Conclusion</h4><p>You’ve successfully deployed <a href="https://n8n.partnerlinks.io/91uo871nlyrw">n8n</a> on a GCP server without Docker! You can now:</p><ul><li>Create Workflows: Start automating tasks with n8n.</li><li>Integrate Services: Connect n8n to various APIs and applications.</li><li>Maintain Security: Regularly update and secure your server.</li></ul><h4>References</h4><ul><li><a href="https://docs.n8n.io/">n8n Documentation</a></li><li><a href="https://cloud.google.com/compute/docs">GCP Compute Engine Documentation</a></li><li><a href="https://github.com/nodesource/distributions">NodeSource Node.js Binary Distributions</a></li><li><a href="https://certbot.eff.org/docs/">Certbot Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeeeda195b53" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>