<?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: Andy Wahyudi</title>
    <description>The latest articles on DEV Community by Andy Wahyudi (@andywahyudi).</description>
    <link>https://dev.to/andywahyudi</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%2F793185%2F4acc7d8f-06a0-424f-93f1-5ca7de1921a0.png</url>
      <title>DEV Community: Andy Wahyudi</title>
      <link>https://dev.to/andywahyudi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andywahyudi"/>
    <language>en</language>
    <item>
      <title>How to upgrade n8n uses Docker on DigitalOcean</title>
      <dc:creator>Andy Wahyudi</dc:creator>
      <pubDate>Tue, 20 May 2025 01:28:38 +0000</pubDate>
      <link>https://dev.to/andywahyudi/how-to-upgrade-n8n-uses-docker-on-digitalocean-1jn1</link>
      <guid>https://dev.to/andywahyudi/how-to-upgrade-n8n-uses-docker-on-digitalocean-1jn1</guid>
      <description>&lt;p&gt;To upgrade self-hosted n8n instance on a DigitalOcean 1-Click Droplet, which typically uses Docker and Docker Compose, follow these step-by-step instructions. &lt;/p&gt;

&lt;p&gt;This guide assumes you have SSH access to your Droplet and basic familiarity with terminal commands. Regular updates are crucial for accessing new features, bug fixes, and security enhancements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;DigitalOcean Account: Access to your DigitalOcean Cloud Control Panel.&lt;/li&gt;
&lt;li&gt;SSH Access: SSH credentials (root or a user with sudo privileges) or use the DigitalOcean web console.&lt;/li&gt;
&lt;li&gt;Backup: Export your workflows via the n8n UI and create a Droplet snapshot in the DigitalOcean dashboard to ensure data safety.&lt;/li&gt;
&lt;li&gt;Docker Compose Setup: The n8n 1-Click Droplet uses Docker Compose, with configuration files typically located in &lt;code&gt;/opt/n8n-docker-caddy&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Step-by-Step Guide to Upgrade n8n&lt;/strong&gt;
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Access Your Droplet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open the DigitalOcean Cloud Control Panel (cloud.digitalocean.com).&lt;/li&gt;
&lt;li&gt;Navigate to Droplets in the left-hand menu and select your n8n Droplet.&lt;/li&gt;
&lt;li&gt;Click the Console button to open a web-based terminal, or use SSH to connect:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh root@YOUR_DROPLET_IP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;YOUR_DROPLET_IP&lt;/code&gt; with your Droplet’s public IP address.&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigate to the n8n Configuration Directory
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The n8n 1-Click Droplet typically stores its Docker Compose setup in /opt/n8n-docker-caddy. Change to this directory:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /opt/n8n-docker-caddy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you receive a “No such file or directory” error, verify the directory exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls /opt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the directory is missing or named differently, contact DigitalOcean support or check your setup documentation. The folder might be in another location like &lt;code&gt;/home/&amp;lt;USERNAME&amp;gt;/n8n-docker-caddy&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pull the Latest n8n Image
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Update the Docker image for n8n to the latest version:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command fetches the latest n8n image specified in your docker-compose.yml file (usually n8n:latest).&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop and Remove the Existing n8n Container
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Stop and remove the current n8n container to prepare for the new image:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose down
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This stops the n8n and Caddy containers but preserves your data (stored in Docker volumes or local folders like local_files).&lt;/p&gt;

&lt;h2&gt;
  
  
  Start the Updated n8n Instance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Recreate and start the containers with the new image:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-d&lt;/code&gt; flag runs the containers in detached mode (in the background). Docker Compose will recreate the containers using the latest n8n image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify the Update
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open your n8n instance in a web browser (e.g., &lt;a href="https://n8n.yourdomain.com" rel="noopener noreferrer"&gt;https://n8n.yourdomain.com&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Perform a hard refresh (Ctrl + Shift + R or Cmd + Shift + R) to clear the browser cache.&lt;/li&gt;
&lt;li&gt;Check the n8n version in the Settings or About section of the n8n UI to confirm the update.&lt;/li&gt;
&lt;li&gt;Ensure your workflows are intact and test a few to verify functionality.&lt;/li&gt;
&lt;li&gt;If an update notification persists in the UI, repeat the hard refresh or clear the cache again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Optional: Automate Future Updates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;To simplify future updates, consider using Watchtower, a tool that automatically updates Docker containers:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Watchtower checks for new n8n images and updates your containers automatically. Be cautious, as automatic updates may introduce breaking changes—always back up before enabling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important Notes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backup First: Always export workflows and create a Droplet snapshot before upgrading to avoid data loss. Snapshots can be created in the DigitalOcean dashboard under Droplets &amp;gt; Snapshots.&lt;/li&gt;
&lt;li&gt;Check Release Notes: Review n8n’s release notes on GitHub (&lt;a href="https://github.com/n8n-io/n8n/releases" rel="noopener noreferrer"&gt;https://github.com/n8n-io/n8n/releases&lt;/a&gt;) for breaking changes or new features that may affect your workflows.&lt;/li&gt;
&lt;li&gt;DNS and Firewall: Ensure your subdomain (e.g., n8n.yourdomain.com) is correctly pointed to the Droplet’s IP and that ports 80 and 443 are open in the firewall (this is usually preconfigured in the 1-Click Droplet).&lt;/li&gt;
&lt;li&gt;Troubleshooting:
-- If the docker compose commands fail, ensure Docker and Docker Compose are installed (docker --version and docker compose version).
-- If you can’t access n8n after the update, check the container logs:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-- For persistent issues, consult the n8n community forum (community.n8n.io) or DigitalOcean support.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Version Pinning: The docker-compose.yml file typically uses the n8n:latest image. If you need a specific version, edit the file (e.g., image: n8n:1.50.0) before pulling and restarting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instructions adapted from n8n documentation and community resources.&lt;/li&gt;
&lt;li&gt;For additional details, refer to the official n8n DigitalOcean guide: &lt;a href="https://docs.n8n.io/hosting/installation/server-setups/digital-ocean/" rel="noopener noreferrer"&gt;https://docs.n8n.io/hosting/installation/server-setups/digital-ocean/&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
