<?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: Manas Joshi</title>
    <description>The latest articles on DEV Community by Manas Joshi (@manasjoshi).</description>
    <link>https://dev.to/manasjoshi</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%2F882399%2F34e1471d-77c1-48ad-81c3-79d52eea83bb.jpeg</url>
      <title>DEV Community: Manas Joshi</title>
      <link>https://dev.to/manasjoshi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manasjoshi"/>
    <language>en</language>
    <item>
      <title>Hosting PocketBase on a DigitalOcean Droplet</title>
      <dc:creator>Manas Joshi</dc:creator>
      <pubDate>Wed, 04 Jan 2023 05:56:12 +0000</pubDate>
      <link>https://dev.to/manasjoshi/hosting-pocketbase-on-a-digitalocean-droplet-fii</link>
      <guid>https://dev.to/manasjoshi/hosting-pocketbase-on-a-digitalocean-droplet-fii</guid>
      <description>&lt;p&gt;Recently, I have playing around with &lt;a href="https://pocketbase.io" rel="noopener noreferrer"&gt;PocketBase&lt;/a&gt;, an open-source backend. And I am super impressed. The reason why is because PocketBase provides a real-time database, user authentication with OAuth2, file storage, and a clean, sleek admin dashboard. All in &lt;strong&gt;one single file!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I am so impressed, this has become my go-to backend for any side project. It's amazing how quickly it can set you up. And hosting PocketBase is incredibly simple. In this tutorial, we will deploy PocketBase to a 4$ DigitalOcean droplet.&lt;/p&gt;

&lt;p&gt;You don't need to spend any money at DigitalOcean to follow along this tutorial 😅. You can sign up at DigitalOcean using the below link, and you will receive free $200 credits. DigitalOcean won't charge your credit card until your credits are fully used. It also helps me out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://m.do.co/c/26e721cc5d22" rel="noopener noreferrer"&gt;Sign up &amp;amp; get $200 credits.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have created a DigitalOcean account using the below link. You will be directed to the dashboard. &lt;/p&gt;

&lt;h2&gt;
  
  
  Download PocketBase
&lt;/h2&gt;

&lt;p&gt;Before, we create a droplet, let's download the PocketBase executable for Linux from &lt;a href="https://pocketbase.io/docs" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Droplet
&lt;/h2&gt;

&lt;p&gt;To get started, create a project. Name it whatever you want. Once you have a project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on "Create Droplet"&lt;/li&gt;
&lt;li&gt;Select the region which fits your app the best.&lt;/li&gt;
&lt;li&gt;Select an OS image for the droplet. I am going with Ubuntu, but you can select the one you like.&lt;/li&gt;
&lt;li&gt;Then select the configuration for your droplet. For now, even a $4 or $6 configuration will work just fine for a small to medium sized application. You can always update this configuration later.&lt;/li&gt;
&lt;li&gt;For "Authentication Method", select "Password" and provide a safe password and make sure to note it down, as DigitalOcean will not show it again.&lt;/li&gt;
&lt;li&gt;Set the hostname of the droplet to something you can easily remember.&lt;/li&gt;
&lt;li&gt;Set the project to the one you just created earlier.&lt;/li&gt;
&lt;li&gt;Click "Create Droplet".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt; You have setup a droplet on DigitalOcean. Before we upload PocketBase, it's a good idea to setup a domain for our new droplet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup your domain
&lt;/h2&gt;

&lt;p&gt;You can use any domain registrar for this tutorial. All the below steps are generic and will apply to any registrar. Some options are &lt;a href="https://dreamhost.com" rel="noopener noreferrer"&gt;Dreamhost&lt;/a&gt;, &lt;a href="https://namecheap.com" rel="noopener noreferrer"&gt;Namecheap&lt;/a&gt;, &lt;a href="https://godaddy.com" rel="noopener noreferrer"&gt;GoDaddy&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you are using an apex domain (example.com)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create your domain using a domain registrar.&lt;/li&gt;
&lt;li&gt;Go the DNS settings of the domain.&lt;/li&gt;
&lt;li&gt;Change the default Nameservers to the DigitalOcean Nameservers which are -
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Go to DigitalOcean's Networking section.&lt;/li&gt;
&lt;li&gt;Under "Domains", add your newly created domain under your project.&lt;/li&gt;
&lt;li&gt;Under the domain settings, create a A record with the hostname &lt;code&gt;@&lt;/code&gt; and redirect it to the IP address of your droplet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt; Your domain is now linked to your DigitalOcean droplet.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you are using a subdomain (api.example.com)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go under the DNS settings of the apex domain under which you want to create a subdomain.&lt;/li&gt;
&lt;li&gt;Create a A record with the hostname &lt;code&gt;yoursubdomainname&lt;/code&gt; and set the IPv4 address to the IPv4 address of your DigitalOcean droplet.&lt;/li&gt;
&lt;li&gt;Go to DigitalOcean's Networking section.&lt;/li&gt;
&lt;li&gt;Add the newly created subdomain.&lt;/li&gt;
&lt;li&gt;Add a A record with the hostname as &lt;code&gt;@&lt;/code&gt; and redirect it to the IP address of your DigitalOcean droplet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt; Your subdomain is now linked to your DigitalOcean droplet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a &lt;code&gt;systemd&lt;/code&gt; file
&lt;/h2&gt;

&lt;p&gt;In order to keep PocketBase running even after we disconnect from the server and allow it to start on it's own, it is essential to create systemd service file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;pocketbase.service&lt;/code&gt; file using your favorite text editor.&lt;/li&gt;
&lt;li&gt;Copy and paste this configuration provided by PocketBase. Be sure to change the domain to your own.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description = pocketbase

[Service]
Type           = simple
User           = root
Group          = root
LimitNOFILE    = 4096
Restart        = always
RestartSec     = 5s
StandardOutput = append:/root/pb/errors.log
StandardError  = append:/root/pb/errors.log
ExecStart      = /root/pb/pocketbase serve --http="yourdomain.com:80" --https="yourdomain.com:443"

[Install]
WantedBy = multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! You created your Systemd file for PocketBase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uploading PocketBase to droplet
&lt;/h2&gt;

&lt;p&gt;Now that the boring setup stuff is out of the way, we can get to the fun part. Actually uploading the PocketBase executable to our droplet. For this we will be using the &lt;code&gt;scp&lt;/code&gt; module. First, let's connect to our droplet.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your Terminal or Command Prompt.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;ssh root@YOUR_SERVER_IP&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You might have to enter the password you created earlier while creating the droplet.&lt;/li&gt;
&lt;li&gt;Once you are connected, run &lt;code&gt;mkdir pb&lt;/code&gt;. This will create a folder called &lt;code&gt;pb&lt;/code&gt; at the root of our droplet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now we need to upload the PocketBase executable to this &lt;code&gt;pb&lt;/code&gt; folder on our droplet. For this, open a new Terminal window.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the folder where the PocketBase executable is stored.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;scp pocketbase root@YOUR_SERVER_IP:/root/pb&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You might have to enter your password and press Enter.&lt;/li&gt;
&lt;li&gt;Once the executable is uploaded, we need to also upload the &lt;code&gt;pocketbase.service&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Navigate to the folder where the &lt;code&gt;pocketbase.service&lt;/code&gt; file is stored.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;scp pocketbase.service root@YOUR_SERVER_IP:/lib/systemd/system&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With that, you have uploaded all the files necessary for running PocketBase. Now all that's left is to start the systemd service. Go back to the earlier terminal window which was connected to the droplet.&lt;/p&gt;

&lt;p&gt;In there, we need to run 2 commands. The first one to enable the PocketBase service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl enable pocketbase.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the next one to start the service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl start pocketbase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Congratulations!!&lt;/strong&gt; You just deployed PocketBase on a DigitalOcean droplet. And the best part is, PocketBase automatically generates an SSL certificate, so you don't have to worry about that. You can now access the admin UI of PocketBase using your domain. For example - &lt;code&gt;https://yourdomain.com/_/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Happy coding! Thank you for reading.&lt;br&gt;
If you had any problems, let me know in the comments. I'll try my best to solve them. See ya! 😎&lt;/p&gt;

</description>
      <category>learning</category>
      <category>ai</category>
      <category>career</category>
      <category>developers</category>
    </item>
    <item>
      <title>My experience of switching to Notion for Game Development</title>
      <dc:creator>Manas Joshi</dc:creator>
      <pubDate>Sun, 17 Jul 2022 16:01:59 +0000</pubDate>
      <link>https://dev.to/manasjoshi/my-experience-of-switching-to-notion-for-game-development-3jp2</link>
      <guid>https://dev.to/manasjoshi/my-experience-of-switching-to-notion-for-game-development-3jp2</guid>
      <description>&lt;p&gt;For the past year, I have been using &lt;a href="https://trello.com"&gt;Trello&lt;/a&gt; as my primary tool for productivity. And I was and still am extremely happy with the tool. It does a great job at keeping me productive and from going insane.&lt;/p&gt;

&lt;p&gt;But recently, I came across a tool called Notion. I had heard about it but never bothered to check their website. This time, I did check their website, and was amazed by how versatile the tool is. It could do so much more than just Project Management. I got super excited about using it. So I created an account, logged in, only to log out 5 minutes later due to the overwhelming data.&lt;/p&gt;

&lt;p&gt;😬😬😬&lt;/p&gt;

&lt;p&gt;When I logged in, it was like a whole new world. There were pages, databases, templates, plugins, integrations. It was too much for my brain to process.&lt;/p&gt;

&lt;p&gt;So after staying away from Notion for 1 week, I calmed my brain and said, "Okay, let's do this, one step at a time.". And it worked! I was able to figure out Notion's entire database schema within a few minutes of reading. This made me realise 2 things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Notion schema is simple, yet incredibly genius.&lt;/li&gt;
&lt;li&gt;Notion feels like a lot at first, but if you give it time, you can easily master it and use it to improve your productivity.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fast-forward to present day, I am doing pretty much everything except coding on Notion for Game Development. (Frankly, I won't be surprised if they add a Unity plugin 😅). My kanban development boards, documentations, and everything else is on Notion.&lt;/p&gt;

&lt;p&gt;I highly recommend Notion if you need a tool which does more than task-tracking, even if you aren't into Game Development. The way I see it, it could be used for blogging, project management, documentation, personal life, family activities, and more. It proves worthy of being the Swiss knife of keeping a track of your life.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
