<?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>Forem: Gijs Epping</title>
    <description>The latest articles on Forem by Gijs Epping (@gijs_epping_5604fb614af53).</description>
    <link>https://forem.com/gijs_epping_5604fb614af53</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1509388%2Fc3ac1ae2-f8ae-415b-b6c4-2ca61f5cf850.jpeg</url>
      <title>Forem: Gijs Epping</title>
      <link>https://forem.com/gijs_epping_5604fb614af53</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gijs_epping_5604fb614af53"/>
    <language>en</language>
    <item>
      <title>Deploy n8n on Fly.io: A Step-by-Step Guide</title>
      <dc:creator>Gijs Epping</dc:creator>
      <pubDate>Sun, 03 Nov 2024 10:53:10 +0000</pubDate>
      <link>https://forem.com/gijs_epping_5604fb614af53/deploy-n8n-on-flyio-a-step-by-step-guide-366l</link>
      <guid>https://forem.com/gijs_epping_5604fb614af53/deploy-n8n-on-flyio-a-step-by-step-guide-366l</guid>
      <description>&lt;p&gt;Hey there, fellow developers! 👋 Today, I'm excited to share a straightforward guide on deploying n8n on Fly.io. If you're looking for a cost-effective way to host your workflow automation tool, this tutorial is for you!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is n8n?
&lt;/h2&gt;

&lt;p&gt;Before we dive in, let me quickly explain what n8n is. n8n (pronounced "n-eight-n") is an excellent open-source workflow automation tool, similar to Zapier or Make (formerly Integromat). It allows you to connect different services and automate tasks with a beautiful visual interface. The best part? You can self-host it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Fly.io?
&lt;/h2&gt;

&lt;p&gt;Fly.io offers a generous free tier and makes deployment super simple. Plus, they have data centers worldwide, so you can host your n8n instance close to where you need it. They also provide automatic SSL certificates and a straightforward CLI tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Fly.io account (sign up at fly.io)&lt;/li&gt;
&lt;li&gt;Basic command line knowledge&lt;/li&gt;
&lt;li&gt;A cup of coffee ☕&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let's Get Started!
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install the Fly.io CLI
&lt;/h3&gt;

&lt;p&gt;First, we need to install the Fly.io command-line tool. On Windows, open PowerShell and run:&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;powershell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"iwr https://fly.io/install.ps1 -useb | iex"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For other operating systems, check out &lt;a href="https://fly.io/docs/hands-on/install-flyctl/" rel="noopener noreferrer"&gt;Fly.io's installation guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Deploy n8n
&lt;/h3&gt;

&lt;p&gt;I've created a repository that makes deploying n8n on Fly.io super easy. Here's what you need to do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone the repository&lt;/span&gt;
git clone https://github.com/gijs-epping/n8n-fly.git
&lt;span class="nb"&gt;cd &lt;/span&gt;n8n-fly

&lt;span class="c"&gt;# Launch your app&lt;/span&gt;
fly launch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run &lt;code&gt;fly launch&lt;/code&gt;, you'll see a configuration screen where you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose your app name (it needs to be unique)&lt;/li&gt;
&lt;li&gt;Select your region&lt;/li&gt;
&lt;li&gt;Configure resources (1GB RAM and shared CPU is usually enough to start)&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fpyvnh4pi1euqp30t9jco.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.amazonaws.com%2Fuploads%2Farticles%2Fpyvnh4pi1euqp30t9jco.png" alt="Fly.io configuration" width="800" height="607"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Configure Your Application
&lt;/h3&gt;

&lt;p&gt;The magic happens in your &lt;code&gt;fly.toml&lt;/code&gt; file. Here's what you need to pay attention to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="py"&gt;app&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"your-unique-app-name"&lt;/span&gt;  &lt;span class="c"&gt;# Choose wisely!&lt;/span&gt;
&lt;span class="py"&gt;primary_region&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"ams"&lt;/span&gt;        &lt;span class="c"&gt;# Pick a region close to you&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. First-Time Setup
&lt;/h3&gt;

&lt;p&gt;Once deployed, visit your new n8n instance at &lt;code&gt;https://your-app-name.fly.dev&lt;/code&gt;. You'll be greeted with a setup screen where you can create your admin account:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Ftrrxvu7k118pq97anqbr.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.amazonaws.com%2Fuploads%2Farticles%2Ftrrxvu7k118pq97anqbr.png" alt="n8n First time setup" width="800" height="820"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pro Tips 🚀
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resource Management&lt;/strong&gt;&lt;br&gt;
Fly.io will automatically stop your instance when it's idle, saving you resources. This is perfect for personal use or testing! But beware, webhooks don't work when it is offline.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom Domain&lt;/strong&gt;&lt;br&gt;
Want to use your own domain? It's as simple as:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   fly certs add your-domain.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring&lt;/strong&gt;
Keep an eye on your app with:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   fly status
   fly logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Troubleshooting Common Issues
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Application Not Starting?
&lt;/h3&gt;

&lt;p&gt;Check your logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fly logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  DNS Issues?
&lt;/h3&gt;

&lt;p&gt;Make sure your app name matches in all configurations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fly.toml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;li&gt;URLs in your n8n settings&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resource Issues?
&lt;/h3&gt;

&lt;p&gt;The default configuration (1GB RAM, shared CPU) should work fine for most use cases. If you need more, you can scale up using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fly scale memory 2048
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Cost Considerations 💰
&lt;/h2&gt;

&lt;p&gt;Fly.io's free tier includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 shared-cpu-1x VMs&lt;/li&gt;
&lt;li&gt;3GB total memory&lt;/li&gt;
&lt;li&gt;160GB outbound data transfer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is perfect for running a personal n8n instance!&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Now that you have n8n running, here are some cool things you can do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create your first workflow&lt;/li&gt;
&lt;li&gt;Connect with external services&lt;/li&gt;
&lt;li&gt;Set up webhook automations&lt;/li&gt;
&lt;li&gt;Explore n8n's node library&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Deploying n8n on Fly.io is a fantastic way to get your own workflow automation server up and running quickly and affordably. The setup is straightforward, and the maintenance is minimal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Need Help?
&lt;/h2&gt;

&lt;p&gt;If you run into any issues:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check out the &lt;a href="https://github.com/gijs-epping/n8n-fly" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Visit the &lt;a href="https://community.n8n.io/" rel="noopener noreferrer"&gt;n8n community forums&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Drop a comment below!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Happy automating! 🚀&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post is part of my series on self-hosting automation tools. Follow me for more guides on deploying open-source applications!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>workflow</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
