<?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: Buran Host</title>
    <description>The latest articles on DEV Community by Buran Host (@buranhost).</description>
    <link>https://dev.to/buranhost</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4283588%2Ff55170e8-0e18-4e59-9798-bd740f2563be.png</url>
      <title>DEV Community: Buran Host</title>
      <link>https://dev.to/buranhost</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/buranhost"/>
    <language>en</language>
    <item>
      <title>Monitoring a small VPS with one cron script and a phone notification</title>
      <dc:creator>Buran Host</dc:creator>
      <pubDate>Sun, 06 Dec 2026 21:37:32 +0000</pubDate>
      <link>https://dev.to/buranhost/monitoring-a-small-vps-with-one-cron-script-and-a-phone-notification-4710</link>
      <guid>https://dev.to/buranhost/monitoring-a-small-vps-with-one-cron-script-and-a-phone-notification-4710</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I run &lt;a href="https://buran.host" rel="noopener noreferrer"&gt;Buran.host&lt;/a&gt;, a small VPS provider. This article is not about our service, the script works on any Linux server.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A single small server does not need Prometheus, Grafana and an alert manager. It needs to tell you when one of four things goes wrong, before your users do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The disk is almost full&lt;/li&gt;
&lt;li&gt;Memory is almost gone&lt;/li&gt;
&lt;li&gt;The CPU has been overloaded for a while&lt;/li&gt;
&lt;li&gt;Your own service stopped answering&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Disk is the classic one. It fills up quietly with logs, backups and database files, and then the database refuses to write. Memory comes next: when &lt;code&gt;MemAvailable&lt;/code&gt; hits zero, the kernel starts killing processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;A shell script runs from cron every five minutes. For each check it keeps a small marker file. When a check fails and there is no marker, it sends one message and creates the marker. When the check passes and the marker exists, it sends a recovery message and deletes it. That is how you avoid getting the same alert every five minutes.&lt;/p&gt;

&lt;p&gt;For notifications I use &lt;a href="https://ntfy.sh" rel="noopener noreferrer"&gt;ntfy.sh&lt;/a&gt;: you pick a long random topic name, subscribe to it in the phone app, and &lt;code&gt;curl&lt;/code&gt; posts to it. No account is needed. If you prefer Telegram, replace the &lt;code&gt;curl&lt;/code&gt; line with a call to the Bot API.&lt;/p&gt;

&lt;h2&gt;
  
  
  The script
&lt;/h2&gt;

&lt;p&gt;Save it as &lt;code&gt;/usr/local/bin/healthcheck.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c"&gt;# Minimal health check for a small Linux VPS. Run from cron every 5 minutes.&lt;/span&gt;
&lt;span class="c"&gt;# Sends one message when a check fails and one when it recovers.&lt;/span&gt;
&lt;span class="nv"&gt;TOPIC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"change-this-to-a-long-random-string"&lt;/span&gt;   &lt;span class="c"&gt;# your private ntfy.sh topic&lt;/span&gt;
&lt;span class="nv"&gt;DISK_MAX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;85                                   &lt;span class="c"&gt;# percent of / in use&lt;/span&gt;
&lt;span class="nv"&gt;MEM_MAX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;90                                    &lt;span class="c"&gt;# percent of RAM in use (MemAvailable based)&lt;/span&gt;
&lt;span class="nv"&gt;SERVICE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8080/health"&lt;/span&gt;    &lt;span class="c"&gt;# what your app answers locally&lt;/span&gt;

&lt;span class="nv"&gt;HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;hostname&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;STATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/var/tmp/healthcheck
mkdir -p &lt;span class="s2"&gt;"$STATE"&lt;/span&gt;

notify&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  curl -fsS -m 10 -d &lt;span class="s2"&gt;"$HOST: $1"&lt;/span&gt; &lt;span class="s2"&gt;"https://ntfy.sh/$TOPIC"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# check NAME BAD(0|1) MESSAGE&lt;/span&gt;
check&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"$2"&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 1 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
    &lt;span class="o"&gt;[&lt;/span&gt; -e &lt;span class="s2"&gt;"$STATE/$1"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; notify &lt;span class="s2"&gt;"ALERT $3"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; : &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$STATE/$1"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt;
    &lt;span class="o"&gt;[&lt;/span&gt; -e &lt;span class="s2"&gt;"$STATE/$1"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; notify &lt;span class="s2"&gt;"OK $1 is back to normal"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; rm -f &lt;span class="s2"&gt;"$STATE/$1"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nv"&gt;disk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;df -P / &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'NR==2 {gsub("%","",$5); print $5}'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
check disk &lt;span class="s2"&gt;"$([ "&lt;/span&gt;&lt;span class="nv"&gt;$disk&lt;/span&gt;&lt;span class="s2"&gt;" -ge "&lt;/span&gt;&lt;span class="nv"&gt;$DISK_MAX&lt;/span&gt;&lt;span class="s2"&gt;" ] &amp;amp;&amp;amp; echo 1 || echo 0)"&lt;/span&gt; &lt;span class="s2"&gt;"disk is ${disk}% full"&lt;/span&gt;

&lt;span class="nv"&gt;mem&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;awk &lt;span class="s1"&gt;'/MemTotal/ {t=$2} /MemAvailable/ {a=$2} END {printf "%d", (t-a)*100/t}'&lt;/span&gt; /proc/meminfo&lt;span class="o"&gt;)&lt;/span&gt;
check mem &lt;span class="s2"&gt;"$([ "&lt;/span&gt;&lt;span class="nv"&gt;$mem&lt;/span&gt;&lt;span class="s2"&gt;" -ge "&lt;/span&gt;&lt;span class="nv"&gt;$MEM_MAX&lt;/span&gt;&lt;span class="s2"&gt;" ] &amp;amp;&amp;amp; echo 1 || echo 0)"&lt;/span&gt; &lt;span class="s2"&gt;"memory is ${mem}% used"&lt;/span&gt;

&lt;span class="nv"&gt;load&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;awk &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt; /proc/loadavg&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;cores&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;nproc&lt;span class="o"&gt;)&lt;/span&gt;
check load &lt;span class="s2"&gt;"$(awk -v l="&lt;/span&gt;&lt;span class="nv"&gt;$load&lt;/span&gt;&lt;span class="s2"&gt;" -v c="&lt;/span&gt;&lt;span class="nv"&gt;$cores&lt;/span&gt;&lt;span class="s2"&gt;" 'BEGIN {print (l &amp;gt; c * 1.5) ? 1 : 0}')"&lt;/span&gt; &lt;span class="s2"&gt;"5 min load ${load} on ${cores} cores"&lt;/span&gt;

curl -fsS -m 5 -o /dev/null &lt;span class="s2"&gt;"$SERVICE_URL"&lt;/span&gt;
check service &lt;span class="s2"&gt;"$([ $? -ne 0 ] &amp;amp;&amp;amp; echo 1 || echo 0)"&lt;/span&gt; &lt;span class="s2"&gt;"service does not answer at $SERVICE_URL"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make it executable and test it by temporarily setting &lt;code&gt;DISK_MAX=1&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;chmod +x /usr/local/bin/healthcheck.sh
/usr/local/bin/healthcheck.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should get one message on your phone. Run it again and you should get nothing, because the alert is already sent. Put the threshold back and run it a third time: you get the recovery message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cron
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*/5 * * * * /usr/local/bin/healthcheck.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What it does not cover
&lt;/h2&gt;

&lt;p&gt;A monitor that lives on the server cannot tell you the server is down: if the machine is off, the script is off too. Add one outside check, for example a free external uptime service that requests your site every few minutes and emails you. Together, the two cover most small projects.&lt;/p&gt;

&lt;p&gt;It also says nothing about why something went wrong. When the disk alert fires, &lt;code&gt;du -xh / | sort -h | tail&lt;/code&gt; is your next command. Dashboards are worth adding once you miss them, not before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;MemAvailable&lt;/code&gt; is the right number for memory. Plain "used" counts disk cache, which Linux gives back when needed, and makes healthy servers look full.&lt;/li&gt;
&lt;li&gt;Load is compared with the number of cores. A load of 3 means very different things on 1 core and on 8.&lt;/li&gt;
&lt;li&gt;Keep the topic name private. Anyone who knows it can read your alerts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is the first alert you set up on a new server?&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>selfhosted</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>I built a VPS hosting service that takes only crypto and asks for an email. Here is what I learned in 3 months</title>
      <dc:creator>Buran Host</dc:creator>
      <pubDate>Fri, 04 Dec 2026 21:26:28 +0000</pubDate>
      <link>https://dev.to/buranhost/i-built-a-vps-hosting-service-that-takes-only-crypto-and-asks-for-an-email-here-is-what-i-learned-1285</link>
      <guid>https://dev.to/buranhost/i-built-a-vps-hosting-service-that-takes-only-crypto-and-asks-for-an-email-here-is-what-i-learned-1285</guid>
      <description>&lt;p&gt;In September I started buran.host, a small VPS hosting service. You sign up with an email, pay in USDT, and get a Linux server with root access a few minutes later. No ID upload, no card. This is a short account of how it is built and what surprised me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why crypto only and no verification
&lt;/h2&gt;

&lt;p&gt;Plenty of developers cannot pay a normal hosting bill. Cards get declined across borders, banks block transfers, and some providers ask for a passport scan before you can rent a $12 server. I wanted a place where the only things you need are an email address and a wallet. That is legal in most countries: the provider does not have to know who you are, only that the payment arrived.&lt;/p&gt;

&lt;p&gt;It does not mean no rules. Spam, scanning and attacks from a server get it suspended, and I tell customers that up front.&lt;/p&gt;

&lt;h2&gt;
  
  
  How delivery works
&lt;/h2&gt;

&lt;p&gt;The part I enjoyed most is that nothing is manual:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A customer creates an invoice and sends USDT (TRC-20).&lt;/li&gt;
&lt;li&gt;A small Node.js service watches the chain and marks the invoice as paid.&lt;/li&gt;
&lt;li&gt;The service creates the server through the upstream provider's API and passes a cloud-init script.&lt;/li&gt;
&lt;li&gt;cloud-init sets the baseline: SSH hardening, fail2ban, a mail block so a new server cannot be used for spam, and a reverse DNS record.&lt;/li&gt;
&lt;li&gt;The customer gets an email with the IP and root access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The whole thing runs on a single server behind Caddy, which handles HTTPS automatically. The site is a React app, the backend is plain Node.js, and state lives in one JSON file with a daily backup. It is not fancy, and it is easy to reason about.&lt;/p&gt;

&lt;h2&gt;
  
  
  What went wrong
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reverse DNS.&lt;/strong&gt; On a hand-made replacement server I forgot to set the PTR record, and the customer saw the provider's hostname instead of ours. Now it is a step in the checklist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Geolocation.&lt;/strong&gt; One customer thought their server was in the wrong country because a public database showed an outdated region. I had to prove the real location with a 1 ms ping to our own host and explain the stale record.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bots.&lt;/strong&gt; Within days, scanners were probing &lt;code&gt;/api/v1/namespaces/kube-system/secrets&lt;/code&gt; on a site that has no Kubernetes at all. Everything returned 401, but it is a reminder that the whole internet is knocking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invoices that never get paid.&lt;/strong&gt; Many people create an invoice and leave. A 30 minute payment window is probably too short for someone who has to go and buy USDT first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prices and what you get
&lt;/h2&gt;

&lt;p&gt;Plans start at about 12 euros a month for a small server, with Debian and Ubuntu images and nine datacenter locations. There is also an API for resellers if you want to provision servers from your own code.&lt;/p&gt;

&lt;p&gt;If you want to look at it: &lt;a href="https://buran.host" rel="noopener noreferrer"&gt;buran.host&lt;/a&gt;. I would be glad to hear what is missing, and what would make you trust a new host enough to pay it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>hosting</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
