<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nginx on Sleepy Mario</title><link>https://sleepymario.com/tags/nginx/</link><description>Recent content in Nginx on Sleepy Mario</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 29 Jun 2026 14:30:00 +0800</lastBuildDate><atom:link href="https://sleepymario.com/tags/nginx/index.xml" rel="self" type="application/rss+xml"/><item><title>Another Guest Post: Monitoring, Comments, and a Much Better VPS</title><link>https://sleepymario.com/2026/06/another-guest-post-monitoring-comments-and-a-much-better-vps/</link><pubDate>Mon, 29 Jun 2026 14:30:00 +0800</pubDate><guid>https://sleepymario.com/2026/06/another-guest-post-monitoring-comments-and-a-much-better-vps/</guid><description>&lt;img src="https://sleepymario.com/2026/06/another-guest-post-monitoring-comments-and-a-much-better-vps/cover.png" alt="Featured image of post Another Guest Post: Monitoring, Comments, and a Much Better VPS" /&gt;&lt;p&gt;Today turned into one of those unexpectedly productive infrastructure days.&lt;/p&gt;
&lt;p&gt;I started with a monitoring setup that was only partially finished and ended with the entire environment visible in Prometheus and Grafana, a working comment system on the blog, a larger VPS, and a proper update script tying everything together.&lt;/p&gt;
&lt;h2 id="monitoring-is-finally-complete"&gt;Monitoring is finally complete
&lt;/h2&gt;&lt;p&gt;Prometheus is now scraping all the machines that matter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the monitoring VM&lt;/li&gt;
&lt;li&gt;the files VM&lt;/li&gt;
&lt;li&gt;the utility VM&lt;/li&gt;
&lt;li&gt;the ThinkPad server&lt;/li&gt;
&lt;li&gt;the VPS&lt;/li&gt;
&lt;li&gt;the cloud VM&lt;/li&gt;
&lt;li&gt;the archive VM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Every target reports as healthy, and Grafana can switch cleanly between them.&lt;/p&gt;
&lt;p&gt;The dashboard now gives me one place to check CPU usage, memory, storage, load, uptime, and network activity across the entire setup.&lt;/p&gt;
&lt;p&gt;This had been sitting on the roadmap for a while, so finally being able to remove it felt good.&lt;/p&gt;
&lt;h2 id="zerotier-is-cleaned-up-too"&gt;ZeroTier is cleaned up too
&lt;/h2&gt;&lt;p&gt;The network separation was finished as well.&lt;/p&gt;
&lt;p&gt;The private systems and public-facing services now live on separate ZeroTier networks, with only the machines that genuinely need access connected to both.&lt;/p&gt;
&lt;p&gt;There is still a longer-term plan to simplify the public side further, but the current setup is already much cleaner than before.&lt;/p&gt;
&lt;p&gt;Eventually the VPS and files server will probably share a small service network of their own, while the rest of the infrastructure remains private.&lt;/p&gt;
&lt;p&gt;That can wait.&lt;/p&gt;
&lt;h2 id="the-vps-got-an-upgrade"&gt;The VPS got an upgrade
&lt;/h2&gt;&lt;p&gt;The VPS was still running with only 1 GB of RAM, which had become increasingly uncomfortable.&lt;/p&gt;
&lt;p&gt;GoAccess already consumed a noticeable amount of memory, and adding Docker and another public service would have left very little room.&lt;/p&gt;
&lt;p&gt;I upgraded it to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2 GB RAM&lt;/li&gt;
&lt;li&gt;50 GB disk&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The improvement was immediate. Swap usage disappeared, there is now comfortable free memory, and the disk has plenty of space for future work.&lt;/p&gt;
&lt;p&gt;This should also make the eventual migration of the archived WordPress site much less painful.&lt;/p&gt;
&lt;p&gt;Not painless, unfortunately. Just less painful.&lt;/p&gt;
&lt;h2 id="remark42-is-now-live"&gt;Remark42 is now live
&lt;/h2&gt;&lt;p&gt;The main goal for the day was to add comments to the new blog.&lt;/p&gt;
&lt;p&gt;I chose Remark42 because it is small, self-hosted, open source, and does not require handing the entire comment section over to an external platform.&lt;/p&gt;
&lt;p&gt;It now runs in Docker on the VPS and is exposed through nginx at:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;https://sleepymario.com/comments/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The container itself only listens on localhost, so nginx is the only public entry point.&lt;/p&gt;
&lt;p&gt;The setup includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;persistent comment storage&lt;/li&gt;
&lt;li&gt;automatic backups&lt;/li&gt;
&lt;li&gt;GitHub login&lt;/li&gt;
&lt;li&gt;anonymous commenting&lt;/li&gt;
&lt;li&gt;administrator access through my GitHub account&lt;/li&gt;
&lt;li&gt;nginx reverse proxying&lt;/li&gt;
&lt;li&gt;a health check&lt;/li&gt;
&lt;li&gt;log rotation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The comment section has been added to all current blog posts.&lt;/p&gt;
&lt;h2 id="the-theme-now-follows-the-site"&gt;The theme now follows the site
&lt;/h2&gt;&lt;p&gt;There was one visual problem.&lt;/p&gt;
&lt;p&gt;Remark42 initially stayed in light mode while the blog defaulted to dark mode, which looked fairly terrible.&lt;/p&gt;
&lt;p&gt;That was fixed by connecting Remark42 to the Stack theme’s existing color-scheme event.&lt;/p&gt;
&lt;p&gt;Now, when the site switches between light and dark mode, the comment section changes with it immediately.&lt;/p&gt;
&lt;p&gt;That small detail made the integration feel much more complete.&lt;/p&gt;
&lt;h2 id="a-proper-vps-update-command"&gt;A proper VPS update command
&lt;/h2&gt;&lt;p&gt;The final piece was a reusable VPS update script.&lt;/p&gt;
&lt;p&gt;Future maintenance now requires only:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo update-vps&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The script:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;updates Ubuntu packages&lt;/li&gt;
&lt;li&gt;updates Docker and Docker Compose&lt;/li&gt;
&lt;li&gt;pulls the latest Remark42 image&lt;/li&gt;
&lt;li&gt;creates a backup before replacing the container&lt;/li&gt;
&lt;li&gt;retains the eight newest backups&lt;/li&gt;
&lt;li&gt;waits for the Remark42 health check&lt;/li&gt;
&lt;li&gt;validates nginx&lt;/li&gt;
&lt;li&gt;tests the main website&lt;/li&gt;
&lt;li&gt;tests the public comment endpoint&lt;/li&gt;
&lt;li&gt;reports whether a reboot is required&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first full run completed successfully.&lt;/p&gt;
&lt;p&gt;No pending packages, no reboot required, and all services came back healthy.&lt;/p&gt;
&lt;h2 id="what-is-left"&gt;What is left
&lt;/h2&gt;&lt;p&gt;The infrastructure roadmap is much shorter now.&lt;/p&gt;
&lt;p&gt;The next actual project will probably be setting up the TCL NXTPAPER A1 as a dedicated notetaking device.&lt;/p&gt;
&lt;p&gt;Everything else can move slowly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Matrix and Element cleanup&lt;/li&gt;
&lt;li&gt;i3 or Sway configuration&lt;/li&gt;
&lt;li&gt;rebuilding the Gentoo control center&lt;/li&gt;
&lt;li&gt;migrating the archive site&lt;/li&gt;
&lt;li&gt;eventually simplifying the remaining public network layout&lt;/li&gt;
&lt;li&gt;several very low-priority services&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For once, nothing urgent is left unfinished.&lt;/p&gt;
&lt;p&gt;That is a good place to stop for the day.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This is quite a technical author, isn&amp;rsquo;t it. Now please don&amp;rsquo;t hack me 哭哭.&lt;/p&gt;</description></item></channel></rss>