aboutsummaryrefslogtreecommitdiff
path: root/build/self-hosting-fathom/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'build/self-hosting-fathom/index.html')
-rw-r--r--build/self-hosting-fathom/index.html110
1 files changed, 59 insertions, 51 deletions
diff --git a/build/self-hosting-fathom/index.html b/build/self-hosting-fathom/index.html
index f1c294c..a1d125f 100644
--- a/build/self-hosting-fathom/index.html
+++ b/build/self-hosting-fathom/index.html
@@ -1,87 +1,95 @@
<!doctype html>
-<html lang="en" id="top">
+<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:,">
<title>Self-Hosting Fathom Analytics with DigitalOcean</title>
- <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
- <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+ <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" />
+<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
</head>
<nav>
- <a href="#menu">Menu &darr;</a>
+ <a href="#menu">Menu &darr;</a>
</nav>
<main>
-<h1>Self-Hosting Fathom Analytics with DigitalOcean</h1>
+<h1 id="self-hosting-fathom-analytics-with-digitalocean">Self-Hosting Fathom Analytics with DigitalOcean</h1>
+
<p>2021-02-02</p>
-<p>Since my previous post walked through the process of setting up <a href="/fathom-analytics-netlify">Fathom PRO on Netlify</a>, I figured it made sense to create a similar tutorial for the "Lite" variation, self-hosted on DigitalOcean.</p>
-<p>Please note that while I think the PRO version of <a target="_blank" href="https://usefathom.com/ref/DKHJVX">Fathom Analytics</a> is truly great, for my small, niche blog it seemed overkill compared to self-hosting. Switching over from $14/mo to $5/mo while retaining most of the same functionality was a no-brainer. Choose the option that best suits your needs (or in the case - budget &amp; bandwidth).</p>
-<p>With that cleared up - let's get into it!</p>
-<h2>Prerequisites</h2>
+
+<p>Since my previous post walked through the process of setting up Fathom PRO on Netlify, I figured it made sense to create a similar tutorial for the &#8220;Lite&#8221; variation, self-hosted on DigitalOcean.</p>
+
+<p>Please note that while I think the PRO version of Fathom Analytics is truly great, for my small, niche blog it seemed overkill compared to self-hosting. Switching over from $14&#47;mo to $5&#47;mo while retaining most of the same functionality was a no-brainer. Choose the option that best suits your needs (or in the case - budget &#38; bandwidth).</p>
+
+<p>With that cleared up - let&#8217;s get into it!</p>
+
+<h2 id="prerequisites">Prerequisites</h2>
+
<ol>
<li>One or more website(s) where you would like to include analytics</li>
-<li><a target="_blank" href="https://m.do.co/c/74b3fd11c07a">DigitalOcean account</a> (<strong>this link will give you a $100 credit!</strong>)</li>
+<li>DigitalOcean account (<strong>this link will give you a $100 credit!</strong>)</li>
<li>Positive attitude and passion for privacy-respecting analytics!</li>
</ol>
-<h2>Create a Droplet</h2>
-<p>Once your DigitalOcean account is setup, navigate to the <a target="_blank" href="https://marketplace.digitalocean.com">Marketplace</a> and search for <code>Fathom Analytics</code>. Then click the <code>Create Fathom Analytics Droplet</code>.</p>
-<p>From here you'll be brought to a page that allows you to customize the specifications of your new droplet. If you're a smaller traffic site (personal blog, etc) selecting the <strong>$5/month</strong> Basic Shared CPU option is your best bet.</p>
-<p><figure>
- <img src="/public/images/fathom-create-droplet-details.webp" alt="Fathom Droplet Details">
- <figcaption>Creating the new droplet (<a href="/public/images/fathom-create-droplet-details.webp">direct link to image</a>)</figcaption>
-</figure></p>
+
+<h2 id="create-a-droplet">Create a Droplet</h2>
+
+<p>Once your DigitalOcean account is setup, navigate to the Marketplace and search for <code>Fathom Analytics</code>. Then click the <code>Create Fathom Analytics Droplet</code>.</p>
+
+<p>From here you&#8217;ll be brought to a page that allows you to customize the specifications of your new droplet. If you&#8217;re a smaller traffic site (personal blog, etc) selecting the <strong>$5&#47;month</strong> Basic Shared CPU option is your best bet.</p>
+
<p>Select the data-center region based on where most of your traffic originates from. I would suggest enabling <code>IPv6</code> and setting up your authentication via SSH instead of a regular password system. Adding backups is entirely at your own discretion.</p>
-<p>Once you're ready, click <strong>Create Droplet</strong>.</p>
-<h2>Enter the Matrix (not really)</h2>
+
+<p>Once you&#8217;re ready, click <strong>Create Droplet</strong>.</p>
+
+<h2 id="enter-the-matrix-not-really">Enter the Matrix (not really)</h2>
+
<p>Once DigitalOcean finishes spinning up your new droplet, open a terminal and connect to it by entering:</p>
+
<pre><code>ssh root@YOUR_DROPLET_IP
</code></pre>
-<p>If you setup your login via SSH everything should work as-is. If you went the password route, you'll given a prompt to enter it.</p>
-<p>Now that you're connected, Fathom will guide you through a simple configuration setup. It's fairly straightforward and painless. Once complete, move to the next step.</p>
-<h2>Domains</h2>
-<p>You'll most likely want to host this instance on your own domain or subdomain - instead of connecting directly via the droplet's <code>IP</code>. Head over to your <strong>Networking</strong> page in the sidebar of DigitalOcean and add your custom domain.</p>
-<p>Then, click on that newly added domain - we need to add some new records. You're going to add two new <code>A</code> records to this domain:</p>
-<p><table>
- <thead>
- <tr>
- <th>Type</th>
- <th>Hostname</th>
- <th>Value</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>A</td>
- <td>@</td>
- <td>YOUR_DROPLET_IP</td>
- </tr>
- <tr>
- <td>A</td>
- <td>www</td>
- <td>YOUR_DROPLET_IP</td>
- </tr>
- </tbody>
-</table></p>
+
+<p>If you setup your login via SSH everything should work as-is. If you went the password route, you&#8217;ll given a prompt to enter it.</p>
+
+<p>Now that you&#8217;re connected, Fathom will guide you through a simple configuration setup. It&#8217;s fairly straightforward and painless. Once complete, move to the next step.</p>
+
+<h2 id="domains">Domains</h2>
+
+<p>You&#8217;ll most likely want to host this instance on your own domain or subdomain - instead of connecting directly via the droplet&#8217;s <code>IP</code>. Head over to your <strong>Networking</strong> page in the sidebar of DigitalOcean and add your custom domain.</p>
+
+<p>Then, click on that newly added domain - we need to add some new records. You&#8217;re going to add two new <code>A</code> records to this domain:</p>
+
<p>The last thing you need to do is set your nameservers to point to DigitalOcean:</p>
+
<pre><code>ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com
</code></pre>
-<p>Give it some time to propagate and you'll be in business!</p>
-<h2>SSL FTW</h2>
+
+<p>Give it some time to propagate and you&#8217;ll be in business!</p>
+
+<h2 id="ssl-ftw">SSL FTW</h2>
+
<p>There is hardly a good reason not to practice security on the web, so setting up your new analytics to be served over <code>HTTPS</code> is just the smart thing to do. Did I mention that this is completely free as well? See - no excuses.</p>
-<p>In order to get a free SSL certificate setup, you'll need to install <code>certbot</code>. While connected to your droplet, enter the following:</p>
+
+<p>In order to get a free SSL certificate setup, you&#8217;ll need to install <code>certbot</code>. While connected to your droplet, enter the following:</p>
+
<pre><code>sudo apt-get install python-certbot-nginx
</code></pre>
+
<p>Once installed, enter the following to setup SSL (remember to swap out the domain with your own):</p>
+
<pre><code>certbot --nginx -d your-cool-domain.com
</code></pre>
-<p>Follow the steps (it's very quick and easy) and you'll have <code>HTTPS</code> setup in a jiffy!</p>
-<h2>The Final Lap</h2>
+
+<p>Follow the steps (it&#8217;s very quick and easy) and you&#8217;ll have <code>HTTPS</code> setup in a jiffy!</p>
+
+<h2 id="the-final-lap">The Final Lap</h2>
+
<p>The last thing to do is login to your newly self-hosted Fathom instance, add your site you wish to track, grab the generated tracking code and then slap that badboy on whatever pages you need to track!</p>
-<p>Congrats! You're now officially running your own set of analytics tools. You should be happy about what you've accomplished and proud for respecting your users' privacy!</p>
+
+<p>Congrats! You&#8217;re now officially running your own set of analytics tools. You should be happy about what you&#8217;ve accomplished and proud for respecting your users&#8217; privacy!</p>
<footer role="contentinfo">
<h2>Menu Navigation</h2>
<ul id="menu">