<?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: Иван Петров</title>
    <description>The latest articles on DEV Community by Иван Петров (@frutella).</description>
    <link>https://dev.to/frutella</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%2F4169513%2F86d8a106-5558-41ec-9bfe-18c781f1efaf.png</url>
      <title>DEV Community: Иван Петров</title>
      <link>https://dev.to/frutella</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/frutella"/>
    <language>en</language>
    <item>
      <title>I host a 4,000-page website on a Raspberry Pi 5 with 1 GB of RAM</title>
      <dc:creator>Иван Петров</dc:creator>
      <pubDate>Wed, 07 Oct 2026 17:11:28 +0000</pubDate>
      <link>https://dev.to/frutella/i-host-a-4000-page-website-on-a-raspberry-pi-5-with-1-gb-of-ram-19on</link>
      <guid>https://dev.to/frutella/i-host-a-4000-page-website-on-a-raspberry-pi-5-with-1-gb-of-ram-19on</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4t1bivi5tvnpn0i8rdtv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4t1bivi5tvnpn0i8rdtv.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;Caissa Codex (&lt;a href="https://chesscodex.org" rel="noopener noreferrer"&gt;https://chesscodex.org&lt;/a&gt;) is a free encyclopedia of chess openings: 3,690 named lines, each with its own page, plus pages for every ECO code and a few rankings, about 4,000 URLs in total. It runs on a Raspberry Pi 5 with 1 GB of RAM in my home. Here is what makes that work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boring stack, on purpose
&lt;/h2&gt;

&lt;p&gt;PHP 8.4 and SQLite behind nginx and PHP-FPM. No framework, no build step, no Node on the server. The front controller is one file with a route table, the views are plain PHP templates, and a small PHP script minifies the CSS and JavaScript. A page is a few prepared SQLite queries and a template, which a Pi handles easily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the edge do the work
&lt;/h2&gt;

&lt;p&gt;Anonymous pages send &lt;code&gt;Cache-Control: public, s-maxage=600&lt;/code&gt;, and Cloudflare keeps them for 10 minutes. Most requests never reach the Pi, and PageSpeed scores stay around 100.&lt;/p&gt;

&lt;h2&gt;
  
  
  No open ports
&lt;/h2&gt;

&lt;p&gt;The Pi is reachable only through a Cloudflare Tunnel: the router has no port forwarding, and SSH goes through Cloudflare Access with keys only.&lt;/p&gt;

&lt;h2&gt;
  
  
  Living with a rate-limited API
&lt;/h2&gt;

&lt;p&gt;The statistics come from the Lichess opening explorer, which in practice allows about 20 requests a minute. So the site never fans out requests: the numbers are cached in SQLite and refreshed in the background one request at a time, and bulk data (results by rating band for the 1,500 most-played lines) is collected by slow command-line jobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stockfish on the Pi
&lt;/h2&gt;

&lt;p&gt;Every line's final position was evaluated by Stockfish 19 at depth 30 on the same Pi, and the results sit in a table next to the statistics. That makes comparisons like this possible: Stockfish gives White +2.03 after the Stafford Gambit, yet Black scores 50.8% in 4.6 million Lichess games.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security basics
&lt;/h2&gt;

&lt;p&gt;A strict Content Security Policy without inline scripts (all JavaScript lives in files), escaped output everywhere, and prepared statements for every query.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>php</category>
      <category>raspberrypi</category>
      <category>selfhosting</category>
    </item>
  </channel>
</rss>
