Switch to theme based on Archie

This commit is contained in:
Dave Gallant
2023-03-25 11:00:28 -04:00
parent f4f3f341c3
commit ade197054d
432 changed files with 14878 additions and 35404 deletions

View File

@@ -1,332 +1,105 @@
<!DOCTYPE html>
<html lang='en' dir='auto'><head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta name='description' content=''>
<meta name='theme-color' content='#8979b3'>
<html><head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Backing Up Gmail With Synology - davegallant</title><link rel="icon" type="image/png" href=https://davegallant.ca/favicon.ico /><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="" />
<meta property="og:image" content=""/>
<meta property="og:title" content="Backing Up Gmail With Synology" />
<meta property="og:description" content="" />
<meta property="og:type" content="article" />
<meta property="og:url" content="/blog/2022/03/13/backing-up-gmail-with-synology/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2022-03-13T18:49:10-04:00" />
<meta property="article:modified_time" content="2022-03-13T18:49:10-04:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Backing Up Gmail With Synology"/>
<meta name="twitter:description" content=""/>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<meta property='og:title' content='Backing Up Gmail With Synology • davegallant'>
<meta property='og:description' content=''>
<meta property='og:url' content='/blog/2022/03/13/backing-up-gmail-with-synology/'>
<meta property='og:site_name' content='davegallant'>
<meta property='og:type' content='article'><meta property='article:section' content='post'><meta property='article:tag' content='degoogle'><meta property='article:tag' content='synology'><meta property='article:tag' content='gmail'><meta property='article:tag' content='backup'><meta property='article:tag' content='ransomware'><meta property='article:published_time' content='2022-03-13T18:49:10-04:00'/><meta property='article:modified_time' content='2022-03-13T18:49:10-04:00'/><meta name='twitter:card' content='summary'>
<meta name="generator" content="Hugo 0.108.0">
<title>Backing Up Gmail With Synology • davegallant</title>
<link rel='canonical' href='/blog/2022/03/13/backing-up-gmail-with-synology/'>
<link rel='icon' href='/favicon.ico'>
<link rel='stylesheet' href='/assets/css/main.ab98e12b.css'><link rel='stylesheet' href='/css/custom.css'><style>
:root{--color-accent:#8979b3;}
</style>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-98710982-2', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.f7354ef8ed840429a37397307f3d9872782673d6b91d714b3f600b210d91fbaf.css" />
<link id="darkModeStyle" rel="stylesheet" type="text/css" href="/css/dark.726cd11ca6eb7c4f7d48eb420354f814e5c1b94281aaf8fd0511c1319f7f78a4.css" disabled />
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
</script>
<link rel="stylesheet" type="text/css" href="/css/custom.2e59ff60a2d9c7e42e3c1af2aff0ba627da46f910a234867e98d178eb05c87dc.css">
</head>
<body class='page type-post has-sidebar'>
<div class='site'><div id='sidebar' class='sidebar'>
<a class='screen-reader-text' href='#main-menu'>Skip to Main Menu</a>
<div class='container'><section class='widget widget-about sep-after'>
<header>
<div class='logo'>
<a href='/'>
<img src='/images/logo.png'>
</a>
</div>
<h2 class='title site-title '>
<a href='/'>
davegallant
</a>
</h2>
<div class='desc'>
personal blog
</div>
</header>
</section>
<section class='widget widget-taxonomy_cloud sep-after'>
<header>
<h4 class='title widget-title'>Tags</h4>
</header>
<div class='container list-container'>
<ul class='list taxonomy-cloud'><li>
<a href='/tags/adguard/' style='font-size:1em'>adguard</a>
</li><li>
<a href='/tags/aws/' style='font-size:1em'>aws</a>
</li><li>
<a href='/tags/aws-vault/' style='font-size:1em'>aws-vault</a>
</li><li>
<a href='/tags/backup/' style='font-size:1em'>backup</a>
</li><li>
<a href='/tags/containers/' style='font-size:1em'>containers</a>
</li><li>
<a href='/tags/degoogle/' style='font-size:2em'>degoogle</a>
</li><li>
<a href='/tags/docker/' style='font-size:1em'>docker</a>
</li><li>
<a href='/tags/dotfiles/' style='font-size:1em'>dotfiles</a>
</li><li>
<a href='/tags/gmail/' style='font-size:1em'>gmail</a>
</li><li>
<a href='/tags/grafana/' style='font-size:1em'>grafana</a>
</li><li>
<a href='/tags/home-manager/' style='font-size:1em'>home-manager</a>
</li><li>
<a href='/tags/homelab/' style='font-size:1em'>homelab</a>
</li><li>
<a href='/tags/invidious/' style='font-size:1em'>invidious</a>
</li><li>
<a href='/tags/jellyfin/' style='font-size:1em'>jellyfin</a>
</li><li>
<a href='/tags/k3s/' style='font-size:1em'>k3s</a>
</li><li>
<a href='/tags/linux/' style='font-size:1em'>linux</a>
</li><li>
<a href='/tags/lxc/' style='font-size:1em'>lxc</a>
</li><li>
<a href='/tags/netdata/' style='font-size:1em'>netdata</a>
</li><li>
<a href='/tags/nix/' style='font-size:1em'>nix</a>
</li><li>
<a href='/tags/openwrt/' style='font-size:1em'>openwrt</a>
</li><li>
<a href='/tags/pfsense/' style='font-size:1em'>pfsense</a>
</li><li>
<a href='/tags/pihole/' style='font-size:1em'>pihole</a>
</li><li>
<a href='/tags/plex/' style='font-size:1em'>plex</a>
</li><li>
<a href='/tags/podman/' style='font-size:1em'>podman</a>
</li><li>
<a href='/tags/privacy/' style='font-size:1em'>privacy</a>
</li><li>
<a href='/tags/proxmox/' style='font-size:2em'>proxmox</a>
</li><li>
<a href='/tags/python/' style='font-size:2em'>python</a>
</li><li>
<a href='/tags/ransomware/' style='font-size:1em'>ransomware</a>
</li><li>
<a href='/tags/router/' style='font-size:1em'>router</a>
</li><li>
<a href='/tags/router-on-a-stick/' style='font-size:1em'>router-on-a-stick</a>
</li><li>
<a href='/tags/security/' style='font-size:1em'>security</a>
</li><li>
<a href='/tags/synology/' style='font-size:1em'>synology</a>
</li><li>
<a href='/tags/tailscale/' style='font-size:2em'>tailscale</a>
</li><li>
<a href='/tags/virtualization/' style='font-size:1em'>virtualization</a>
</li><li>
<a href='/tags/vlan/' style='font-size:1em'>vlan</a>
</li><li>
<a href='/tags/vpn/' style='font-size:1em'>vpn</a>
</li><li>
<a href='/tags/yewtu.be/' style='font-size:1em'>yewtu.be</a>
</li><li>
<a href='/tags/youtube/' style='font-size:1em'>youtube</a>
</li></ul>
</div>
</section>
<section class='widget widget-social_menu sep-after'><nav aria-label='Social Menu'>
<ul><li>
<a href='https://github.com/davegallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Github account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />
</svg>
</a>
</li><li>
<a href='https://twitter.com/davega11ant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Twitter account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />
</svg>
</a>
</li><li>
<a href='https://fosstodon.org/@davegallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Mastodon account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path fill="#ccc" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127C.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611c.118 1.24.325 2.47.62 3.68c.55 2.237 2.777 4.098 4.96 4.857c2.336.792 4.849.923 7.256.38c.265-.061.527-.132.786-.213c.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041a.053.053 0 0 0-.046-.01a20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433a.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546c.376 0 .75 0 1.125-.01c1.57-.044 3.224-.124 4.768-.422c.038-.008.077-.015.11-.024c2.435-.464 4.753-1.92 4.989-5.604c.008-.145.03-1.52.03-1.67c.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976c-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35c-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164c1.311 0 2.302.5 2.962 1.498l.638 1.06l.638-1.06c.66-.999 1.65-1.498 2.96-1.498c1.13 0 2.043.395 2.74 1.164c.675.77 1.012 1.81 1.012 3.12z"/>
</svg>
</a>
</li><li>
<a href='mailto:dave.gallant@gmail.com' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Contact via Email</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
<polyline points="22,6 12,13 2,6" />
</svg>
</a>
</li><li>
<a href='https://linkedin.com/in/dave-gallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Linkedin account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
<rect x="2" y="9" width="4" height="12" />
<circle cx="4" cy="4" r="2" />
</svg>
</a>
</li></ul>
</nav>
</section></div>
<div class='sidebar-overlay'></div>
</div><div class='main'><nav id='main-menu' class='menu main-menu' aria-label='Main Menu'>
<div class='container'>
<a class='screen-reader-text' href='#content'>Skip to Content</a>
<button id='sidebar-toggler' class='sidebar-toggler' aria-controls='sidebar'>
<span class='screen-reader-text'>Toggle Sidebar</span>
<span class='open'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="3" y1="12" x2="21" y2="12" />
<line x1="3" y1="6" x2="21" y2="6" />
<line x1="3" y1="18" x2="21" y2="18" />
</svg>
</span>
<span class='close'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="18" y1="6" x2="6" y2="18" />
<line x1="6" y1="6" x2="18" y2="18" />
</svg>
</span>
</button>
<ul><li class='item'>
<a href='/'>Home</a>
</li><li class='item'>
<a href='/about/'>About</a>
</li><li class='item'>
<a href='/index.xml'>RSS</a>
</li></ul>
</div>
</nav><div class='header-widgets'>
<div class='container'></div>
</div>
<header id='header' class='header site-header'>
<div class='container sep-after'>
</div>
</header>
<main id='content'>
<article lang='en' class='entry'>
<header class='header entry-header'>
<div class='container sep-after'>
<div class='header-info'>
<h1 class='title'>Backing Up Gmail With Synology</h1>
</div>
<div class='entry-meta'>
<span class='posted-on'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
<line x1="16" y1="2" x2="16" y2="6" />
<line x1="8" y1="2" x2="8" y2="6" />
<line x1="3" y1="10" x2="21" y2="10" />
</svg>
<span class='screen-reader-text'>Posted on </span>
<time class='entry-date' datetime='2022-03-13T18:49:10-04:00'>2022, Mar 13</time>
</span>
<span class='reading-time'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><circle cx="12" cy="12" r="10" />
<polyline points="12 6 12 12 15 15" />
</svg>
3 mins read
</span>
</div>
</div>
<body>
<div class="content"><header>
<div class="main">
<a href="/">davegallant</a>
</div>
<nav>
<a href="/">Home</a>
<a href="/post">All posts</a>
<a href="/about">About</a>
<a href="/tags">Tags</a>
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
<script src="/js/themetoggle.js"></script>
</nav>
</header>
<main>
<article>
<div class="title">
<h1 class="title">Backing Up Gmail With Synology</h1>
<div class="meta">Posted on Mar 13, 2022</div>
</div>
<div class='container entry-content'><p>I&rsquo;ve used gmail since the beta launched touting a whopping 1GB of storage. I thought this was a massive leap in email technology at the time. I was lucky enough to get an invite fairly quickly. Not suprisingly, I have many years of emails, attachments, and photos. I certainly do not want to lose the content of many of these emails. Despite the redundancy of the data that Google secures, I still feel better retaining a copy of this data on my own physical machines.</p>
<section class="body"><p>I&rsquo;ve used gmail since the beta launched touting a whopping 1GB of storage. I thought this was a massive leap in email technology at the time. I was lucky enough to get an invite fairly quickly. Not suprisingly, I have many years of emails, attachments, and photos. I certainly do not want to lose the content of many of these emails. Despite the redundancy of the data that Google secures, I still feel better retaining a copy of this data on my own physical machines.</p>
<p>The thought of completely de-googling has crossed my mind on occassion. Convenience, coupled with my admiration for Google engineering, has prevented me from doing so thus far. Though, I may end up doing so at some point in the future.</p>
<h2 id="synology-mailplus-server">Synology MailPlus Server<a href="#synology-mailplus-server" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>Synology products are reasonably priced for what you get (essentially a cloud-in-a-box) and there is very little maintenance required. I&rsquo;ve recently been in interested in syncing and snapshotting my personal data. I&rsquo;ve setup <a href="https://www.synology.com/en-ca/dsm/feature/cloud_sync">Synology&rsquo;s Cloud Sync</a> and keep copies of most of my cloud data.</p>
@@ -345,65 +118,33 @@ if (!doNotTrack) {
<p>Since Synology devices are not hermetically sealed, it&rsquo;s best to secure them by <a href="https://kb.synology.com/en-us/DSM/tutorial/How_to_add_extra_security_to_your_Synology_NAS#x_anchor_id8">enabling MFA</a> to help prevent being the <a href="https://www.bleepingcomputer.com/news/security/qlocker-ransomware-returns-to-target-qnap-nas-devices-worldwide/">victim of ransomware</a>. It is also wise to backup your system settings and volumes to the cloud using a tool such as <a href="https://www.synology.com/en-ca/dsm/feature/hyper_backup">Hyper Backup</a>.
Encrypting your shared volumes should also be done, since unfortunately <a href="https://community.synology.com/enu/forum/12/post/144665">DSM does not support full disk encryption</a>.</p>
<h2 id="summary">Summary<a href="#summary" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>Having backups of various forms of cloud data is a good investment, especially in <a href="https://en.wikipedia.org/wiki/2022_Ukraine_cyberattacks">times of war</a>. I certainly feel more at ease for having backed up my emails.</p></div>
<p>Having backups of various forms of cloud data is a good investment, especially in <a href="https://en.wikipedia.org/wiki/2022_Ukraine_cyberattacks">times of war</a>. I certainly feel more at ease for having backed up my emails.</p></section>
<footer class='entry-footer'>
<div class='container sep-before'><div class='tags'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M20.59,13.41l-7.17,7.17a2,2,0,0,1-2.83,0L2,12V2H12l8.59,8.59A2,2,0,0,1,20.59,13.41Z" />
<line x1="7" y1="7" x2="7" y2="7" />
</svg>
<span class='screen-reader-text'>Tags: </span><a class='tag' href='/tags/degoogle/'>degoogle</a>, <a class='tag' href='/tags/synology/'>synology</a>, <a class='tag' href='/tags/gmail/'>gmail</a>, <a class='tag' href='/tags/backup/'>backup</a>, <a class='tag' href='/tags/ransomware/'>ransomware</a></div>
<div class="post-tags">
<nav class="nav tags">
<ul class="tags">
<li><a href="/tags/degoogle">degoogle</a></li>
<li><a href="/tags/synology">synology</a></li>
<li><a href="/tags/gmail">gmail</a></li>
<li><a href="/tags/backup">backup</a></li>
<li><a href="/tags/ransomware">ransomware</a></li>
</ul>
</nav>
</div>
</article>
</main>
</div>
</footer>
</article>
<nav class='entry-nav'>
<div class='container'><div class='prev-entry sep-before'>
<a href='/blog/2021/11/14/running-k3s-in-lxc-on-proxmox/'>
<span aria-hidden='true'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="20" y1="12" x2="4" y2="12" />
<polyline points="10 18 4 12 10 6" />
</svg>
Previous</span>
<span class='screen-reader-text'>Previous post: </span>Running K3s in LXC on Proxmox</a>
</div><div class='next-entry sep-before'>
<a href='/blog/2022/04/02/virtualizing-my-router-with-pfsense/'>
<span class='screen-reader-text'>Next post: </span>Virtualizing My Router With pfSense<span aria-hidden='true'>Next <svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="4" y1="12" x2="20" y2="12" />
<polyline points="14 6 20 12 14 18" />
</svg>
</span>
</a>
</div></div>
</nav>
<section id='comments' class='comments'>
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
@@ -414,24 +155,32 @@ Encrypting your shared volumes should also be done, since unfortunately <a href=
</script>
</div>
</div>
</section>
</section><footer>
<div style="display:flex"><a class="soc" href="https://github.com/davegallant" rel="me" title="GitHub"><i data-feather="github"></i></a>
<a class="border"></a><a class="soc" href="https://twitter.com/davega11ant/" rel="me" title="Twitter"><i data-feather="twitter"></i></a>
<a class="border"></a><a class="soc" href="https://fosstodon.org/@davegallant" rel="me" title="Mastodon"><i data-feather="speaker"></i></a>
<a class="border"></a><a class="soc" href="https://www.linkedin.com/in/dave-gallant/" rel="me" title="LinkedIn"><i data-feather="linkedin"></i></a>
<a class="border"></a></div>
<div class="footer-info">
2023 Dave Gallant | Theme based on <a
href="https://github.com/athul/archie">Archie</a> | Built with <a href="https://gohugo.io">Hugo</a>
</div>
</footer>
</main>
<footer id='footer' class='footer'>
<div class='container sep-before'><div class='copyright'>
<p> &copy; 2020-2022 Dave Gallant </p>
</div>
</div>
</footer>
</div>
</div><script>window.__assets_js_src="/assets/js/"</script>
<script src='/assets/js/main.c3bcf2df.js'></script>
</body>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-98710982-2', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script>
feather.replace()
</script></div>
</body>
</html>

View File

@@ -1,332 +1,105 @@
<!DOCTYPE html>
<html lang='en' dir='auto'><head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta name='description' content=''>
<meta name='theme-color' content='#8979b3'>
<html><head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Virtualizing My Router With pfSense - davegallant</title><link rel="icon" type="image/png" href=https://davegallant.ca/favicon.ico /><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="" />
<meta property="og:image" content=""/>
<meta property="og:title" content="Virtualizing My Router With pfSense" />
<meta property="og:description" content="" />
<meta property="og:type" content="article" />
<meta property="og:url" content="/blog/2022/04/02/virtualizing-my-router-with-pfsense/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2022-04-02T18:50:09-04:00" />
<meta property="article:modified_time" content="2022-04-02T18:50:09-04:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Virtualizing My Router With pfSense"/>
<meta name="twitter:description" content=""/>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<meta property='og:title' content='Virtualizing My Router With pfSense • davegallant'>
<meta property='og:description' content=''>
<meta property='og:url' content='/blog/2022/04/02/virtualizing-my-router-with-pfsense/'>
<meta property='og:site_name' content='davegallant'>
<meta property='og:type' content='article'><meta property='article:section' content='post'><meta property='article:tag' content='pfsense'><meta property='article:tag' content='router'><meta property='article:tag' content='openwrt'><meta property='article:tag' content='router-on-a-stick'><meta property='article:tag' content='proxmox'><meta property='article:tag' content='vlan'><meta property='article:published_time' content='2022-04-02T18:50:09-04:00'/><meta property='article:modified_time' content='2022-04-02T18:50:09-04:00'/><meta name='twitter:card' content='summary'>
<meta name="generator" content="Hugo 0.108.0">
<title>Virtualizing My Router With pfSense • davegallant</title>
<link rel='canonical' href='/blog/2022/04/02/virtualizing-my-router-with-pfsense/'>
<link rel='icon' href='/favicon.ico'>
<link rel='stylesheet' href='/assets/css/main.ab98e12b.css'><link rel='stylesheet' href='/css/custom.css'><style>
:root{--color-accent:#8979b3;}
</style>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-98710982-2', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.f7354ef8ed840429a37397307f3d9872782673d6b91d714b3f600b210d91fbaf.css" />
<link id="darkModeStyle" rel="stylesheet" type="text/css" href="/css/dark.726cd11ca6eb7c4f7d48eb420354f814e5c1b94281aaf8fd0511c1319f7f78a4.css" disabled />
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
</script>
<link rel="stylesheet" type="text/css" href="/css/custom.2e59ff60a2d9c7e42e3c1af2aff0ba627da46f910a234867e98d178eb05c87dc.css">
</head>
<body class='page type-post has-sidebar'>
<div class='site'><div id='sidebar' class='sidebar'>
<a class='screen-reader-text' href='#main-menu'>Skip to Main Menu</a>
<div class='container'><section class='widget widget-about sep-after'>
<header>
<div class='logo'>
<a href='/'>
<img src='/images/logo.png'>
</a>
</div>
<h2 class='title site-title '>
<a href='/'>
davegallant
</a>
</h2>
<div class='desc'>
personal blog
</div>
</header>
</section>
<section class='widget widget-taxonomy_cloud sep-after'>
<header>
<h4 class='title widget-title'>Tags</h4>
</header>
<div class='container list-container'>
<ul class='list taxonomy-cloud'><li>
<a href='/tags/adguard/' style='font-size:1em'>adguard</a>
</li><li>
<a href='/tags/aws/' style='font-size:1em'>aws</a>
</li><li>
<a href='/tags/aws-vault/' style='font-size:1em'>aws-vault</a>
</li><li>
<a href='/tags/backup/' style='font-size:1em'>backup</a>
</li><li>
<a href='/tags/containers/' style='font-size:1em'>containers</a>
</li><li>
<a href='/tags/degoogle/' style='font-size:2em'>degoogle</a>
</li><li>
<a href='/tags/docker/' style='font-size:1em'>docker</a>
</li><li>
<a href='/tags/dotfiles/' style='font-size:1em'>dotfiles</a>
</li><li>
<a href='/tags/gmail/' style='font-size:1em'>gmail</a>
</li><li>
<a href='/tags/grafana/' style='font-size:1em'>grafana</a>
</li><li>
<a href='/tags/home-manager/' style='font-size:1em'>home-manager</a>
</li><li>
<a href='/tags/homelab/' style='font-size:1em'>homelab</a>
</li><li>
<a href='/tags/invidious/' style='font-size:1em'>invidious</a>
</li><li>
<a href='/tags/jellyfin/' style='font-size:1em'>jellyfin</a>
</li><li>
<a href='/tags/k3s/' style='font-size:1em'>k3s</a>
</li><li>
<a href='/tags/linux/' style='font-size:1em'>linux</a>
</li><li>
<a href='/tags/lxc/' style='font-size:1em'>lxc</a>
</li><li>
<a href='/tags/netdata/' style='font-size:1em'>netdata</a>
</li><li>
<a href='/tags/nix/' style='font-size:1em'>nix</a>
</li><li>
<a href='/tags/openwrt/' style='font-size:1em'>openwrt</a>
</li><li>
<a href='/tags/pfsense/' style='font-size:1em'>pfsense</a>
</li><li>
<a href='/tags/pihole/' style='font-size:1em'>pihole</a>
</li><li>
<a href='/tags/plex/' style='font-size:1em'>plex</a>
</li><li>
<a href='/tags/podman/' style='font-size:1em'>podman</a>
</li><li>
<a href='/tags/privacy/' style='font-size:1em'>privacy</a>
</li><li>
<a href='/tags/proxmox/' style='font-size:2em'>proxmox</a>
</li><li>
<a href='/tags/python/' style='font-size:2em'>python</a>
</li><li>
<a href='/tags/ransomware/' style='font-size:1em'>ransomware</a>
</li><li>
<a href='/tags/router/' style='font-size:1em'>router</a>
</li><li>
<a href='/tags/router-on-a-stick/' style='font-size:1em'>router-on-a-stick</a>
</li><li>
<a href='/tags/security/' style='font-size:1em'>security</a>
</li><li>
<a href='/tags/synology/' style='font-size:1em'>synology</a>
</li><li>
<a href='/tags/tailscale/' style='font-size:2em'>tailscale</a>
</li><li>
<a href='/tags/virtualization/' style='font-size:1em'>virtualization</a>
</li><li>
<a href='/tags/vlan/' style='font-size:1em'>vlan</a>
</li><li>
<a href='/tags/vpn/' style='font-size:1em'>vpn</a>
</li><li>
<a href='/tags/yewtu.be/' style='font-size:1em'>yewtu.be</a>
</li><li>
<a href='/tags/youtube/' style='font-size:1em'>youtube</a>
</li></ul>
</div>
</section>
<section class='widget widget-social_menu sep-after'><nav aria-label='Social Menu'>
<ul><li>
<a href='https://github.com/davegallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Github account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />
</svg>
</a>
</li><li>
<a href='https://twitter.com/davega11ant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Twitter account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />
</svg>
</a>
</li><li>
<a href='https://fosstodon.org/@davegallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Mastodon account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path fill="#ccc" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127C.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611c.118 1.24.325 2.47.62 3.68c.55 2.237 2.777 4.098 4.96 4.857c2.336.792 4.849.923 7.256.38c.265-.061.527-.132.786-.213c.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041a.053.053 0 0 0-.046-.01a20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433a.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546c.376 0 .75 0 1.125-.01c1.57-.044 3.224-.124 4.768-.422c.038-.008.077-.015.11-.024c2.435-.464 4.753-1.92 4.989-5.604c.008-.145.03-1.52.03-1.67c.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976c-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35c-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164c1.311 0 2.302.5 2.962 1.498l.638 1.06l.638-1.06c.66-.999 1.65-1.498 2.96-1.498c1.13 0 2.043.395 2.74 1.164c.675.77 1.012 1.81 1.012 3.12z"/>
</svg>
</a>
</li><li>
<a href='mailto:dave.gallant@gmail.com' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Contact via Email</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
<polyline points="22,6 12,13 2,6" />
</svg>
</a>
</li><li>
<a href='https://linkedin.com/in/dave-gallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Linkedin account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
<rect x="2" y="9" width="4" height="12" />
<circle cx="4" cy="4" r="2" />
</svg>
</a>
</li></ul>
</nav>
</section></div>
<div class='sidebar-overlay'></div>
</div><div class='main'><nav id='main-menu' class='menu main-menu' aria-label='Main Menu'>
<div class='container'>
<a class='screen-reader-text' href='#content'>Skip to Content</a>
<button id='sidebar-toggler' class='sidebar-toggler' aria-controls='sidebar'>
<span class='screen-reader-text'>Toggle Sidebar</span>
<span class='open'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="3" y1="12" x2="21" y2="12" />
<line x1="3" y1="6" x2="21" y2="6" />
<line x1="3" y1="18" x2="21" y2="18" />
</svg>
</span>
<span class='close'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="18" y1="6" x2="6" y2="18" />
<line x1="6" y1="6" x2="18" y2="18" />
</svg>
</span>
</button>
<ul><li class='item'>
<a href='/'>Home</a>
</li><li class='item'>
<a href='/about/'>About</a>
</li><li class='item'>
<a href='/index.xml'>RSS</a>
</li></ul>
</div>
</nav><div class='header-widgets'>
<div class='container'></div>
</div>
<header id='header' class='header site-header'>
<div class='container sep-after'>
</div>
</header>
<main id='content'>
<article lang='en' class='entry'>
<header class='header entry-header'>
<div class='container sep-after'>
<div class='header-info'>
<h1 class='title'>Virtualizing My Router With pfSense</h1>
</div>
<div class='entry-meta'>
<span class='posted-on'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
<line x1="16" y1="2" x2="16" y2="6" />
<line x1="8" y1="2" x2="8" y2="6" />
<line x1="3" y1="10" x2="21" y2="10" />
</svg>
<span class='screen-reader-text'>Posted on </span>
<time class='entry-date' datetime='2022-04-02T18:50:09-04:00'>2022, Apr 02</time>
</span>
<span class='reading-time'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><circle cx="12" cy="12" r="10" />
<polyline points="12 6 12 12 15 15" />
</svg>
5 mins read
</span>
</div>
</div>
<body>
<div class="content"><header>
<div class="main">
<a href="/">davegallant</a>
</div>
<nav>
<a href="/">Home</a>
<a href="/post">All posts</a>
<a href="/about">About</a>
<a href="/tags">Tags</a>
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
<script src="/js/themetoggle.js"></script>
</nav>
</header>
<main>
<article>
<div class="title">
<h1 class="title">Virtualizing My Router With pfSense</h1>
<div class="meta">Posted on Apr 2, 2022</div>
</div>
<div class='container entry-content'><h2 id="the-problem">The problem<a href="#the-problem" class="hanchor" ariaLabel="Anchor">#</a></h2>
<section class="body"><h2 id="the-problem">The problem<a href="#the-problem" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>My aging router has been running <a href="https://en.wikipedia.org/wiki/OpenWrt">OpenWrt</a> for years and for the most part has been quite reliable. OpenWrt is an open-source project used on embedded devices to route network traffic. It supports many different configurations and there exists a <a href="https://openwrt.org/packages/index/start">large index of packages</a>. Ever since I&rsquo;ve connected some standalone wireless access points, I&rsquo;ve had less of a need for an off-the-shelf all-in-one wireless router combo. I&rsquo;ve also recently been experiencing instability with my router (likely the result of a combination of configuration tweaking and firmware updating). OpenWrt has served me well, but it is time to move on!</p>
<h2 id="pfsense">pfSense<a href="#pfsense" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>I figured this would be a good opportunity to try <a href="https://en.wikipedia.org/wiki/PfSense">pfSense</a>. I&rsquo;ve heard nothing but positive things about pfSense and the fact it&rsquo;s been around since 2004, based on FreeBSD, and written in PHP gave me the impression that it would be relatively stable (and I&rsquo;d expect nothing less because it has an important job to do!). pfSense can be run on many different machines, and there are even some <a href="https://www.netgate.com/appliances">officially supported appliances</a>. Since I already have a machine running Proxmox, why not just run it in a VM? It&rsquo;d allow for automatic snapshotting of the machine. There is a good <a href="https://www.youtube.com/watch?v=hdoBQNI_Ab8">video</a> on this by Techno Tim. Tim has a lot of good videos, and this one is about virtualizing pfSense.</p>
@@ -363,65 +136,35 @@ When setting up the machine, I mostly went with all of the defaults. Configurati
<p><img src="/images/virtualizing-a-router-with-pfsense/pfsense-dashboard.png" alt="pfsense-dashboard"></p>
<p>And this is where the fun begins. There are many tutorials and blogs about how to setup pfSense and various services and packages that can be installed. I&rsquo;ve already installed <a href="https://docs.netgate.com/pfsense/en/latest/packages/pfblocker.html">pfBlocker-NG</a>.</p>
<h2 id="summary">Summary<a href="#summary" class="hanchor" ariaLabel="Anchor">#</a></h2>
<p>It is fairly simple to setup a router with pfSense from within a virtual machine. A physical dedicated routing machine is not necessary and often does not perform as well as software running on faster and more reliable hardware. So far, pfSense has been running for over a week without a single hiccup. pfSense is a mature piece of software that is incredibly powerful and flexible. To avoid some of the instability I had experienced with OpenWrt, I enabled <a href="https://docs.netgate.com/pfsense/en/latest/backup/autoconfigbackup.html">AutoConfigBackup</a>, which is capable of automatically backing up configuration upon every change. I plan to explore and experiment with more services and configuration in the future, so the ability to track all of these changes gives me the peace of mind that experimentation is safe.</p></div>
<p>It is fairly simple to setup a router with pfSense from within a virtual machine. A physical dedicated routing machine is not necessary and often does not perform as well as software running on faster and more reliable hardware. So far, pfSense has been running for over a week without a single hiccup. pfSense is a mature piece of software that is incredibly powerful and flexible. To avoid some of the instability I had experienced with OpenWrt, I enabled <a href="https://docs.netgate.com/pfsense/en/latest/backup/autoconfigbackup.html">AutoConfigBackup</a>, which is capable of automatically backing up configuration upon every change. I plan to explore and experiment with more services and configuration in the future, so the ability to track all of these changes gives me the peace of mind that experimentation is safe.</p></section>
<footer class='entry-footer'>
<div class='container sep-before'><div class='tags'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M20.59,13.41l-7.17,7.17a2,2,0,0,1-2.83,0L2,12V2H12l8.59,8.59A2,2,0,0,1,20.59,13.41Z" />
<line x1="7" y1="7" x2="7" y2="7" />
</svg>
<span class='screen-reader-text'>Tags: </span><a class='tag' href='/tags/pfsense/'>pfsense</a>, <a class='tag' href='/tags/router/'>router</a>, <a class='tag' href='/tags/openwrt/'>openwrt</a>, <a class='tag' href='/tags/router-on-a-stick/'>router-on-a-stick</a>, <a class='tag' href='/tags/proxmox/'>proxmox</a>, <a class='tag' href='/tags/vlan/'>vlan</a></div>
<div class="post-tags">
<nav class="nav tags">
<ul class="tags">
<li><a href="/tags/pfsense">pfsense</a></li>
<li><a href="/tags/router">router</a></li>
<li><a href="/tags/openwrt">openwrt</a></li>
<li><a href="/tags/router-on-a-stick">router-on-a-stick</a></li>
<li><a href="/tags/proxmox">proxmox</a></li>
<li><a href="/tags/vlan">vlan</a></li>
</ul>
</nav>
</div>
</article>
</main>
</div>
</footer>
</article>
<nav class='entry-nav'>
<div class='container'><div class='prev-entry sep-before'>
<a href='/blog/2022/03/13/backing-up-gmail-with-synology/'>
<span aria-hidden='true'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="20" y1="12" x2="4" y2="12" />
<polyline points="10 18 4 12 10 6" />
</svg>
Previous</span>
<span class='screen-reader-text'>Previous post: </span>Backing Up Gmail With Synology</a>
</div><div class='next-entry sep-before'>
<a href='/blog/2022/12/10/watching-youtube-in-private/'>
<span class='screen-reader-text'>Next post: </span>Watching YouTube in Private<span aria-hidden='true'>Next <svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="4" y1="12" x2="20" y2="12" />
<polyline points="14 6 20 12 14 18" />
</svg>
</span>
</a>
</div></div>
</nav>
<section id='comments' class='comments'>
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
@@ -432,24 +175,32 @@ When setting up the machine, I mostly went with all of the defaults. Configurati
</script>
</div>
</div>
</section>
</section><footer>
<div style="display:flex"><a class="soc" href="https://github.com/davegallant" rel="me" title="GitHub"><i data-feather="github"></i></a>
<a class="border"></a><a class="soc" href="https://twitter.com/davega11ant/" rel="me" title="Twitter"><i data-feather="twitter"></i></a>
<a class="border"></a><a class="soc" href="https://fosstodon.org/@davegallant" rel="me" title="Mastodon"><i data-feather="speaker"></i></a>
<a class="border"></a><a class="soc" href="https://www.linkedin.com/in/dave-gallant/" rel="me" title="LinkedIn"><i data-feather="linkedin"></i></a>
<a class="border"></a></div>
<div class="footer-info">
2023 Dave Gallant | Theme based on <a
href="https://github.com/athul/archie">Archie</a> | Built with <a href="https://gohugo.io">Hugo</a>
</div>
</footer>
</main>
<footer id='footer' class='footer'>
<div class='container sep-before'><div class='copyright'>
<p> &copy; 2020-2022 Dave Gallant </p>
</div>
</div>
</footer>
</div>
</div><script>window.__assets_js_src="/assets/js/"</script>
<script src='/assets/js/main.c3bcf2df.js'></script>
</body>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-98710982-2', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script>
feather.replace()
</script></div>
</body>
</html>

View File

@@ -1,26 +1,210 @@
<!DOCTYPE html>
<html lang='en' dir='auto'><head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta name='description' content=''>
<meta name='theme-color' content='#8979b3'>
<html><head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Watching YouTube in Private - davegallant</title><link rel="icon" type="image/png" href=https://davegallant.ca/favicon.ico /><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="" />
<meta property="og:image" content=""/>
<meta property="og:title" content="Watching YouTube in Private" />
<meta property="og:description" content="" />
<meta property="og:type" content="article" />
<meta property="og:url" content="/blog/2022/12/10/watching-youtube-in-private/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2022-12-10T21:46:55-05:00" />
<meta property="article:modified_time" content="2022-12-10T21:46:55-05:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Watching YouTube in Private"/>
<meta name="twitter:description" content=""/>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<meta property='og:title' content='Watching YouTube in Private • davegallant'>
<meta property='og:description' content=''>
<meta property='og:url' content='/blog/2022/12/10/watching-youtube-in-private/'>
<meta property='og:site_name' content='davegallant'>
<meta property='og:type' content='article'><meta property='article:section' content='post'><meta property='article:tag' content='invidious'><meta property='article:tag' content='degoogle'><meta property='article:tag' content='youtube'><meta property='article:tag' content='yewtu.be'><meta property='article:tag' content='tailscale'><meta property='article:tag' content='privacy'><meta property='article:published_time' content='2022-12-10T21:46:55-05:00'/><meta property='article:modified_time' content='2022-12-10T21:46:55-05:00'/><meta name='twitter:card' content='summary'>
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.f7354ef8ed840429a37397307f3d9872782673d6b91d714b3f600b210d91fbaf.css" />
<link id="darkModeStyle" rel="stylesheet" type="text/css" href="/css/dark.726cd11ca6eb7c4f7d48eb420354f814e5c1b94281aaf8fd0511c1319f7f78a4.css" disabled />
<meta name="generator" content="Hugo 0.108.0">
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\[','\]']],
processEscapes: true,
processEnvironments: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
TeX: { equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js"] }
}
});
</script>
<title>Watching YouTube in Private • davegallant</title>
<link rel='canonical' href='/blog/2022/12/10/watching-youtube-in-private/'>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
</script>
<link rel="stylesheet" type="text/css" href="/css/custom.2e59ff60a2d9c7e42e3c1af2aff0ba627da46f910a234867e98d178eb05c87dc.css">
</head>
<body>
<div class="content"><header>
<div class="main">
<a href="/">davegallant</a>
</div>
<nav>
<a href="/">Home</a>
<a href="/post">All posts</a>
<a href="/about">About</a>
<a href="/tags">Tags</a>
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
<script src="/js/themetoggle.js"></script>
</nav>
</header>
<main>
<article>
<div class="title">
<h1 class="title">Watching YouTube in Private</h1>
<div class="meta">Posted on Dec 10, 2022</div>
</div>
<section class="body"><p>I recently stumbled upon <a href="https://yewtu.be">yewtu.be</a> and found it intriguing. It not only allows you to watch YouTube without <em>being on YouTube</em>, but it also allows you to create an account and subscribe to channels without a Google account. What sort of wizardry is going on under the hood? It turns out that it&rsquo;s a hosted instance of <a href="https://invidious.io/">invidious</a>.</p>
<p><img src="/images/watching-youtube-in-private/computerphile.png" alt="requestly"></p>
<p>This layout is simple, and <strong>JavaScript is not required</strong>.</p>
<p>I started using <a href="https://yewtu.be">yewtu.be</a> as my primary client for watching videos. I subscribe to several YouTube channels and I prefer the interface invidiuous provides due to its simplicity. It&rsquo;s also nice to be in control of my search and watch history.</p>
<p>A few days ago, yewtu.be went down briefly, and that motivated me enough to self-host invidious. There are several other hosted instances listed <a href="https://docs.invidious.io/instances/">here</a>, but being able to easily backup my own instance (including subscriptions and watch history) is more compelling in my case.</p>
<h3 id="hosting-invidious">Hosting invidious<a href="#hosting-invidious" class="hanchor" ariaLabel="Anchor">#</a></h3>
<p>The quickest way to get invidious up is with docker-compose as mentioned in the <a href="https://docs.invidious.io/installation/">docs</a>.</p>
<p>I made a few modifications (such as pinning the container&rsquo;s tag), and ended up with:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">version</span>: <span style="color:#e6db74">&#34;3&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">services</span>:
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">invidious</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">quay.io/invidious/invidious:5160d8bae39dc5cc5d51abee90571a03c08d0f2b</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ports</span>:
</span></span><span style="display:flex;"><span> - <span style="color:#e6db74">&#34;0.0.0.0:3000:3000&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">environment</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">INVIDIOUS_CONFIG</span>: |<span style="color:#e6db74">
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> db:
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> dbname: invidious
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> user: kemal
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> password: kemal
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> host: invidious-db
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> port: 5432
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> check_tables: true</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">healthcheck</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">test</span>: <span style="color:#ae81ff">wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">interval</span>: <span style="color:#ae81ff">30s</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">timeout</span>: <span style="color:#ae81ff">5s</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">retries</span>: <span style="color:#ae81ff">2</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">depends_on</span>:
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">invidious-db</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">invidious-db</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">docker.io/library/postgres:14</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumes</span>:
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">postgresdata:/var/lib/postgresql/data</span>
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">./config/sql:/config/sql</span>
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">environment</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">POSTGRES_DB</span>: <span style="color:#ae81ff">invidious</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">POSTGRES_USER</span>: <span style="color:#ae81ff">kemal</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">POSTGRES_PASSWORD</span>: <span style="color:#ae81ff">kemal</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">healthcheck</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">test</span>: [<span style="color:#e6db74">&#34;CMD-SHELL&#34;</span>, <span style="color:#e6db74">&#34;pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB&#34;</span>]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">volumes</span>:
</span></span><span style="display:flex;"><span> <span style="color:#f92672">postgresdata</span>:
</span></span></code></pre></div><p>After invidious was up and running, I installed <a href="https://tailscale.com/">Tailscale</a> on it to leverage its MagicDNS, and I&rsquo;m now able to access this instance from anywhere at <a href="http://invidious:3000/feed/subscriptions">http://invidious:3000/feed/subscriptions</a>.</p>
<h3 id="redirecting-youtube-links">Redirecting YouTube links<a href="#redirecting-youtube-links" class="hanchor" ariaLabel="Anchor">#</a></h3>
<p>I figured it would be nice to redirect existing YouTube links that others send me, so that I could seamlessly watch the videos using invidious.</p>
<p>I went looking for a way to redirect paths at the browser level. I found the lightweight proxy <a href="https://requestly.io/">requestly</a>, which can be used to modify http requests in my browser. I created the following rules:</p>
<p><img src="/images/watching-youtube-in-private/requestly-rules.png" alt="requestly"></p>
<p>Now the link <a href="https://www.youtube.com/watch?v=-lz30by8-sU">https://www.youtube.com/watch?v=-lz30by8-sU</a> will redirect to <a href="http://invidious:3000/watch?v=-lz30by8-sU">http://invidious:3000/watch?v=-lz30by8-sU</a></p>
<p>I&rsquo;m still looking for ways to improve this invidious setup. There doesn&rsquo;t appear to be a way to stream in 4K yet.</p></section>
<div class="post-tags">
<nav class="nav tags">
<ul class="tags">
<li><a href="/tags/invidious">invidious</a></li>
<li><a href="/tags/degoogle">degoogle</a></li>
<li><a href="/tags/youtube">youtube</a></li>
<li><a href="/tags/yewtu.be">yewtu.be</a></li>
<li><a href="/tags/tailscale">tailscale</a></li>
<li><a href="/tags/privacy">privacy</a></li>
</ul>
</nav>
</div>
</article>
</main>
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<link rel='icon' href='/favicon.ico'>
<link rel='stylesheet' href='/assets/css/main.ab98e12b.css'><link rel='stylesheet' href='/css/custom.css'><style>
:root{--color-accent:#8979b3;}
</style>
theme='github-light'
crossorigin='anonymous' async>
</script>
</div>
</div>
</section><footer>
<div style="display:flex"><a class="soc" href="https://github.com/davegallant" rel="me" title="GitHub"><i data-feather="github"></i></a>
<a class="border"></a><a class="soc" href="https://twitter.com/davega11ant/" rel="me" title="Twitter"><i data-feather="twitter"></i></a>
<a class="border"></a><a class="soc" href="https://fosstodon.org/@davegallant" rel="me" title="Mastodon"><i data-feather="speaker"></i></a>
<a class="border"></a><a class="soc" href="https://www.linkedin.com/in/dave-gallant/" rel="me" title="LinkedIn"><i data-feather="linkedin"></i></a>
<a class="border"></a></div>
<div class="footer-info">
2023 Dave Gallant | Theme based on <a
href="https://github.com/athul/archie">Archie</a> | Built with <a href="https://gohugo.io">Hugo</a>
</div>
</footer>
<script type="application/javascript">
var doNotTrack = false;
@@ -33,426 +217,8 @@ if (!doNotTrack) {
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
</head>
<body class='page type-post has-sidebar'>
<div class='site'><div id='sidebar' class='sidebar'>
<a class='screen-reader-text' href='#main-menu'>Skip to Main Menu</a>
<div class='container'><section class='widget widget-about sep-after'>
<header>
<div class='logo'>
<a href='/'>
<img src='/images/logo.png'>
</a>
</div>
<h2 class='title site-title '>
<a href='/'>
davegallant
</a>
</h2>
<div class='desc'>
personal blog
</div>
</header>
</section>
<section class='widget widget-taxonomy_cloud sep-after'>
<header>
<h4 class='title widget-title'>Tags</h4>
</header>
<div class='container list-container'>
<ul class='list taxonomy-cloud'><li>
<a href='/tags/adguard/' style='font-size:1em'>adguard</a>
</li><li>
<a href='/tags/aws/' style='font-size:1em'>aws</a>
</li><li>
<a href='/tags/aws-vault/' style='font-size:1em'>aws-vault</a>
</li><li>
<a href='/tags/backup/' style='font-size:1em'>backup</a>
</li><li>
<a href='/tags/containers/' style='font-size:1em'>containers</a>
</li><li>
<a href='/tags/degoogle/' style='font-size:2em'>degoogle</a>
</li><li>
<a href='/tags/docker/' style='font-size:1em'>docker</a>
</li><li>
<a href='/tags/dotfiles/' style='font-size:1em'>dotfiles</a>
</li><li>
<a href='/tags/gmail/' style='font-size:1em'>gmail</a>
</li><li>
<a href='/tags/grafana/' style='font-size:1em'>grafana</a>
</li><li>
<a href='/tags/home-manager/' style='font-size:1em'>home-manager</a>
</li><li>
<a href='/tags/homelab/' style='font-size:1em'>homelab</a>
</li><li>
<a href='/tags/invidious/' style='font-size:1em'>invidious</a>
</li><li>
<a href='/tags/jellyfin/' style='font-size:1em'>jellyfin</a>
</li><li>
<a href='/tags/k3s/' style='font-size:1em'>k3s</a>
</li><li>
<a href='/tags/linux/' style='font-size:1em'>linux</a>
</li><li>
<a href='/tags/lxc/' style='font-size:1em'>lxc</a>
</li><li>
<a href='/tags/netdata/' style='font-size:1em'>netdata</a>
</li><li>
<a href='/tags/nix/' style='font-size:1em'>nix</a>
</li><li>
<a href='/tags/openwrt/' style='font-size:1em'>openwrt</a>
</li><li>
<a href='/tags/pfsense/' style='font-size:1em'>pfsense</a>
</li><li>
<a href='/tags/pihole/' style='font-size:1em'>pihole</a>
</li><li>
<a href='/tags/plex/' style='font-size:1em'>plex</a>
</li><li>
<a href='/tags/podman/' style='font-size:1em'>podman</a>
</li><li>
<a href='/tags/privacy/' style='font-size:1em'>privacy</a>
</li><li>
<a href='/tags/proxmox/' style='font-size:2em'>proxmox</a>
</li><li>
<a href='/tags/python/' style='font-size:2em'>python</a>
</li><li>
<a href='/tags/ransomware/' style='font-size:1em'>ransomware</a>
</li><li>
<a href='/tags/router/' style='font-size:1em'>router</a>
</li><li>
<a href='/tags/router-on-a-stick/' style='font-size:1em'>router-on-a-stick</a>
</li><li>
<a href='/tags/security/' style='font-size:1em'>security</a>
</li><li>
<a href='/tags/synology/' style='font-size:1em'>synology</a>
</li><li>
<a href='/tags/tailscale/' style='font-size:2em'>tailscale</a>
</li><li>
<a href='/tags/virtualization/' style='font-size:1em'>virtualization</a>
</li><li>
<a href='/tags/vlan/' style='font-size:1em'>vlan</a>
</li><li>
<a href='/tags/vpn/' style='font-size:1em'>vpn</a>
</li><li>
<a href='/tags/yewtu.be/' style='font-size:1em'>yewtu.be</a>
</li><li>
<a href='/tags/youtube/' style='font-size:1em'>youtube</a>
</li></ul>
</div>
</section>
<section class='widget widget-social_menu sep-after'><nav aria-label='Social Menu'>
<ul><li>
<a href='https://github.com/davegallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Github account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />
</svg>
</a>
</li><li>
<a href='https://twitter.com/davega11ant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Twitter account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />
</svg>
</a>
</li><li>
<a href='https://fosstodon.org/@davegallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Mastodon account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path fill="#ccc" d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127C.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611c.118 1.24.325 2.47.62 3.68c.55 2.237 2.777 4.098 4.96 4.857c2.336.792 4.849.923 7.256.38c.265-.061.527-.132.786-.213c.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041a.053.053 0 0 0-.046-.01a20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433a.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546c.376 0 .75 0 1.125-.01c1.57-.044 3.224-.124 4.768-.422c.038-.008.077-.015.11-.024c2.435-.464 4.753-1.92 4.989-5.604c.008-.145.03-1.52.03-1.67c.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976c-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35c-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164c1.311 0 2.302.5 2.962 1.498l.638 1.06l.638-1.06c.66-.999 1.65-1.498 2.96-1.498c1.13 0 2.043.395 2.74 1.164c.675.77 1.012 1.81 1.012 3.12z"/>
</svg>
</a>
</li><li>
<a href='mailto:dave.gallant@gmail.com' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Contact via Email</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
<polyline points="22,6 12,13 2,6" />
</svg>
</a>
</li><li>
<a href='https://linkedin.com/in/dave-gallant' target='_blank' rel='noopener me'>
<span class='screen-reader-text'>Open Linkedin account in new tab</span><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z" />
<rect x="2" y="9" width="4" height="12" />
<circle cx="4" cy="4" r="2" />
</svg>
</a>
</li></ul>
</nav>
</section></div>
<div class='sidebar-overlay'></div>
</div><div class='main'><nav id='main-menu' class='menu main-menu' aria-label='Main Menu'>
<div class='container'>
<a class='screen-reader-text' href='#content'>Skip to Content</a>
<button id='sidebar-toggler' class='sidebar-toggler' aria-controls='sidebar'>
<span class='screen-reader-text'>Toggle Sidebar</span>
<span class='open'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="3" y1="12" x2="21" y2="12" />
<line x1="3" y1="6" x2="21" y2="6" />
<line x1="3" y1="18" x2="21" y2="18" />
</svg>
</span>
<span class='close'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="18" y1="6" x2="6" y2="18" />
<line x1="6" y1="6" x2="18" y2="18" />
</svg>
</span>
</button>
<ul><li class='item'>
<a href='/'>Home</a>
</li><li class='item'>
<a href='/about/'>About</a>
</li><li class='item'>
<a href='/index.xml'>RSS</a>
</li></ul>
</div>
</nav><div class='header-widgets'>
<div class='container'></div>
</div>
<header id='header' class='header site-header'>
<div class='container sep-after'>
</div>
</header>
<main id='content'>
<article lang='en' class='entry'>
<header class='header entry-header'>
<div class='container sep-after'>
<div class='header-info'>
<h1 class='title'>Watching YouTube in Private</h1>
</div>
<div class='entry-meta'>
<span class='posted-on'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
<line x1="16" y1="2" x2="16" y2="6" />
<line x1="8" y1="2" x2="8" y2="6" />
<line x1="3" y1="10" x2="21" y2="10" />
</svg>
<span class='screen-reader-text'>Posted on </span>
<time class='entry-date' datetime='2022-12-10T21:46:55-05:00'>2022, Dec 10</time>
</span>
<span class='reading-time'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><circle cx="12" cy="12" r="10" />
<polyline points="12 6 12 12 15 15" />
</svg>
2 mins read
</span>
</div>
</div>
</header>
<div class='container entry-content'><p>I recently stumbled upon <a href="https://yewtu.be">yewtu.be</a> and found it intriguing. It not only allows you to watch YouTube without <em>being on YouTube</em>, but it also allows you to create an account and subscribe to channels without a Google account. What sort of wizardry is going on under the hood? It turns out that it&rsquo;s a hosted instance of <a href="https://invidious.io/">invidious</a>.</p>
<p><img src="/images/watching-youtube-in-private/computerphile.png" alt="requestly"></p>
<p>Wow, this is cool, and <strong>JavaScript is not required</strong>.</p>
<p>I started using <a href="https://yewtu.be">yewtu.be</a> as my primary client for watching videos. I subscribe to several YouTube channels and I prefer the interface invidiuous provides due to its simplicity. It&rsquo;s also nice to be in control of my search and watch history.</p>
<p>A few days ago, yewtu.be went down briefly, and that motivated me enough to self-host invidious. There are several other hosted instances listed <a href="https://docs.invidious.io/instances/">here</a>, but being able to easily backup my own instance (including subscriptions and watch history) is more compelling in my case.</p>
<h3 id="hosting-invidious">Hosting invidious<a href="#hosting-invidious" class="hanchor" ariaLabel="Anchor">#</a></h3>
<p>The quickest way to get invidious up is with docker-compose as mentioned in the <a href="https://docs.invidious.io/installation/">docs</a>.</p>
<p>I made a few modifications (such as pinning the container&rsquo;s tag), and ended up with:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#309;font-weight:bold">version</span>:<span style="color:#bbb"> </span><span style="color:#c30">&#34;3&#34;</span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"></span><span style="color:#309;font-weight:bold">services</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">invidious</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">image</span>:<span style="color:#bbb"> </span>quay.io/invidious/invidious:5160d8bae39dc5cc5d51abee90571a03c08d0f2b<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">restart</span>:<span style="color:#bbb"> </span>unless-stopped<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">ports</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span>- <span style="color:#c30">&#34;0.0.0.0:3000:3000&#34;</span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">environment</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">INVIDIOUS_CONFIG</span>:<span style="color:#bbb"> </span>|<span style="color:#c30;font-style:italic">
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> db:
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> dbname: invidious
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> user: kemal
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> password: kemal
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> host: invidious-db
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> port: 5432
</span></span></span><span style="display:flex;"><span><span style="color:#c30;font-style:italic"> check_tables: true</span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">healthcheck</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">test</span>:<span style="color:#bbb"> </span>wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">interval</span>:<span style="color:#bbb"> </span>30s<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">timeout</span>:<span style="color:#bbb"> </span>5s<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">retries</span>:<span style="color:#bbb"> </span><span style="color:#f60">2</span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">depends_on</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span>- invidious-db<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">invidious-db</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">image</span>:<span style="color:#bbb"> </span>docker.io/library/postgres:14<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">restart</span>:<span style="color:#bbb"> </span>unless-stopped<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">volumes</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span>- postgresdata:/var/lib/postgresql/data<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span>- ./config/sql:/config/sql<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span>- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">environment</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">POSTGRES_DB</span>:<span style="color:#bbb"> </span>invidious<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">POSTGRES_USER</span>:<span style="color:#bbb"> </span>kemal<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">POSTGRES_PASSWORD</span>:<span style="color:#bbb"> </span>kemal<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">healthcheck</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">test</span>:<span style="color:#bbb"> </span>[<span style="color:#c30">&#34;CMD-SHELL&#34;</span>,<span style="color:#bbb"> </span><span style="color:#c30">&#34;pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB&#34;</span>]<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"></span><span style="color:#309;font-weight:bold">volumes</span>:<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#309;font-weight:bold">postgresdata</span>:<span style="color:#bbb">
</span></span></span></code></pre></div><p>After invidious was up and running, I installed <a href="https://tailscale.com/">Tailscale</a> on it to leverage its MagicDNS, and I&rsquo;m now able to access this instance from anywhere at <a href="http://invidious:3000/feed/subscriptions">http://invidious:3000/feed/subscriptions</a>.</p>
<h3 id="redirecting-youtube-links">Redirecting YouTube links<a href="#redirecting-youtube-links" class="hanchor" ariaLabel="Anchor">#</a></h3>
<p>I figured it would be nice to redirect existing YouTube links that others send me, so that I could seamlessly watch the videos using invidious.</p>
<p>I went looking for a way to redirect paths at the browser level. I found the lightweight proxy <a href="https://requestly.io/">requestly</a>, which can be used to modify http requests in my browser. I created the following rules:</p>
<p><img src="/images/watching-youtube-in-private/requestly-rules.png" alt="requestly"></p>
<p>Now the link <a href="https://www.youtube.com/watch?v=-lz30by8-sU">https://www.youtube.com/watch?v=-lz30by8-sU</a> will redirect to <a href="http://invidious:3000/watch?v=-lz30by8-sU">http://invidious:3000/watch?v=-lz30by8-sU</a></p>
<p>I&rsquo;m still looking for ways to improve this invidious setup. There doesn&rsquo;t appear to be a way to stream in 4K yet.</p></div>
<footer class='entry-footer'>
<div class='container sep-before'><div class='tags'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><path d="M20.59,13.41l-7.17,7.17a2,2,0,0,1-2.83,0L2,12V2H12l8.59,8.59A2,2,0,0,1,20.59,13.41Z" />
<line x1="7" y1="7" x2="7" y2="7" />
</svg>
<span class='screen-reader-text'>Tags: </span><a class='tag' href='/tags/invidious/'>invidious</a>, <a class='tag' href='/tags/degoogle/'>degoogle</a>, <a class='tag' href='/tags/youtube/'>youtube</a>, <a class='tag' href='/tags/yewtu.be/'>yewtu.be</a>, <a class='tag' href='/tags/tailscale/'>tailscale</a>, <a class='tag' href='/tags/privacy/'>privacy</a></div>
</div>
</footer>
</article>
<nav class='entry-nav'>
<div class='container'><div class='prev-entry sep-before'>
<a href='/blog/2022/04/02/virtualizing-my-router-with-pfsense/'>
<span aria-hidden='true'><svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
aria-hidden="true"
><line x1="20" y1="12" x2="4" y2="12" />
<polyline points="10 18 4 12 10 6" />
</svg>
Previous</span>
<span class='screen-reader-text'>Previous post: </span>Virtualizing My Router With pfSense</a>
</div></div>
</nav>
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
theme='github-light'
crossorigin='anonymous' async>
</script>
</div>
</div>
</section>
</main>
<footer id='footer' class='footer'>
<div class='container sep-before'><div class='copyright'>
<p> &copy; 2020-2022 Dave Gallant </p>
</div>
</div>
</footer>
</div>
</div><script>window.__assets_js_src="/assets/js/"</script>
<script src='/assets/js/main.c3bcf2df.js'></script>
</body>
<script>
feather.replace()
</script></div>
</body>
</html>