<figure aria-describedby="caption-attachment-18362" class="wp-caption aligncenter" id="attachment_18362" style="width: 1024px"><picture><source data-srcset="https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1.png.webp 1024w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1-300x150.png.webp 300w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1-768x384.png.webp 768w" sizes="(max-width: 1024px) 100vw, 1024px" type="image/webp"><img alt="How to install chatwoot on ubuntu vps" class="img-responsive wp-image-18362 size-full lazyload" data-eio="p" data-eio-rheight="512" data-eio-rwidth="1024" data-sizes="auto" data-src="https://blog-radwebhosting.b-cdn.net/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1.png" data-srcset="https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1.png 1024w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1-300x150.png 300w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1-768x384.png 768w" decoding="async" height="512" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAIAAQAAAAA0tiMUAAAAAnRSTlMAAHaTzTgAAABWSURBVHja7cEBAQAAAIIg/69uSEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7wYCDwABsKkODAAAAABJRU5ErkJggg==" title="How To Install Chatwoot On Ubuntu Vps" width="1024"/></source></picture><noscript><img alt="How to install chatwoot on ubuntu vps" class="img-responsive wp-image-18362 size-full" data-eio="l" data-speedycache-original-sizes="(max-width: 1024px) 100vw, 1024px" data-speedycache-original-src="https://blog-radwebhosting.b-cdn.net/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1.png" data-speedycache-original-srcset="https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1.png 1024w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1-300x150.png 300w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/how-to-install-chatwoot-on-ubuntu-vps-1024x512-1-768x384.png 768w" decoding="async" height="512" onload="speedycachell.r(this,true);" src="https://blog-radwebhosting.b-cdn.net/wp-content/plugins/speedycache-pro/assets/images/image-palceholder.png" title="How To Install Chatwoot On Ubuntu Vps" width="1024"/></noscript><figcaption class="wp-caption-text" id="caption-attachment-18362">Learn how to install chatwoot on ubuntu vps with our step-by-step tutorial.</figcaption></figure>
<p>This article provides a guide for how to install Chatwoot on <a href="https://radwebhosting.com/ubuntu-vps" rel="noopener" target="_blank" title="Ubuntu VPS Servers">Ubuntu VPS</a> server.</p>
<div class="ez-toc-v2_0_71 ez-toc-wrap-left-text counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction" id="ez-toc-container">
<div class="ez-toc-title-container"> <p class="ez-toc-title" style="cursor:inherit">Table of Contents</p> <span class="ez-toc-title-toggle"><a aria-label="Toggle Table of Content" class="ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/"><span class="ez-toc-js-icon-con"><span><span class="eztoc-hide" style="display:none;">Toggle</span><span class="ez-toc-icon-toggle-span"><svg class="list-377408" fill="none" height="20px" style="fill: #999;color:#999" viewbox="0 0 24 24" width="20px" xmlns="http://www.w3.org/2000/svg"><path d="M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z" fill="currentColor"></path></svg><svg baseprofile="tiny" class="arrow-unsorted-368013" height="10px" style="fill: #999;color:#999" version="1.2" viewbox="0 0 24 24" width="10px" xmlns="http://www.w3.org/2000/svg"><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"></path></svg></span></span></span></a></span></div><nav><ul class="ez-toc-list ez-toc-list-level-1"><ul class="ez-toc-list-level-3"><li class="ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-1" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#What_is_Chatwoot" title="What is Chatwoot?">What is Chatwoot?</a><ul class="ez-toc-list-level-4"><li class="ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-2" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Key_Features" title="Key Features">Key Features</a></li><li class="ez-toc-page-1 ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-3" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Who_Can_Use_Chatwoot" title="Who Can Use Chatwoot?">Who Can Use Chatwoot?</a></li><li class="ez-toc-page-1 ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-4" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Benefits" title="Benefits">Benefits</a></li></ul></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-5" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Pre-requisites" title="Pre-requisites">Pre-requisites</a><ul class="ez-toc-list-level-4"><li class="ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-6" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Supported_Linux_distribution%E2%80%8B" title="Supported Linux distribution">Supported Linux distribution</a></li><li class="ez-toc-page-1 ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-7" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Storage%E2%80%8B" title="Storage">Storage</a></li><li class="ez-toc-page-1 ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-8" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#CPU%E2%80%8B" title="CPU">CPU</a></li><li class="ez-toc-page-1 ez-toc-heading-level-4"><a class="ez-toc-link ez-toc-heading-9" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Memory%E2%80%8B" title="Memory">Memory</a></li></ul></li></ul><li class="ez-toc-page-1 ez-toc-heading-level-2"><a class="ez-toc-link ez-toc-heading-10" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step-by-Step_Guide_to_Install_Chatwoot_on_Ubuntu_VPS" title="Step-by-Step Guide to Install Chatwoot on Ubuntu VPS">Step-by-Step Guide to Install Chatwoot on Ubuntu VPS</a><ul class="ez-toc-list-level-3"><li class="ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-11" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_1_Update_and_Prepare_Your_VPS" title="Step 1: Update and Prepare Your VPS">Step 1: Update and Prepare Your VPS</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-12" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_2_Install_PostgreSQL" title="Step 2: Install PostgreSQL">Step 2: Install PostgreSQL</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-13" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_3_Install_Redis" title="Step 3: Install Redis">Step 3: Install Redis</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-14" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_4_Install_Nodejs" title="Step 4: Install Node.js">Step 4: Install Node.js</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-15" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_5_Install_Ruby" title="Step 5: Install Ruby">Step 5: Install Ruby</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-16" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_6_Clone_Chatwoot_Repository" title="Step 6: Clone Chatwoot Repository">Step 6: Clone Chatwoot Repository</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-17" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_7_Configure_Chatwoot" title="Step 7: Configure Chatwoot">Step 7: Configure Chatwoot</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-18" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_8_Precompile_Assets" title="Step 8: Precompile Assets">Step 8: Precompile Assets</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-19" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_9_Start_Chatwoot" title="Step 9: Start Chatwoot">Step 9: Start Chatwoot</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-20" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_10_Set_Up_Reverse_Proxy_Optional" title="Step 10: Set Up Reverse Proxy (Optional)">Step 10: Set Up Reverse Proxy (Optional)</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-21" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Step_11_Secure_with_SSL_Optional_but_Recommended" title="Step 11: Secure with SSL (Optional but Recommended)">Step 11: Secure with SSL (Optional but Recommended)</a></li><li class="ez-toc-page-1 ez-toc-heading-level-3"><a class="ez-toc-link ez-toc-heading-22" href="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/#Conclusion" title="Conclusion">Conclusion</a></li></ul></li></ul></nav></div><h3><span class="ez-toc-section" id="What_is_Chatwoot"></span>What is Chatwoot?<span class="ez-toc-section-end"></span></h3>
<p><a href="https://www.chatwoot.com/" rel="noopener nofollow" target="_blank" title="Chatwoot">Chatwoot</a> is an <strong>open-source customer engagement platform</strong> that helps businesses manage customer communication across various channels. It acts as a unified inbox for handling customer queries, providing tools to engage with customers more effectively and efficiently.</p>
<h4><span class="ez-toc-section" id="Key_Features"></span><strong>Key Features</strong><span class="ez-toc-section-end"></span></h4>
<ol>
<li><strong>Unified Inbox:</strong><br/>
Manage conversations from multiple channels, including:
<ul>
<li>Email</li>
<li>SMS</li>
<li>Live chat on websites</li>
<li>Social media (Facebook, Twitter, WhatsApp, Instagram)</li>
<li>Messaging platforms (Telegram, Slack, etc.)</li>
</ul>
</li>
<li><strong>Real-Time Chat:</strong><br/> Provide live chat support directly on your website or app, ensuring instant communication with visitors.</li>
<li><strong>Automations and Workflows:</strong><br/> Automate repetitive tasks like assigning conversations to agents, sending responses, or closing tickets.</li>
<li><strong>Customizable and Scalable:</strong><br/> Customize workflows, themes, and branding. Being open-source, it allows developers to tweak and expand the functionality to suit business needs.</li>
<li><strong>Multilingual Support:</strong><br/> Supports multiple languages, making it ideal for global businesses.</li>
<li><strong>Reporting and Analytics:</strong><br/> Gain insights into customer interactions, agent performance, and key metrics to improve your service.</li>
<li><strong>Role-Based Access:</strong><br/> Define roles for team members (e.g., admin, agent) and control access to features.</li>
<li><strong>Integrations:</strong><br/> Seamlessly integrate with other platforms like CRMs, help desks, and automation tools.</li>
<li><strong>Self-Hosted Option:</strong><br/> You can deploy it on your own infrastructure for complete data control or use their cloud-hosted service.</li>
</ol>
<div style="clear:both; margin-top:1em; margin-bottom:1em;"><a class="sa74e210feb91a49bd67b4c522eb6d18f" href="https://blog.radwebhosting.com/install-and-run-your-own-image-and-video-sharing-platform-on-ubuntu-vps/" rel="dofollow" target="_blank"><div style="padding-left:1em; padding-right:1em;"><span class="ctaText">See also</span> <span class="postTitle">Install and Run Your Own Image and Video Sharing Platform on Ubuntu VPS</span></div></a></div><h4><span class="ez-toc-section" id="Who_Can_Use_Chatwoot"></span><strong>Who Can Use Chatwoot?</strong><span class="ez-toc-section-end"></span></h4>
<p>Chatwoot is designed for:</p>
<ul>
<li><strong>Customer Support Teams:</strong> To manage inquiries across platforms.</li>
<li><strong>Sales Teams:</strong> To engage with prospects via live chat or social media.</li>
<li><strong>Startups and SMEs:</strong> Who need an affordable, flexible customer service solution.</li>
<li><strong>Developers:</strong> Interested in building or customizing customer engagement tools.</li>
</ul>
<h4><span class="ez-toc-section" id="Benefits"></span><strong>Benefits</strong><span class="ez-toc-section-end"></span></h4>
<ul>
<li><strong>Cost-Effective:</strong> As an open-source solution, it can be self-hosted to reduce operational costs.</li>
<li><strong>Enhanced Customer Experience:</strong> Centralized and responsive communication leads to improved customer satisfaction.</li>
<li><strong>Data Privacy:</strong> Self-hosting ensures full control over customer data, adhering to privacy regulations.</li>
</ul>
<p>Chatwoot competes with other customer support tools like Zendesk, Intercom, and Freshdesk but stands out due to its open-source nature and flexibility.</p>
<h3><span class="ez-toc-section" id="Pre-requisites"></span>Pre-requisites<span class="ez-toc-section-end"></span></h3>
<p><a href="https://radwebhosting.com/ubuntu-vps?utm_source=blog&utm_medium=banner&utm_campaign=how_to_install_chatwoot_on_ubuntu_vps&utm_term=newuser" rel="noopener" target="_blank"><img alt="Save 50% off vps server hosting" class="img-responsive aligncenter lazy lazyload" data-eio-rheight="90" data-eio-rwidth="728" data-src="//new.radwebhosting.com/banners/vps-offer-newuser-x728x90.png" decoding="async" height="90" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtgAAABaAQAAAACqTxxSAAAAAnRSTlMAAHaTzTgAAAAfSURBVGje7cGBAAAAAMOg+VNf4AhVAQAAAAAAAAB8AyBYAAHaCnCoAAAAAElFTkSuQmCC" title="Launch Your Vps Hosting With 50% Off" width="728"/><noscript><img alt="Save 50% off vps server hosting" class="img-responsive aligncenter lazy" data-eio="l" data-speedycache-original-src="//new.radwebhosting.com/banners/vps-offer-newuser-x728x90.png" decoding="async" height="90" onload="speedycachell.r(this,true);" src="https://blog-radwebhosting.b-cdn.net/wp-content/plugins/speedycache-pro/assets/images/image-palceholder.png" title="Launch Your Vps Hosting With 50% Off" width="728"/></noscript></a></p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="supported-linux-distribution">Supported Linux distribution<a aria-label="Direct link to Supported Linux distribution" class="hash-link" href="https://www.chatwoot.com/docs/self-hosted/deployment/requirements#supported-linux-distribution" rel="nofollow noopener" target="_blank" title="Direct link to Supported Linux distribution"></a></h4>
<ul>
<li>Ubuntu (<a href="https://blog.radwebhosting.com/ubuntu-20-04-lts-focal-fossa-available-kvm-vps/" rel="noopener" target="_blank" title="Ubuntu 20.04 LTS (Focal Fossa) Now Available for KVM VPS">20.04</a>/<a href="https://blog.radwebhosting.com/ubuntu-22-04-lts-jammy-jellyfish-template-added-for-kvm-vps-servers/" rel="noopener" target="_blank" title="Ubuntu 22.04 LTS (Jammy Jellyfish) Template Added for KVM VPS Servers">22.04</a>/<a href="https://blog.radwebhosting.com/ubuntu-24-04-noble-numbat-now-available-for-vps-servers/" rel="noopener" target="_blank" title="Ubuntu 24.04 (Noble Numbat) Now Available for VPS Servers">24.04</a>)</li>
</ul>
<p>Installation of Chatwoot is possible on most Unix environments, but not officially supported.<a aria-label="Direct link to Hardware requirements" class="hash-link" href="https://www.chatwoot.com/docs/self-hosted/deployment/requirements#hardware-requirements" rel="nofollow noopener" target="_blank" title="Direct link to Hardware requirements"></a></p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="storage">Storage<a aria-label="Direct link to Storage" class="hash-link" href="https://www.chatwoot.com/docs/self-hosted/deployment/requirements#storage" rel="nofollow noopener" target="_blank" title="Direct link to Storage"></a></h4>
<p>The necessary hard drive space largely depends on your usage, the size and number of attachments that you receive through your conversations etc.</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="cpu">CPU<a aria-label="Direct link to CPU" class="hash-link" href="https://www.chatwoot.com/docs/self-hosted/deployment/requirements#cpu" rel="nofollow noopener" target="_blank" title="Direct link to CPU"></a></h4>
<p>CPU requirements are dependent on the usage and expected workload. Your workload is influenced by factors such as – but not limited to – how active your users are, how many conversations do you receive and the conversation channels which you are using.</p>
<p>The following is the recommended minimum CPU hardware guidance for a handful of example Chatwoot conversation base sizes.</p>
<ul>
<li><strong>4 cores</strong> is the <strong>recommended</strong> minimum number of cores and supports up to 10,000 conversations a day.</li>
<li>8 cores supports up to 20,000 conversations a day.</li>
<li>More conversations? Consider scaling horizontally by adding more application servers.</li>
</ul>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="memory">Memory<a aria-label="Direct link to Memory" class="hash-link" href="https://www.chatwoot.com/docs/self-hosted/deployment/requirements#memory" rel="nofollow noopener" target="_blank" title="Direct link to Memory"></a></h4>
<p>Memory requirements are dependent on the usage and expected workload. Your workload is influenced by factors such as – but not limited to – How active your users are, how many conversations do you receive and the conversation channels which you are using.</p>
<div style="clear:both; margin-top:1em; margin-bottom:1em;"><a class="sa74e210feb91a49bd67b4c522eb6d18f" href="https://blog.radwebhosting.com/how-to-create-vm-via-api-for-vps-resellers/" rel="dofollow" target="_blank"><div style="padding-left:1em; padding-right:1em;"><span class="ctaText">See also</span> <span class="postTitle">How to Create VM via API for VPS Resellers</span></div></a></div><p>The following is the recommended minimum Memory hardware guidance for a handful of example Chatwoot conversation base sizes.</p>
<ul>
<li><strong>4GB RAM</strong> is the <strong>required</strong> minimum memory size and supports up to 10,000 conversations a day.
<ul>
<li>we are always working to reduce the memory requirement.</li>
</ul>
</li>
<li>8GB RAM supports up to 20,000 conversations a day.</li>
<li>More conversations? Consider scaling horizontally by adding more application servers.</li>
</ul>
<p><strong>Note:</strong> Add at least 1GB of swap memory to the machine to ensure that the machine doesn’t run out of resources during an upgrade.</p>
<h2><span class="ez-toc-section" id="Step-by-Step_Guide_to_Install_Chatwoot_on_Ubuntu_VPS"></span>Step-by-Step Guide to Install Chatwoot on Ubuntu VPS<span class="ez-toc-section-end"></span></h2>
<p>Chatwoot is an open-source customer engagement platform that can be self-hosted. Follow this guide to install Chatwoot on Ubuntu VPS.</p>
<h3><span class="ez-toc-section" id="Step_1_Update_and_Prepare_Your_VPS"></span><strong>Step 1: Update and Prepare Your VPS</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Log in to Your VPS:</strong><br/> <a href="https://radwebhosting.com/client_area/knowledgebase/30/How-to-SSH-a-Virtual-or-Dedicated-Server-Linux.html" rel="noopener" target="_blank" title="How to SSH a Virtual or Dedicated Server (Linux)">Use SSH to access your VPS</a>: <pre class="EnlighterJSRAW" data-enlighter-language="shell">ssh username@your_vps_ip</pre></li>
<li><strong>Update the System:</strong><br/> Update your Ubuntu package lists and upgrade installed packages. <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt update && sudo apt upgrade -y</pre></li>
<li><strong>Install Essential Tools:</strong><br/> Install necessary dependencies like <code>curl</code>, <code>git</code>, and <code>build-essential</code>. <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install curl git build-essential -y</pre></li>
</ol>
<h3><span class="ez-toc-section" id="Step_2_Install_PostgreSQL"></span><strong>Step 2: Install PostgreSQL</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Install PostgreSQL:</strong><br/> Chatwoot requires PostgreSQL as its database. <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install postgresql postgresql-contrib -y</pre></li>
<li><strong>Set Up a Database and User for Chatwoot:</strong><br/> Switch to the PostgreSQL user and create a database and user. <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo -i -u postgres psql</pre> <p>Run the following commands inside the <code>psql</code> shell:</p> <pre class="EnlighterJSRAW" data-enlighter-language="shell">CREATE DATABASE chatwoot_db; CREATE USER chatwoot_user WITH PASSWORD 'your_secure_password'; ALTER ROLE chatwoot_user SET client_encoding TO 'utf8'; ALTER ROLE chatwoot_user SET default_transaction_isolation TO 'read committed'; ALTER ROLE chatwoot_user SET timezone TO 'UTC'; GRANT ALL PRIVILEGES ON DATABASE chatwoot_db TO chatwoot_user; \q</pre> <p>Exit the PostgreSQL user:</p> <pre class="EnlighterJSRAW" data-enlighter-language="shell">exit</pre></li>
</ol>
<h3><span class="ez-toc-section" id="Step_3_Install_Redis"></span><strong>Step 3: Install Redis</strong><span class="ez-toc-section-end"></span></h3>
<p>Redis is used for background job processing and caching.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install redis -y
sudo systemctl enable redis
sudo systemctl start redis
</pre>
<h3><span class="ez-toc-section" id="Step_4_Install_Nodejs"></span><strong>Step 4: Install Node.js</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Add the NodeSource Repository:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -</pre></li>
<li><strong>Install Node.js and Yarn:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install nodejs -y npm install --global yarn</pre></li>
</ol>
<h3><span class="ez-toc-section" id="Step_5_Install_Ruby"></span><strong>Step 5: Install Ruby</strong><span class="ez-toc-section-end"></span></h3>
<p>Chatwoot is built on Ruby on Rails, so Ruby is essential.</p>
<ol>
<li><strong>Install RVM (Ruby Version Manager):</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install gnupg2 -y curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - curl -sSL https://get.rvm.io | bash -s stable</pre></li>
<li><strong>Add User to RVM group:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo usermod -aG rvm root</pre></li>
<li><strong>Load RVM:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">source /etc/profile.d/rvm.sh</pre></li>
<li><strong>Install Ruby:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">rvm install 3.2.2 rvm use 3.2.2 --default ruby -v</pre></li>
</ol>
<h3><span class="ez-toc-section" id="Step_6_Clone_Chatwoot_Repository"></span><strong>Step 6: Clone Chatwoot Repository</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Clone the Repository:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">git clone https://github.com/chatwoot/chatwoot.git cd chatwoot</pre></li>
<li><strong>Install Dependencies:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">bundle install yarn install</pre></li>
</ol>
<h3><span class="ez-toc-section" id="Step_7_Configure_Chatwoot"></span><strong>Step 7: Configure Chatwoot</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Set Environment Variables:</strong><br/> Create an <code>.env</code> file and populate it with the necessary configuration. <pre class="EnlighterJSRAW" data-enlighter-language="shell">cp .env.example .env nano .env</pre> <p>Update the file with your database credentials and other configurations:</p> <pre class="EnlighterJSRAW" data-enlighter-language="shell">POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_USERNAME=chatwoot_user POSTGRES_PASSWORD=your_secure_password POSTGRES_NAME=chatwoot_db</pre></li>
<li><strong>Run Database Migrations:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">rails db:setup</pre></li>
</ol>
<h3><span class="ez-toc-section" id="Step_8_Precompile_Assets"></span><strong>Step 8: Precompile Assets</strong><span class="ez-toc-section-end"></span></h3>
<pre class="EnlighterJSRAW" data-enlighter-language="shell">rails assets:precompile RAILS_ENV=production
</pre>
<h3><span class="ez-toc-section" id="Step_9_Start_Chatwoot"></span><strong>Step 9: Start Chatwoot</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Start the Application:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">foreman start -f Procfile.dev</pre></li>
<li><strong>Access Chatwoot:</strong><br/> Open your browser and navigate to <code>http://your_vps_ip:3000</code>.</li>
</ol>
<h3><span class="ez-toc-section" id="Step_10_Set_Up_Reverse_Proxy_Optional"></span><strong>Step 10: Set Up Reverse Proxy (Optional)</strong><span class="ez-toc-section-end"></span></h3>
<p>For production deployment, set up a reverse proxy using Nginx.</p>
<ol>
<li><strong>Install Nginx:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install nginx -y</pre></li>
<li><strong>Configure Nginx:</strong><br/> Create a new configuration file: <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo nano /etc/nginx/sites-available/chatwoot</pre> <p>Add the following content:</p> <pre class="EnlighterJSRAW" data-enlighter-language="shell">server { listen 80; server_name your_domain_or_ip; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }</pre></li>
<li><strong>Enable the Configuration:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo ln -s /etc/nginx/sites-available/chatwoot /etc/nginx/sites-enabled sudo nginx -t sudo systemctl restart nginx</pre></li>
<li><strong>Access the Application:</strong><br/> Navigate to <code>http://your_ip_address:3000</code>.</li>
</ol>
<h3><span class="ez-toc-section" id="Step_11_Secure_with_SSL_Optional_but_Recommended"></span><strong>Step 11: Secure with SSL (Optional but Recommended)</strong><span class="ez-toc-section-end"></span></h3>
<ol>
<li><strong>Install Certbot:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install certbot python3-certbot-nginx -y</pre></li>
<li><strong>Obtain an SSL Certificate:</strong> <pre class="EnlighterJSRAW" data-enlighter-language="shell">sudo certbot --nginx -d your_domain</pre></li>
<li><strong>Verify SSL Setup:</strong><br/> Access your site at <code>https://your_domain</code>.</li>
</ol>
<p><a href="https://radwebhosting.com/ubuntu-vps?utm_source=blog&utm_medium=banner&utm_campaign=how_to_install_chatwoot_on_ubuntu_vps" rel="noopener" target="_blank"><br/>
<img alt="Launch 100% ssd ubuntu vps from $1. 99/mo" class="img-responsive lazy aligncenter wp-image-18331 lazyload" data-eio-rheight="50" data-eio-rwidth="350" data-sizes="auto" data-src="https://blog-radwebhosting.b-cdn.net/wp-content/uploads/2024/12/instant-vps-from-199-300x50-1.webp" data-srcset="https://blog.radwebhosting.com/wp-content/uploads/2024/12/instant-vps-from-199-300x50-1.webp 350w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/instant-vps-from-199-300x50-1-300x43.webp 300w" decoding="async" height="100" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV4AAAAyAQMAAAAupCHMAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABlJREFUSMdjYBgFo2AUjIJRMApGwSgYqgAACMoAAcwbHQUAAAAASUVORK5CYII=" title="Launch 100% Ssd Ubuntu Vps From $1.99/Mo" width="700"/><noscript><img alt="Launch 100% ssd ubuntu vps from $1. 99/mo" class="img-responsive lazy aligncenter wp-image-18331" data-eio="l" data-speedycache-original-sizes="(max-width: 700px) 100vw, 700px" data-speedycache-original-src="https://blog-radwebhosting.b-cdn.net/wp-content/uploads/2024/12/instant-vps-from-199-300x50-1.webp" data-speedycache-original-srcset="https://blog.radwebhosting.com/wp-content/uploads/2024/12/instant-vps-from-199-300x50-1.webp 350w, https://blog.radwebhosting.com/wp-content/uploads/2024/12/instant-vps-from-199-300x50-1-300x43.webp 300w" decoding="async" height="100" onload="speedycachell.r(this,true);" src="https://blog-radwebhosting.b-cdn.net/wp-content/plugins/speedycache-pro/assets/images/image-palceholder.png" title="Launch 100% Ssd Ubuntu Vps From $1.99/Mo" width="700"/></noscript></a></p>
<h3><span class="ez-toc-section" id="Conclusion"></span>Conclusion<span class="ez-toc-section-end"></span></h3>
<p>You now know how to install Chatwoot on Ubuntu VPS. Configure further settings within the Chatwoot dashboard to tailor it to your requirements.</p>
<div class="addtoany_share_save_container addtoany_content addtoany_content_bottom"><div class="addtoany_header">Share this:</div><div class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-title="How to Install Chatwoot on Ubuntu VPS" data-a2a-url="https://blog.radwebhosting.com/how-to-install-chatwoot-on-ubuntu-vps/"><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Facebook"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Twitter"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Pinterest"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="LinkedIn"></a><a class="a2a_button_tumblr" href="https://www.addtoany.com/add_to/tumblr?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Tumblr"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Reddit"></a><a class="a2a_button_blogger" href="https://www.addtoany.com/add_to/blogger?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Blogger"></a><a class="a2a_button_buffer" href="https://www.addtoany.com/add_to/buffer?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Buffer"></a><a class="a2a_button_facebook_messenger" href="https://www.addtoany.com/add_to/facebook_messenger?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Messenger"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Mastodon"></a><a class="a2a_button_bluesky" href="https://www.addtoany.com/add_to/bluesky?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Bluesky"></a><a class="a2a_button_hacker_news" href="https://www.addtoany.com/add_to/hacker_news?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Hacker News"></a><a class="a2a_button_telegram" href="https://www.addtoany.com/add_to/telegram?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Telegram"></a><a class="a2a_button_slashdot" href="https://www.addtoany.com/add_to/slashdot?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Slashdot"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="X"></a><a class="a2a_button_threads" href="https://www.addtoany.com/add_to/threads?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Threads"></a><a class="a2a_button_google_translate" href="https://www.addtoany.com/add_to/google_translate?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Google Translate"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Copy Link"></a><a class="a2a_button_wordpress" href="https://www.addtoany.com/add_to/wordpress?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="WordPress"></a><a class="a2a_button_twiddla" href="https://www.addtoany.com/add_to/twiddla?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Twiddla"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="WhatsApp"></a><a class="a2a_button_google_gmail" href="https://www.addtoany.com/add_to/google_gmail?linkurl=https%3A%2F%2Fblog.radwebhosting.com%2Fhow-to-install-chatwoot-on-ubuntu-vps%2F&linkname=How%20to%20Install%20Chatwoot%20on%20Ubuntu%20VPS" rel="nofollow noopener" target="_blank" title="Gmail"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share"></a></div></div>