<?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: Raktim Ranjit</title>
    <description>The latest articles on DEV Community by Raktim Ranjit (@raktim_ranjit_8c5199e0c6a).</description>
    <link>https://dev.to/raktim_ranjit_8c5199e0c6a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4162283%2Fb6a97aed-0810-44af-a520-0c4c102d35ae.gif</url>
      <title>DEV Community: Raktim Ranjit</title>
      <link>https://dev.to/raktim_ranjit_8c5199e0c6a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raktim_ranjit_8c5199e0c6a"/>
    <language>en</language>
    <item>
      <title>A database backup is only half a recovery plan for a self-hosted app</title>
      <dc:creator>Raktim Ranjit</dc:creator>
      <pubDate>Fri, 23 Oct 2026 18:58:20 +0000</pubDate>
      <link>https://dev.to/raktim_ranjit_8c5199e0c6a/a-database-backup-is-only-half-a-recovery-plan-for-a-self-hosted-app-5bk9</link>
      <guid>https://dev.to/raktim_ranjit_8c5199e0c6a/a-database-backup-is-only-half-a-recovery-plan-for-a-self-hosted-app-5bk9</guid>
      <description>&lt;p&gt;A successful database export answers a narrow question: can the database be copied? It does not answer whether the application can be recovered after the original machine disappears.&lt;/p&gt;

&lt;p&gt;For a small self-hosted business application, the missing pieces are often mundane: the encryption key, the exact application release, the database roles, or a background worker that resumes sending messages as soon as the restored system starts.&lt;/p&gt;

&lt;p&gt;This article proposes a recovery drill that treats those dependencies as part of the application. Rechvix, a public Go/PostgreSQL business-software project, provides the concrete starting point. The drill below is a proposed operator checklist, not a report of a disaster-recovery test performed for this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the dependency you cannot regenerate
&lt;/h2&gt;

&lt;p&gt;Rechvix's public README tells CasaOS operators to preserve both its PostgreSQL data and its secrets directory. Its deployment document identifies an application encryption key used for encrypted stored values and encrypted backup archives. A fresh key may let a new application start; it does not decrypt data written with the old one.&lt;/p&gt;

&lt;p&gt;That distinction changes how a recovery plan should be written. “Generate secrets on first boot” is useful installation behavior. “Generate replacement secrets during recovery” can be the wrong operation.&lt;/p&gt;

&lt;p&gt;For each persistent component, record the dependency and two recovery facts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;What must survive?&lt;/th&gt;
&lt;th&gt;What proves recovery?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;A consistent backup and its recovery instructions&lt;/td&gt;
&lt;td&gt;Known records and relationships can be read&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Encryption material&lt;/td&gt;
&lt;td&gt;The original key, held in a protected recovery location&lt;/td&gt;
&lt;td&gt;Previously encrypted application data remains usable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Release configuration&lt;/td&gt;
&lt;td&gt;Version, schema expectations and non-secret settings&lt;/td&gt;
&lt;td&gt;The restored release starts against the intended schema&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Background work&lt;/td&gt;
&lt;td&gt;Queue state and delivery configuration&lt;/td&gt;
&lt;td&gt;Pending work is understood before external delivery resumes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Keep secret values out of the manifest itself. The manifest can say where an authorized operator retrieves a key without becoming another unprotected copy of that key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define success before opening the backup
&lt;/h2&gt;

&lt;p&gt;A login screen is a weak recovery test. It can appear while important business relationships remain broken.&lt;/p&gt;

&lt;p&gt;Choose a small set of reference records in a dedicated test installation. For an invoice-and-inventory system, a useful fixture is one finalized invoice, its accounting entries, its stock movements and a customer payment. Record identifiers and expected totals before taking the backup.&lt;/p&gt;

&lt;p&gt;After restoring, verify the same relationships. Can the invoice still be rendered? Does the payment allocation still point to the expected document? Do the recorded stock movements explain the balance? Are posted amounts unchanged?&lt;/p&gt;

&lt;p&gt;This is not a substitute for full integrity testing. It is a compact way to distinguish “the server responds” from “a representative business workflow survived.” Use synthetic records for an article or public demonstration; production customer data does not belong in screenshots or published recovery logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Restore somewhere that cannot act as production
&lt;/h2&gt;

&lt;p&gt;A recovery copy can accidentally become a second production sender. The danger is especially easy to miss when scheduled reminders, webhooks or payment integrations share the same database.&lt;/p&gt;

&lt;p&gt;Start the exercise in a separate environment with outbound delivery blocked or routed to test services. Do not assume that changing the public hostname disables background delivery. List every component capable of sending externally, including workers.&lt;/p&gt;

&lt;p&gt;Restore there first. Keep the original installation intact. The point of the drill is to learn what recovery needs without turning the exercise into an outage.&lt;/p&gt;

&lt;p&gt;Avoid copying a destructive restore command from a generic blog post. The exact steps depend on the backup format, release and deployment method. In particular, an application's whole-instance restore may replace records for more than one organisation. Check scope before running it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the database identity as well as the data
&lt;/h2&gt;

&lt;p&gt;Rechvix's deployment guidance separates the schema-owning migration role from the ordinary runtime role. Its README also warns that connecting as a table owner can bypass row-level security.&lt;/p&gt;

&lt;p&gt;That makes role restoration a functional and security concern. If an operator fixes a restored application's permissions by giving it the migration owner's connection string, the UI may work while its isolation assumptions have changed.&lt;/p&gt;

&lt;p&gt;A useful acceptance check has two sides: the runtime account can perform expected operations, and it cannot read another tenant's records. Run that check through the real application context or a documented test harness, rather than assuming a successful administrative database query proves isolation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure a usable recovery, not just import time
&lt;/h2&gt;

&lt;p&gt;Record the age of the recovered backup and the time until the reference workflow is usable. Those are different measurements.&lt;/p&gt;

&lt;p&gt;A ten-minute import can still leave hours of work to recover the key, locate the matching release, rebuild roles and reconcile queued deliveries. Conversely, a quick recovery from an old backup may lose more recent work than the business can accept.&lt;/p&gt;

&lt;p&gt;Keep a short drill log:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backup timestamp and application version.&lt;/li&gt;
&lt;li&gt;Restore start and completion times.&lt;/li&gt;
&lt;li&gt;Time the reference workflow passed.&lt;/li&gt;
&lt;li&gt;Encryption and tenant-isolation checks: pass, fail or not tested.&lt;/li&gt;
&lt;li&gt;External delivery state and remaining manual steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A field marked “not tested” is useful information. It identifies the next exercise instead of hiding an assumption inside a green status.&lt;/p&gt;

&lt;h2&gt;
  
  
  Treat documentation conflicts as findings
&lt;/h2&gt;

&lt;p&gt;The Rechvix deployment page includes older stage-specific descriptions alongside newer backup and configuration sections. The current README describes a broader shipped application. That is a reason to verify instructions against the exact release, not to merge every statement into one confident installation guide.&lt;/p&gt;

&lt;p&gt;Save the documentation revision used for the drill. When instructions disagree with the release, record the mismatch and resolve it before applying them to production.&lt;/p&gt;

&lt;p&gt;The deliverable from a recovery exercise is more than a restored database. It is a repeatable path from a known backup to a usable, correctly isolated application, with the remaining gaps written down.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Sources and scope:&lt;/strong&gt; &lt;a href="https://github.com/Raktim94/rechvix" rel="noopener noreferrer"&gt;Rechvix README&lt;/a&gt; and &lt;a href="https://github.com/Raktim94/rechvix/blob/main/docs/operations/deployment.md" rel="noopener noreferrer"&gt;deployment and recovery documentation&lt;/a&gt;, reviewed on October 24, 2026. No recovery timing, compliance certification or production restore result is claimed here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About the project:&lt;/strong&gt; I maintain Rechvix through NodeDR. The drill above is a proposed checklist, not a report of a completed recovery test.&lt;/p&gt;

</description>
      <category>selfhosted</category>
    </item>
    <item>
      <title>A practical checklist for self-hosting website forms</title>
      <dc:creator>Raktim Ranjit</dc:creator>
      <pubDate>Sun, 04 Oct 2026 18:31:21 +0000</pubDate>
      <link>https://dev.to/raktim_ranjit_8c5199e0c6a/a-practical-checklist-for-self-hosting-website-forms-2mhb</link>
      <guid>https://dev.to/raktim_ranjit_8c5199e0c6a/a-practical-checklist-for-self-hosting-website-forms-2mhb</guid>
      <description>&lt;p&gt;A contact form is often treated as a small front-end feature. In practice it is a data pipeline: the browser sends a request, an API validates it, storage retains it, and a human or workflow acts on it. If any step fails silently, a lead or support request disappears.&lt;/p&gt;

&lt;p&gt;I build software at &lt;a href="https://www.nodedr.com/" rel="noopener noreferrer"&gt;NodeDR&lt;/a&gt;, including a self-hosted form backend. Here is the checklist I would use before moving forms onto infrastructure I control.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Draw the path of one submission
&lt;/h2&gt;

&lt;p&gt;Write down the path from the visitor's browser to the person who reads the result. Include DNS, TLS, reverse proxy, application, database, notification channel, and any file store. This makes outages and ownership boundaries visible.&lt;/p&gt;

&lt;p&gt;Also decide what happens when a notification fails. A Telegram or email alert is convenient, but it should not be the only copy of the submission. The durable record should be queryable in the dashboard or database.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Separate public and secret keys
&lt;/h2&gt;

&lt;p&gt;The browser needs permission to submit to a form. It should never need an administrative credential. Use a project-scoped public key for browser submissions and keep secret keys on the server. If you add request signing, the signing secret belongs in a server route, not bundled JavaScript.&lt;/p&gt;

&lt;p&gt;For multiple websites, give each project its own key. That lets you rotate one site without interrupting the others and makes abuse easier to trace.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Plan for abuse before sharing the endpoint
&lt;/h2&gt;

&lt;p&gt;Public forms attract automated traffic. Set request size limits, validate expected fields, and consider rate limits or a challenge for forms that get targeted. A honeypot field can help with unsophisticated bots, but it should not be the only defense. Avoid logging full submission bodies into general application logs, where personal information may be copied into more places than intended.&lt;/p&gt;

&lt;p&gt;If visitors can upload files, decide which types and sizes are allowed, where those files live, and who can retrieve them. Prefer direct, time-limited uploads to a storage bucket over routing large file bytes through the form API.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Make the failure visible to the visitor
&lt;/h2&gt;

&lt;p&gt;The submit button should not always show “Success.” Treat an API error or timeout as a failure, keep the visitor's entered text in place, and offer a retry. If the API accepted the request but a later notification failed, the visitor should still see success because the submission is safely stored.&lt;/p&gt;

&lt;p&gt;For higher-value forms, include a submission identifier in the response. It helps support teams investigate a missing notification without searching through personal data.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Test exports and restore, not just backups
&lt;/h2&gt;

&lt;p&gt;Owning the database is useful only if you can retrieve and restore its contents. Test a small export before launch. Decide whether you need CSV/XLSX for operations, a database dump for disaster recovery, or both. Store backups separately from the live host and practice restoring into a clean environment.&lt;/p&gt;

&lt;p&gt;Write down retention rules, too. A form backend may collect names, email addresses, and free-text messages. Decide when old submissions should be deleted and who can access them.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Check the operational cost
&lt;/h2&gt;

&lt;p&gt;Self-hosting replaces a subscription with your own operational work: updates, monitoring, backups, security patches, and incident response. That trade can be worthwhile for data control or predictable volume, but it should be explicit. Start with one low-risk form, observe how it behaves, and only then move the forms that matter most.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete option
&lt;/h2&gt;

&lt;p&gt;We built &lt;a href="https://submify.nodedr.com/" rel="noopener noreferrer"&gt;Submify&lt;/a&gt; around this model. It provides a self-hosted API and dashboard, per-project keys, PostgreSQL storage, exports, optional S3-compatible file uploads, and notifications. It is AGPL-3.0 licensed, with its &lt;a href="https://github.com/Raktim94/Submify" rel="noopener noreferrer"&gt;source on GitHub&lt;/a&gt;. I am affiliated with the project, so treat it as one implementation to evaluate against the checklist rather than a universal answer.&lt;/p&gt;

&lt;p&gt;What failure mode has caused you the most trouble with website forms: delivery, spam, exports, or something else?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>opensource</category>
      <category>security</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
