# Welcome!

Earlier I was hosting this site on wordpress, but having faced multiple problems to maintain it I have decided to shift to gitbooks\~github setup. Content to be uploaded soon.

Following are a few of my previous blogs:

{% embed url="<https://blog.randomblogz.com/archived/threat-libraries>" %}

{% embed url="<https://blog.randomblogz.com/archived/chaos-engineering>" %}


# My Home Server Setup - Part I

Years ago, when I was experimenting with single-board computers (SBCs), I was amazed by the capabilities of the Raspberry Pi. My initial plan was to use it for a home automation system for hydroponics, but that project didn’t quite work out. However, I later repurposed it as a DNS security tool for my home network. For ease of deployment, I set up Pi-hole using Docker on Raspberry Pi OS.

Since I had a containerized service running on the Raspberry Pi, I started experimenting with other self-hosted applications like Gitea, Nextcloud, and a few others. While this was an exciting learning experience, I encountered several challenges over time:

#### Challenges with Raspberry Pi as a Home Server

* **Performance and Heating Issues**: SBCs aren’t designed to run multiple services continuously. While they can handle it, they tend to overheat, and performance degrades significantly. Over time, as I added more services, resource usage increased exponentially.
* **Storage and Connectivity**: While the Raspberry Pi supports USB hard drives, managing multiple external components without a dedicated case quickly becomes cluttered. More wires mean more complexity, and ensuring proper spacing to avoid overheating and static buildup adds another maintenance layer.
* **Stability**: Frequent OS crashes and unexpected reboots were common. Stability remained an issue even with controlled temperature management using smart plugs for scheduled power cycles and only installing necessary updates. The SD card would eventually become corrupted or unstable. Additionally, working with ARM architecture posed its own set of compatibility challenges.

Given these limitations, I decided to upgrade to a small, power-efficient, silent, stable, and compact x86-based system. I opted for a used Dell OptiPlex, which I got at a great price. Currently, I have two of them running as my home servers.

#### My Home Server Setup

For the OS, I chose **Manjaro Linux** on both servers. Manjaro is lightweight, has minimal bloatware, and offers excellent package management, making it a solid choice for my use case. For container management, I run **Docker** on both machines and manage the containers via **Portainer** for a simple and efficient workflow.

Here are the services I use daily:

#### **Container Management**

* [**Portainer**](https://www.portainer.io/) – A great Docker management solution

#### **Dashboards & Monitoring**

* [**Homarr**](https://github.com/ajnart/homarr) – A customizable dashboard that serves as my homepage, linking to all my services and bookmarks
* [**Uptime Kuma**](https://github.com/louislam/uptime-kuma) – Monitors service health and can send alerts to Slack, Discord, and other platforms

#### **Coding & Development**

* [**CodeServer**](https://github.com/coder/code-server) – A web-based IDE, useful for making quick configuration changes
* [**Gitea**](https://gitea.io/) – A lightweight Git repository management system
* [**Windmill**](https://windmill.dev/) – This is an Automation and workflow management tool with good integrations

#### **Utilities**

* [**ITTools**](https://github.com/CorentinTh/it-tools) – A collection of handy scripts
* [**Syncthing**](https://syncthing.net/) – Synchronizes and backs up files across devices
* [**Airsonic**](https://github.com/airsonic/airsonic) – A self-hosted alternative to Spotify
* [**StirlingPDF**](https://github.com/Frooodle/Stirling-PDF) – A powerful PDF management tool
* [**Mealie**](https://github.com/mealie-recipes/mealie) – A meal and recipe management service
* [**Photoprism**](https://photoprism.app/) – Local photo storage and management
* [**Jellyfin**](https://jellyfin.org/) – A self-hosted media streaming service with cross-platform support

#### **Productivity**

* [**DocMost**](https://github.com/DocMost) – A document and note management tool
* [**FreshRSS**](https://freshrss.org/) – An RSS aggregator for consolidating all my feeds
* [**Teedy**](https://github.com/sismics/docs) – A document management service with tagging for easy organization
* [**Kavita**](https://www.kavitareader.com/) – A digital library for reading manga and books
* [**Firefly III**](https://firefly-iii.org/) – A personal finance management tool
* [**Monica**](https://monicahq.com/) – A personal relationship manager; I use it for journaling, though it has many other features

#### **Storage & Backup**

* [**Nextcloud**](https://nextcloud.com/) – A self-hosted cloud storage solution
* [**Minio**](https://min.io/) – An S3-compatible storage alternative for large files
* [**Duplicati**](https://www.duplicati.com/) – A robust backup solution (Pro tip: Always back up your data! Things may seem stable until an unexpected update wipes everything out.)

#### **Security**

* [**Pi-hole**](https://pi-hole.net/) – A DNS-based ad blocker and network security tool
* [**Bitwarden**](https://bitwarden.com/) – A self-hosted password manager

I'm still in the process of setting up additional services and will share more updates in the future. Stay tuned!

#### **Future Plans**

As I continue refining my home lab, I plan to explore more advanced configurations, including:

* **Kubernetes or Docker Swarm**: To improve container orchestration and scalability
* **Self-Hosting Email Services**: Setting up a mail server with improved privacy and security
* **VPN and Zero Trust Networking**: Implementing a WireGuard-based VPN and exploring solutions like Tailscale for secure remote access
* **Home Automation**: Revisiting my original hydroponics project using Home Assistant and IoT devices
* **AI and Machine Learning**: Running small-scale ML models for personal projects, such as image recognition or automation

This journey has been a rewarding learning experience, and I look forward to sharing more insights in the next part of this series. If you're building your own home server, I'd love to hear about your setup and experiences!


# Threat Libraries

The threat library is exactly what it sounds like, is a place to store the threats encountered by your organization or related to your organization and have an impact on it. This library is used to store the threat event details, attributes, chronology of events, related files, software, etc. An organization needs to keep so that if in future similar incidents occur, old incidents can be used for learning and mitigating new events effectively. It also helps the organization assess the threat types and trends observed historically, which in turn helps security teams to understand critical focus areas for threats.

The whole idea of creating a threat library is to keep a record of threats. These historical records can help in various ways some of them are as follows:

* Having a record of what kind of vulnerabilities existed in the organization helps security guys to understand what kind of threats their organization is more vulnerable. Hence they can focus on creating, revising and monitoring those areas more rigorously.
* It provide a trend in vulnerabilities for the organization. For example. suppose there were lots of changes needed in the softwares during the release of SSL vulnerabilities. In that case, that proves that any vulnerability released in category of SSL(or secure browsing) will impact the organization IT infrastructure greatly.
* If there was a hacking attempt and it is recorded with ample details then it helps security experts to re-trace the entry points of the hacker as well as what other kind of attempts he/she might have made.
* Understanding a threat attack sophistication also let us know if the security measures setup in the organization are good enough.

How to Create one?

Creating a threat library can be as simple as creating a file share folder with restricted access(not advisable where shares are widely used) to dedicating a physical machine hosting an application to organize all the data and files. However, a threat library setup should have the following characteristics:

1. Records/data should be easy to organize, search and retrieve. I.E. well structured and indexes data.
2. Good authentication and authorization and restricted access to the information
3. File integrity checks and files should be stored in encrypted form.
4. Ability to make updates in the records
5. Easily accessible

There is N number of software which can be used for it. Some of these are Bugzilla, Gitlab, FTP servers, and any kind of media hosting website frameworks with the characteristics mentioned above.

Let me know what you think about my write-up in the comments below. Please refer URL provided below for more, it's a great article.

Reference: <https://www.threatq.com/threat-library/>


# Chaos engineering

"Chaos engineering” is planning and performing various failure tests on the live production environments to check its high availability, RTO, and RPOs. The idea may sound absurd at first and may raise the eyebrows of many in your organization. But when implemented right, with proper planning it can keep the organization fully prepared for any critical component/module failure. "Chaos Engineering" by itself is very planned and detailed and involves a thorough analysis of the whole organization environment, understanding current RTO and RPO, and planning and executing the tests so as to make sure the systems are tested for a wide variety of failures. The objective of planning is to cover as many failure scenarios as possible.

An Example

Let's try to understand it with an example. Imagine we have a 3-tier critical web application hosted with high availability. Measures have been taken to make sure that for crisis the application can be restored to its working state in RTO. There are multiple instances hosting databases and applications paper with load balancing and auto-failover.  On papers, the number and the setup look good but in reality, we don't know what kind of problem will come. We might have prepared ourselves to deal with the instance failure or database corruption. But might not have thought of Load balance failure. And since it was an unforeseen cause of failure the time to recover the application functionality might take longer that RTO and mean major business impact either reputation-wise, finance, or both.

Traditional vs. Chaos﻿

Traditionally fail-over testing is done during the new implementation or very big migration changes. Routine DR testing is done only for critical components in the environment. As the organization or the service provider doesn't want downtime during testing as well that can impact business. DR testing is planned and done during non-critical hours only for the modules that we know can recover. Also, most of the architectures and its components keep on changing either due to new upgrades or cost/performance optimization. Unless the environments are tested for each and every component for failures, we can face problems just like in the above example.

Summary

Testing your live environment gives you more confidence in the stability of your application and also keeps the tech teams responsible on their toes(which is not as bad as it sounds). That helps identify the weaknesses and focus areas in production. Also identifies any direct or indirect impact of any recent changes in the environment.

Next time we will discuss how to analyze, plan, and execute the tests of  "Chaos" till then, please let me know in the comments below what you think about the article. Any suggestion is much appreciated...

In the previous blog, we discussed what chaos engineering is. And in this part, we will go through how to plan and implement it.

While planning for the testing keep the following things under considerationthat:

* Assume nothing: Just like any other testing assume nothing while analyzing the environment. Quite often the part of designs that we assume to be safe is the one which fails, leaving us in an unprepared situation.
* Cover everything: Not so of a point but a checklist to look at the infrastructure thoroughly. Every component has its failure point, our job is to test for what happens when that fails.
* Do not take a word for it: Highly available, low failure rate, and highly redundant, we come across such services/implementations quite often. More so since the cloud and its services have come. But It's all theoretical/SLA, the failure they promised might not cover all the scenarios for you. Also for them as service failure might be well within the SLA range, but it could cause us financial/reputation loss as an organization


