<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Henrik</title>
    <description>The latest articles on DEV Community by Henrik (@henrikch).</description>
    <link>https://dev.to/henrikch</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F336040%2F0e95565d-d68e-4790-814e-17047af7d8ed.jpeg</url>
      <title>DEV Community: Henrik</title>
      <link>https://dev.to/henrikch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/henrikch"/>
    <language>en</language>
    <item>
      <title>weechat for matrix.org on a Digitalocean droplet with tmux</title>
      <dc:creator>Henrik</dc:creator>
      <pubDate>Tue, 29 Jun 2021 07:41:06 +0000</pubDate>
      <link>https://dev.to/henrikch/weechat-for-matrix-org-on-a-digitalocean-droplet-with-tmux-2mj8</link>
      <guid>https://dev.to/henrikch/weechat-for-matrix-org-on-a-digitalocean-droplet-with-tmux-2mj8</guid>
      <description>&lt;p&gt;Picture from &lt;a href="https://www.flickr.com/photos/14141796@N05/3556068078"&gt;flickr m.maddo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A quick writeup of what I learned installing weechat on a digital ocean droplet - and keeping it running with tmux.&lt;/p&gt;

&lt;p&gt;Written on June 29th 2021&lt;/p&gt;

&lt;h2&gt;
  
  
  Get a Digital Ocean droplet
&lt;/h2&gt;

&lt;p&gt;Set up the &lt;a href="https://www.digitalocean.com"&gt;Digital Ocean&lt;/a&gt; account and a means of payment - the budget for this project is USD 5-7 per month (to keep the droplet running).&lt;/p&gt;

&lt;p&gt;Under distributions choose the Ubuntu image - as of writing 20.04 x64&lt;br&gt;
Choose a plan - basic&lt;br&gt;
Choose a cpu option - regular intel&lt;br&gt;
Choose a size - smallest - 1GB and 1 CPU.&lt;/p&gt;

&lt;h3&gt;
  
  
  Secure the machine - Create a login user to the droplet
&lt;/h3&gt;

&lt;p&gt;To secure the machine and avoid logging in with root I followed this tutorial:&lt;br&gt;
&lt;a href="https://www.andrewhoog.com/post/first-steps-to-securing-ubuntu-server-18.04-on-digital-ocean/"&gt;First steps to secure ubuntu server&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I didn't enable a firewall - and therefore no need to allow the ssh.&lt;br&gt;
I might want to come back to this later.&lt;/p&gt;

&lt;p&gt;The security for this droplet in my setup is mainly coming from using an ssh key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Weechat
&lt;/h2&gt;

&lt;p&gt;To install I followed the instructions on the &lt;a href="https://weechat.org/download/debian/"&gt;weechat website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was using apt command instead of apt-get. You can find a detailed description of the difference &lt;a href="https://itsfoss.com/apt-vs-apt-get-difference/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  connect to libera chat
&lt;/h3&gt;

&lt;p&gt;This is well documented in the &lt;a href="https://weechat.org/files/doc/stable/weechat_quickstart.en.html"&gt;weechat quickstart&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  connect to matrix.org
&lt;/h3&gt;

&lt;p&gt;I followed this description - &lt;a href="https://github.com/poljar/weechat-matrix"&gt;weechat matrix github&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I installed libolm-dev like this: &lt;br&gt;
   &lt;code&gt;sudo apt install libolm-dev&lt;/code&gt;&lt;br&gt;
It's a cryptographic library needed for matrix.org.&lt;/p&gt;

&lt;p&gt;Caveat: It's not quite working yet for me - for some reason I have to reload the script with &lt;code&gt;/script load matrix.py&lt;/code&gt; every time I log in to Weechat. If you know what might be the issue here - comments are very much appreciated.&lt;/p&gt;

&lt;h2&gt;
  
  
  use tmux to keep the session logged in
&lt;/h2&gt;

&lt;p&gt;I am really just scratching the surface here - using it to  keep the Weechat session alive when disconnecting.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;command to start: 
&lt;code&gt;tmux&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to detach: &lt;code&gt;Ctrl-b d&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;to reattach: &lt;code&gt;tmux att&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More details can be found &lt;a href="https://linuxize.com/post/getting-started-with-tmux/"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>weechat</category>
      <category>tmux</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
