<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title></title>
      <link>https://lemonsh.moe</link>
      <description></description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://lemonsh.moe/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Mon, 24 Jul 2023 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Installing Alpine Linux on a Hetzner ARM server</title>
          <pubDate>Mon, 24 Jul 2023 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://lemonsh.moe/blog/alpine-hetzner/</link>
          <guid>https://lemonsh.moe/blog/alpine-hetzner/</guid>
          <description xml:base="https://lemonsh.moe/blog/alpine-hetzner/">&lt;p&gt;Recently, I&#x27;ve gotten myself one of those ARM VPSes from &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.hetzner.com&#x2F;cloud&quot;&gt;Hetzner&lt;&#x2F;a&gt;, excited about the &lt;em&gt;very&lt;&#x2F;em&gt; good price-to-performance ratio. I fired the server up, and immediately went on to replace the default Ubuntu install with &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;alpinelinux.org&quot;&gt;Alpine&lt;&#x2F;a&gt;, as it has long ago become the only server distro I use.&lt;&#x2F;p&gt;
&lt;p&gt;I was disappointed to see that Alpine Linux is not on the list of available ISOs, though. That kinda shocked me, as I was accustomed to the &lt;em&gt;&lt;strong&gt;insane&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; amount of ISO choice Hetzner normally provides with their x86 servers.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;i-will-not-tolerate-this&quot;&gt;I will not tolerate this.&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;rescue-mode&quot;&gt;Rescue mode&lt;&#x2F;h3&gt;
&lt;p&gt;Go to the Hetzner Cloud control panel, and reboot the server into rescue mode (&lt;code&gt;Rescue &amp;gt; &quot;Enable rescue &amp;amp; power cycle&quot;&lt;&#x2F;code&gt;). Pick linux64 for the Rescue OS.&lt;&#x2F;p&gt;
&lt;p&gt;Log in to the machine with SSH. In case you have not picked an SSH key, use the root password displayed on the Rescue tab.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;flashing-the-iso&quot;&gt;Flashing the ISO&lt;&#x2F;h3&gt;
&lt;p&gt;Now we need to flash the Alpine Linux ISO onto the virtual hard disk. Go to the &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;alpinelinux.org&#x2F;downloads&quot;&gt;alpinelinux.org download page&lt;&#x2F;a&gt; and grab the link for the lastest &lt;strong&gt;aarch64 virtual&lt;&#x2F;strong&gt; release. Download and flash the ISO on the server:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;curl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;LO&lt;&#x2F;span&gt; https:&#x2F;&#x2F;dl-cdn.alpinelinux.org&#x2F;alpine&#x2F;v3.18&#x2F;releases&#x2F;aarch64&#x2F;alpine-virt-3.18.2-aarch64.iso&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;dd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; if=alpine-virt-3.18.2-aarch64.iso of=&#x2F;dev&#x2F;sda&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;poweroff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h3&gt;
&lt;p&gt;After the server shuts down, turn it back on again using the Hetzner cloud control panel and enter the console (the terminal icon on the top right). Once the server boots, log in as &lt;code&gt;root&lt;&#x2F;code&gt;, there&#x27;s no password.&lt;&#x2F;p&gt;
&lt;p&gt;Before we can proceed with the installation, we need to make a few preparations:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; copy data from the mounted media to &#x2F;root&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;cp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; &#x2F;.modloop &#x2F;root&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;cp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; &#x2F;media&#x2F;sda &#x2F;root&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; unmount the media&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;umount&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;.modloop &#x2F;media&#x2F;sda&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; move the data to directories that were the mountpoints&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;lib&#x2F;modules&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;root&#x2F;.modloop&#x2F;modules &#x2F;lib&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;root&#x2F;sda &#x2F;media&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now you can install Alpine Linux using &lt;code&gt;setup-alpine&lt;&#x2F;code&gt; as you&#x27;d do normally and then reboot.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>The day I became the Mumble server</title>
          <pubDate>Sat, 22 Apr 2023 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://lemonsh.moe/blog/mumblemon/</link>
          <guid>https://lemonsh.moe/blog/mumblemon/</guid>
          <description xml:base="https://lemonsh.moe/blog/mumblemon/">&lt;h1 id=&quot;the-powerbank&quot;&gt;The Powerbank&lt;&#x2F;h1&gt;
&lt;p&gt;I know this might sound completely unrelated to the post title, but bear with me...&lt;&#x2F;p&gt;
&lt;p&gt;I was looking for a powerbank recently, because I got tired of constantly keeping track of my phone&#x27;s battery charge level every time I leave the house.
Initially, I wanted to get one of those &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;allegro.pl&#x2F;oferta&#x2F;obudowa-powerbank-na-8-ogniw-18650-usb-c-skrecana-13064464029&quot;&gt;18650 Li-Ion cell cases&lt;&#x2F;a&gt;, but the &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.x-kom.pl&#x2F;p&#x2F;575269-powerbank-green-cell-powerplay20-20000mah-usb-c-pd-18w-qc-30.html&quot;&gt;GC PowerPlay20&lt;&#x2F;a&gt; caught my attention.
It&#x27;s reasonably priced for the capacity it offers, and supports &lt;strong&gt;fast charging&lt;&#x2F;strong&gt;, so I decided to get it.&lt;&#x2F;p&gt;
&lt;p&gt;After ordering the device and reading a bit through the specs in more detail, I thought to myself...&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-is-fast-charging-anyway&quot;&gt;...what is fast charging anyway?&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;ve never really dug into how the fast charging technology works before buying the powerbank, but once I had the device in my hands, I got curious and did some research.&lt;&#x2F;p&gt;
&lt;p&gt;I quickly learned that there are thousands of fast charging solutions (most of which are proprietary), but one particular solution stands out - USB-C Power Delivery. It&#x27;s an &lt;strong&gt;open standard&lt;&#x2F;strong&gt; for fast charging. I will refer to it as PD in the rest of the post.&lt;&#x2F;p&gt;
&lt;p&gt;I figured, there &lt;em&gt;must&lt;&#x2F;em&gt; be a board of some sort that would deal with the PD protocol for me and give me the raw 12V output. Turns out, that&#x27;s correct! Moreover, I could easily &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;kamami.pl&#x2F;wyzwalacze-usb-pd&#x2F;584721-wyzwalacz-pd-usb-typu-c-12v-5a-bez-zlacza.html&quot;&gt;get such a board locally&lt;&#x2F;a&gt;. The same store also sells &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;kamami.pl&#x2F;przewody-zasilajace&#x2F;1181212-przewod-zasilajacy-z-wyzwalaczem-pd-12v-usb-typu-c-dc-55x25mm-12m.html&quot;&gt;cables with it&lt;&#x2F;a&gt;, so I&#x27;ve immediately ordered one.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-crazy-idea&quot;&gt;The crazy idea&lt;&#x2F;h1&gt;
&lt;p&gt;I&#x27;ve always been fascinated with the idea of a mobile Linux server that I could take anywhere and let other people use.&lt;&#x2F;p&gt;
&lt;p&gt;One good option for building one is obviously the Raspberry Pi, but due to the low specs of its internal WiFi, I didn&#x27;t even bother trying to set it up. But what if I used an actual WiFi router?&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately, my WiFi router turned out not to be powerful enough to set up services on it, so instead, I used a classic RPi Zero (without wifi) plugged in to the actual router.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt; I know that I could possibly get even better results with a good quality USB WiFi card and an external antenna, but carrying an actual home router and powering it from a powerbank is just cooler :3&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;choosing-a-distro&quot;&gt;Choosing a distro&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;ve initially wanted to go with the official Raspberry Pi OS, but the flashbacks from spending hours debloating the thing, made me conclude that flashing such a bloated operating system on such a breathtakingly underpowered device is a crime. Thus, I&#x27;ve decided to go with &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;dietpi.com&#x2F;&quot;&gt;DietPi&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Oh, I should also mention that due to the &lt;strong&gt;blazing&lt;&#x2F;strong&gt; performance of the SD card, the kernel update that DietPi does at startup took almost 2 hours! Still marginally better than the Raspberry Pi OS, though.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rpi-zero-s-network-connectivity&quot;&gt;RPi Zero&#x27;s network connectivity&lt;&#x2F;h2&gt;
&lt;p&gt;The particular RPi Zero I&#x27;m going to use in this project doesn&#x27;t actually come with a wireless module, so it has literally zero onboard network capability. Fortunately, it turns out that the Pi Zero supports a so-called &quot;Gadget mode&quot;, which basically turns the Pi from a USB host into a USB device.&lt;&#x2F;p&gt;
&lt;p&gt;The most common way of using the Gadget mode is running a &quot;virtual Ethernet cable&quot; over the USB connection. This means, the Pi can get both the power and network connectivity from the router with a single USB cable!&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately, OpenWRT doesn&#x27;t come with the required RNDIS kernel module out of the box (the same module that&#x27;s used for Android tethering, by the way). Thankfully, this problem can easily be solved by installing the &lt;code&gt;kmod-usb-net-rndis&lt;&#x2F;code&gt; package using &lt;code&gt;opkg&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;After &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;learn.adafruit.com&#x2F;turning-your-raspberry-pi-zero-into-a-usb-gadget&#x2F;ethernet-gadget&quot;&gt;setting the ethernet gadget up&lt;&#x2F;a&gt;, the Pi shows up in the Interfaces section of the OpenWRT web interface as &lt;code&gt;usb0&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;figure&gt;
    &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;imgs.lemonsh.moe&amp;#x2F;20230405&amp;#x2F;usb0.png&quot; alt=&quot;`usb0` inteface on my OpenWRT router&quot;&gt;
    &lt;figcaption&gt;&lt;code&gt;usb0&lt;&#x2F;code&gt; inteface on my OpenWRT router&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
&lt;p&gt;Upon adding the &lt;code&gt;usb0&lt;&#x2F;code&gt; interface to the LAN bridge, the Pi gets access to the internet and I can ssh into it from my computer.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;okay-what-now&quot;&gt;Okay, what now?&lt;&#x2F;h2&gt;
&lt;p&gt;Now that the pain of getting the network part done is over, it&#x27;s time to actually set something up on the Pi. I figured it would be cool to run a &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.mumble.info&#x2F;&quot;&gt;Mumble&lt;&#x2F;a&gt; server there!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;mumble&quot;&gt;Mumble&lt;&#x2F;h2&gt;
&lt;p&gt;Due to the constrained resources of the Pi Zero, I used &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;umurmur.net&#x2F;&quot;&gt;uMurmur&lt;&#x2F;a&gt; instead of the official Mumble server. Life, of course, would be too simple if it was available in the repos, so I had to compile myself.&lt;&#x2F;p&gt;
&lt;p&gt;Not wanting to wait hours for the Pi to install GCC and compile the software, I quickly downloaded the Raspberry Pi OS rootfs and chrooted into it on my PC. I also had to use &lt;code&gt;qemu-user-static&lt;&#x2F;code&gt;, as the chroot obviously uses the 32-bit ARM architecture. I built the &lt;code&gt;umurmurd&lt;&#x2F;code&gt; binary and transferred it over to the Pi.&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve written a simple systemd unit file for it and set it to start at boot. Miraculously, it worked without any manual intervention on every router power on.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;worth&quot;&gt;Worth?&lt;&#x2F;h2&gt;
&lt;p&gt;Yes and no.&lt;&#x2F;p&gt;
&lt;p&gt;I tested the solution with my friend from the Attic Project (I&#x27;ll probably write a blog post about that in the future), and the results were not much worse than what I expected.&lt;&#x2F;p&gt;
&lt;p&gt;On a distance of roughly 50m with no obstacles, we maintained a RSSI of around -65, which is a great value, and allows me to think that the solution would work fine on even longer distances. Unfortunately - although as expected - after I moved behind a concrete building, we lost connection completely.&lt;&#x2F;p&gt;
&lt;p&gt;At the end of the day, I learned a &lt;em&gt;&lt;strong&gt;lot&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; about configuring OpenWRT thanks to this project, and I think that&#x27;s more important than the actual usefulness of the solution.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>3 fun ways to (ab)use your school OneDrive storage</title>
          <pubDate>Mon, 29 Aug 2022 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://lemonsh.moe/blog/onedrive-abuse/</link>
          <guid>https://lemonsh.moe/blog/onedrive-abuse/</guid>
          <description xml:base="https://lemonsh.moe/blog/onedrive-abuse/">&lt;p&gt;If you&#x27;re a student (or a teacher) and your school&#x2F;university has an Office 365 plan (e.g. for Microsoft Teams), you probably have an Education Office 365 account, which comes with a whopping 1 TB (!) of OneDrive storage and you&#x27;re probably not even using 1% of that capacity. Kinda wasteful in my opinion.&lt;&#x2F;p&gt;
&lt;p&gt;But before I list a few fun examples of how you can make use of your school OneDrive, I need to address a few - hopefully obvious - things:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Everything I talk about here should technically be possible with a Google Suite account (or whatever it&#x27;s called), although I have no experience with that, so YMMV.&lt;&#x2F;li&gt;
&lt;li&gt;The administrators of your school Office 365 suite do &lt;strong&gt;not&lt;&#x2F;strong&gt; have access to your files, but you should also know that they have the power to &lt;strong&gt;reset your password&lt;&#x2F;strong&gt; and gain access that way.&lt;&#x2F;li&gt;
&lt;li&gt;Your account is &lt;strong&gt;not&lt;&#x2F;strong&gt; permanent - it will eventually be removed (e.g. when you finish school) and you need to be prepared for that.&lt;&#x2F;li&gt;
&lt;li&gt;The examples I&#x27;ll be showing are not always the &lt;em&gt;best&lt;&#x2F;em&gt; solutions to a given problem, but they are definetely fun ones!&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;With that out of the way, let&#x27;s begin!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;rclone&quot;&gt;rclone&lt;&#x2F;h1&gt;
&lt;p&gt;The examples I&#x27;ll be covering involve the usage of &lt;code&gt;rclone&lt;&#x2F;code&gt; - a commandline application that allows you to easily access remote storages of various kinds.&lt;&#x2F;p&gt;
&lt;p&gt;On Linux it should be available in your distro&#x27;s package manager and on macOS, Homebrew has it. If you use Windows, &lt;del&gt;&lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;installation_guide&quot;&gt;follow this guide&lt;&#x2F;a&gt;&lt;&#x2F;del&gt; you can install rclone with &lt;code&gt;scoop&lt;&#x2F;code&gt;, but the commands may be a bit different.&lt;&#x2F;p&gt;
&lt;p&gt;After installation, run &lt;code&gt;rclone config&lt;&#x2F;code&gt; and add your OneDrive storage using the &lt;code&gt;onedrive&lt;&#x2F;code&gt; remote type - rclone should guide you through that. The rest of this post will assume that the name of the remote is &lt;code&gt;sch&lt;&#x2F;code&gt;, so always replace &lt;code&gt;sch&lt;&#x2F;code&gt; with &lt;em&gt;your&lt;&#x2F;em&gt; remote name if it&#x27;s different.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;1-storing-tv-shows-movies-music-etc&quot;&gt;#1: Storing TV Shows, Movies, Music, etc.&lt;&#x2F;h1&gt;
&lt;p&gt;The &lt;em&gt;&quot;default&quot;&lt;&#x2F;em&gt; way of storing media on OneDrive is inconvenient - gently speaking - so we&#x27;re gonna use rclone to make it easier and faster. Here&#x27;s a short quickstart:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-a-directory-for-the-media&quot;&gt;Create a directory for the media&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mkdir &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;sch:anime&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;upload-media&quot;&gt;Upload media&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copy&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;P&lt;&#x2F;span&gt; rezero &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;sch:anime&#x2F;rezero&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt; When you tell rclone to copy a directory, it copies the &lt;strong&gt;contents&lt;&#x2F;strong&gt; of it, not the directory itself, so it&#x27;s important to always specify the full destination path, as we did here.&lt;&#x2F;p&gt;
&lt;p&gt;By the way, the &lt;code&gt;-P&lt;&#x2F;code&gt; flag adds a nice progress display. If you omit it, rclone will work silently.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;download-media&quot;&gt;Download media&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copy&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;P&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;sch:anime&#x2F;rezero&#x2F;ep1.mkv&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; .&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;get-a-link-to-a-file-without-downloading&quot;&gt;Get a link to a file (without downloading)&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; link &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;sch:anime&#x2F;rezero&#x2F;ep1.mkv&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;&#x2F;strong&gt; The generated link likely has your &lt;strong&gt;school name&lt;&#x2F;strong&gt; in it, so don&#x27;t share it with people you don&#x27;t trust!&lt;&#x2F;p&gt;
&lt;p&gt;We can use this command with &lt;code&gt;mpv&lt;&#x2F;code&gt; in order to stream a video or audio file directly without downloading it:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mpv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-meta z-group z-expansion z-command z-parens z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; link &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;sch:anime&#x2F;rezero&#x2F;ep1.mkv&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can find more rclone commands by doing &lt;code&gt;rclone --help&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;2-image-hosting&quot;&gt;#2: Image hosting&lt;&#x2F;h1&gt;
&lt;p&gt;Let&#x27;s say you want to make a website or you just want to have your own hosting of images without exposing the end user to 3rd-party services. Why not make a proxy to your school OneDrive with a cheap VPS or a Raspberry Pi?&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Note: This method requires small Linux server administration knowledge&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In this example I will be using Alpine Linux, but the commands should be easily adaptable to your distribution of choice.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;setup-rclone-on-the-remote-machine&quot;&gt;Setup rclone on the remote machine&lt;&#x2F;h3&gt;
&lt;p&gt;Just follow the &lt;a href=&quot;https:&#x2F;&#x2F;lemonsh.moe&#x2F;blog&#x2F;onedrive-abuse&#x2F;#rclone&quot;&gt;rclone&lt;&#x2F;a&gt; section of this post but on your server, &lt;strong&gt;as root&#x2F;sudo&lt;&#x2F;strong&gt; (we&#x27;re going to mount the remote and that requires root permissions, so the generated rclone config file should be in the root user&#x27;s home directory)&lt;&#x2F;p&gt;
&lt;p&gt;You&#x27;ll also want to create a folder for the images:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; rclone mkdir sch:imgs&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;mount-the-remote&quot;&gt;Mount the remote&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mkdir &#x2F;onedrive&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; rclone mount sch:imgs &#x2F;onedrive&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;allow-other&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;v&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You should be able to access &lt;code&gt;&#x2F;onedrive&lt;&#x2F;code&gt; as root now. If everything is working properly, you can make the rclone mount persistent using your init system. For example, this is what I made for Alpine (OpenRC):&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;!&#x2F;sbin&#x2F;openrc-run&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;onedrive&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-shell&quot;&gt;depend&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-section z-braces z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;need&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; net&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;before&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; nginx&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;use&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; logger&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-braces z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-shell&quot;&gt;start&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-section z-braces z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;checkpath&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;f&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;m&lt;&#x2F;span&gt; 0644&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; root:root &#x2F;var&#x2F;log&#x2F;onedrive.log&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mount sch:imgs &#x2F;onedrive&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;daemon&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;allow-other&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;v&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;log-file&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-option z-shell&quot;&gt;=&lt;&#x2F;span&gt;&#x2F;var&#x2F;log&#x2F;onedrive.log&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-braces z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-shell&quot;&gt;stop&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-section z-braces z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;    &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;fusermount&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;uz&lt;&#x2F;span&gt; &#x2F;onedrive&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-braces z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; vim:ft=sh&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;configuring-the-webserver&quot;&gt;Configuring the webserver&lt;&#x2F;h3&gt;
&lt;p&gt;Setup your webserver to serve static files from &#x2F;onedrive. You probably want to enable SSL too.&lt;&#x2F;p&gt;
&lt;p&gt;Assuming you&#x27;re using Nginx, you can add a server block similar to this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;conf&quot; class=&quot;language-conf z-code&quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-storage z-type z-genconfig&quot;&gt;server &lt;&#x2F;span&gt;{
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-meta z-param z-genconfig&quot;&gt;    &lt;span class=&quot;z-variable z-parameter z-genconfig&quot;&gt;listen&lt;&#x2F;span&gt; &lt;&#x2F;span&gt;[&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;:&lt;&#x2F;span&gt;]&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric z-genconfig&quot;&gt;443&lt;&#x2F;span&gt; ssl http2;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-meta z-param z-genconfig&quot;&gt;    &lt;span class=&quot;z-variable z-parameter z-genconfig&quot;&gt;merge_slashes&lt;&#x2F;span&gt; &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language z-genconfig&quot;&gt;off&lt;&#x2F;span&gt;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-meta z-param z-genconfig&quot;&gt;    &lt;span class=&quot;z-variable z-parameter z-genconfig&quot;&gt;server_name&lt;&#x2F;span&gt; &lt;&#x2F;span&gt;imgs&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;lemonsh&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;moe;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-meta z-param z-genconfig&quot;&gt;    &lt;span class=&quot;z-variable z-parameter z-genconfig&quot;&gt;ssl_certificate&lt;&#x2F;span&gt; &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;etc&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;acme&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;imgs&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;lemonsh&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;moe&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;crt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-meta z-param z-genconfig&quot;&gt;    &lt;span class=&quot;z-variable z-parameter z-genconfig&quot;&gt;ssl_certificate_key&lt;&#x2F;span&gt; &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;etc&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;acme&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;imgs&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;lemonsh&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;moe&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;.&lt;&#x2F;span&gt;key;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;&lt;span class=&quot;z-meta z-param z-genconfig&quot;&gt;    &lt;span class=&quot;z-variable z-parameter z-genconfig&quot;&gt;root&lt;&#x2F;span&gt; &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-genconfig&quot;&gt;&#x2F;&lt;&#x2F;span&gt;onedrive;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-genconfig&quot;&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Of course, you need to adapt this config according to your needs.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;testing-the-proxy&quot;&gt;Testing the proxy&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;imgs&lt;&#x2F;code&gt; directory on your OneDrive should now be mapped to your domain&#x27;s root. For example, in my case, &lt;code&gt;sch:imgs&#x2F;image.png&lt;&#x2F;code&gt; is mapped to &lt;code&gt;https:&#x2F;&#x2F;imgs.lemonsh.moe&#x2F;image.png&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;naq-never-asked-questions&quot;&gt;NAQ (never asked questions)&lt;&#x2F;h3&gt;
&lt;p&gt;Now you might ask, why can&#x27;t we just use &lt;code&gt;rclone link&lt;&#x2F;code&gt; for the images, just like we did with your media before? Well, there are a few reasons:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;When your current OneDrive account is deleted, all links generated with &lt;code&gt;rclone link&lt;&#x2F;code&gt; will become invalid. With a proxy like this, you can migrate the images somewhere else.&lt;&#x2F;li&gt;
&lt;li&gt;As I&#x27;ve said before, links generated with &lt;code&gt;rclone link&lt;&#x2F;code&gt; are likely to contain your school name, which is not desired if you want to embed them on a website, for example.&lt;&#x2F;li&gt;
&lt;li&gt;You would need to run &lt;code&gt;rclone link&lt;&#x2F;code&gt; manually every time you wanted to publish an image, this proxy maps the entire directory instead, so there&#x27;s no manual intervention required.&lt;&#x2F;li&gt;
&lt;li&gt;OneDrive generally isn&#x27;t the fastest file host, so if you run into performance issues with the proxy, you can attempt to fix it - for example, put it behind Cloudflare or &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rclone.org&#x2F;commands&#x2F;rclone_mount&#x2F;#vfs-file-caching&quot;&gt;enable the VFS cache in rclone&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Another question you might have is, why images specifically? Why not music &#x2F; videos &#x2F; etc.?&lt;&#x2F;p&gt;
&lt;p&gt;Well, you can technically host any kind of content with this proxy, but I just felt like image hosting is a good demo usecase. Larger files are going to be problematic because for every request, your server needs to use &lt;code&gt;2 * filesize&lt;&#x2F;code&gt; of bandwidth (download from OneDrive and then upload to the user) and caching may be unfeasible.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;3-storing-personal-data-securely&quot;&gt;#3: Storing personal data securely&lt;&#x2F;h1&gt;
&lt;p&gt;It&#x27;s well-known that storing sensitive information in the cloud is a very bad idea, especially with non-private services like OneDrive or Google Drive, because these companies can access your data whenever they want - or when the government wants.&lt;&#x2F;p&gt;
&lt;p&gt;But, we can use the &lt;code&gt;crypt&lt;&#x2F;code&gt; remote type to mitigate this:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Rclone &lt;code&gt;crypt&lt;&#x2F;code&gt; remotes encrypt and decrypt other remotes.
A remote of type &lt;code&gt;crypt&lt;&#x2F;code&gt; does not access a storage system directly, but instead wraps another remote, which in turn accesses the storage system.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Considering that we&#x27;re working with sensitive data here, if you have trouble understanding something here, please &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rclone.org&#x2F;crypt&#x2F;&quot;&gt;RTFM&lt;&#x2F;a&gt;. With that in mind, let&#x27;s begin:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-an-empty-folder-for-the-encrypted-files&quot;&gt;Create an empty folder for the encrypted files&lt;&#x2F;h3&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mkdir sch:enc&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-a-crypt-wrapper&quot;&gt;Create a &lt;code&gt;crypt&lt;&#x2F;code&gt; wrapper&lt;&#x2F;h3&gt;
&lt;p&gt;Run &lt;code&gt;rclone config&lt;&#x2F;code&gt; and create a new remote of type &lt;code&gt;crypt&lt;&#x2F;code&gt; (instead of &lt;code&gt;onedrive&lt;&#x2F;code&gt; like we did before). I&#x27;ll call it &lt;code&gt;esch&lt;&#x2F;code&gt;, but you can pick any other name. There are a few things you should know:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;remote&lt;&#x2F;code&gt; should be the empty folder you created in the previous step, e.g. &lt;code&gt;sch:enc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;The most secure variant for &lt;code&gt;filename_encryption&lt;&#x2F;code&gt; is &lt;code&gt;standard&lt;&#x2F;code&gt;, but it has &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rclone.org&#x2F;crypt&#x2F;#name-encryption&quot;&gt;a few implications&lt;&#x2F;a&gt;, so you might wanna choose &lt;code&gt;obfuscate&lt;&#x2F;code&gt; instead if you think they might be a problem for you.&lt;&#x2F;li&gt;
&lt;li&gt;You should always generate a random password for security. 128 bits should be a secure enough option.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;upload-something&quot;&gt;Upload something!&lt;&#x2F;h3&gt;
&lt;p&gt;You should be able to use the &lt;code&gt;esch&lt;&#x2F;code&gt; remote just like any other rclone remote now. The only difference is that its root is mapped to the directory you specified before (e.g. &lt;code&gt;sch:enc&lt;&#x2F;code&gt;) and everything going through it is encrypted. So, let&#x27;s try uploading something now:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copy&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;P&lt;&#x2F;span&gt; Pictures&#x2F;miku-smol.png esch:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Let&#x27;s check if the file was actually uploaded:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; rclone lsf esch:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;miku-smol.png&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It was! But how does it look from OneDrive&#x27;s perspective?
&lt;figure&gt;
    &lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;imgs.lemonsh.moe&amp;#x2F;20220828&amp;#x2F;onedrive.png&quot; alt=&quot;`enc` folder on my OneDrive&quot;&gt;
    &lt;figcaption&gt;&lt;code&gt;enc&lt;&#x2F;code&gt; folder on my OneDrive&lt;&#x2F;figcaption&gt;
&lt;&#x2F;figure&gt;
As you can see, the file has been encrypted along with its filename.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;important-reminder&quot;&gt;Important reminder&lt;&#x2F;h3&gt;
&lt;p&gt;Obviously, this doesn&#x27;t prevent you from uploading sensitive files through the unencrypted &lt;code&gt;sch&lt;&#x2F;code&gt; remote or even the OneDrive web interface, so remember to always handle sensitive data through &lt;code&gt;esch&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;config-encryption-and-backup&quot;&gt;Config encryption and backup&lt;&#x2F;h1&gt;
&lt;p&gt;Your rclone config contains passwords to all of the cloud remotes, so it&#x27;s wise to protect it somehow. You can do that in &lt;code&gt;rclone config&lt;&#x2F;code&gt; by choosing the &lt;code&gt;s) Set configuration password&lt;&#x2F;code&gt; option. Upon doing that, you will be asked for a password on every rclone operation. You can always remove the password if you want (e.g. to make manual changes to the config).&lt;&#x2F;p&gt;
&lt;p&gt;In order to backup or migrate all your rclone remotes (including &lt;code&gt;crypt&lt;&#x2F;code&gt; if you set that up), you can just copy the entire config file to - for example - a password manager or a different machine. This will work even when you set a password on the file.&lt;&#x2F;p&gt;
&lt;p&gt;The path to the config is &lt;code&gt;~&#x2F;.config&#x2F;rclone&#x2F;rclone.conf&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-end&quot;&gt;The end.&lt;&#x2F;h1&gt;
</description>
      </item>
      <item>
          <title>[PL] Własny Amazon S3 na Mikrusie?</title>
          <pubDate>Sat, 08 Jan 2022 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://lemonsh.moe/blog/minio/</link>
          <guid>https://lemonsh.moe/blog/minio/</guid>
          <description xml:base="https://lemonsh.moe/blog/minio/">&lt;p&gt;&lt;em&gt;This article is written in Polish, for the &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;mikr.us&quot;&gt;Mikrus&lt;&#x2F;a&gt; project.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;czym-jest-minio&quot;&gt;Czym jest MinIO?&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;MinIO&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; to napisany w Go otwartoźródłowy serwer &lt;em&gt;object storage&lt;&#x2F;em&gt; kompatybilny z &lt;strong&gt;Amazon S3&lt;&#x2F;strong&gt;. Posiada bardzo duże możliwości konfiguracji, a jego instalacja jest dość prosta.&lt;&#x2F;p&gt;
&lt;p&gt;W tym poście, chciałbym opisać jego instalację na &lt;a rel=&quot;noopener noreferrer&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;mikr.us&quot;&gt;Mikrusie&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;</description>
      </item>
    </channel>
</rss>
