# The Bunker Ops Server Build-Out ## Introduction The following guide is for installing The Bunker Ops (bnkops) Server Build-out. This project is a effort to provide a free open-source software stack alternative to Nationbuilder or similar services. Inspired by this paper: [If you do politics who is reading your secrets - why you should de-corp your software stack](../thatreallyblondehuman/Thoughts%20🤔/If%20you%20do%20politics%20who%20is%20reading%20your%20secrets%20-%20why%20you%20should%20de-corp%20your%20software%20stack.md). The tldr is that corporate software services are designed to trap advocacy organizations on their systems. Once trapped, they extract data and dollars from local communities and funnel it to corporate hierarchies; often to systems that local advocacy organizations are actively working against. A simple question to highlight this phenomenon; who owns the software you use? Who are you giving your money and data to? Who is profiting off your labor? ### This software stack, deployed on low-cost hardware, provides the following: - Fully functional desktop [computer with pre-installed open source software stack for a functioning office setup](The%20Stack.md) - Hosted website under consumer domain - Low-code app builder with hosting under same domain - Visual automation systems - Nearly unlimited standard database storage for your contacts and information - Services for writing newsletters and running online campaigns Further, these systems are the same ones that bnkops uses, with custom apps already produced, such as: - [**bnkops Simple Targeter**](../Website%20Manuals%20🤓/bnkops%20Simple%20Targeter.md) - Simple Targeter is a open source web-app that facilitates a email campaign pointed at a single inbox. In active testing by bnkops, which manuals will be produced for free, are apps for: - Local LLM's and data computing (Ai) **Completed** - [Daisy](../Daisy%20AI%20🌻/Daisy.md) - Cloud storage & docs - Collaborative image and video editing Not only do we replace your expensive subscription software, we provide a system that is fully customize-able, accessible, locally secured, and yours to keep. Never do you have to worry about a external system going down and taking your work with it; keep it all for yourself, all the time. We don't promise this to be a easy transition. There is learning involved in this process. We have found that a computer savvy human can install this stack in a day and can become comfortable with the system in a few weeks. Taking the time to learn how to deploy your own apps will have long term benefits, such as thousands of saved dollars, and a learning that will open up a whole new world of opportunity. ### Development Path **bnkops goal is to provide pre-configured plug and play machines that come with this full stack of software pre-configured to get a organization online with a full nationbuilder alt** In that process, we hope to develop a single command install (likely using docker) that installs this software on any hardware, for free. - ~~Concept~~ - [If you do politics who is reading your secrets - why you should de-corp your software stack](../thatreallyblondehuman/Thoughts%20🤔/If%20you%20do%20politics%20who%20is%20reading%20your%20secrets%20-%20why%20you%20should%20de-corp%20your%20software%20stack.md) - Development - Campaign App - [bnkops Simple Targeter](../Website%20Manuals%20🤓/bnkops%20Simple%20Targeter.md) - Server Stack - This document. - Currently working through databasing & newsletter systems - Next up will be integrating socials and sharing systems - Deployment - Work up a docker-compose file to up the whole system. - Beta - Open now - looking for partners to use the systems as they are developed. - Alpha - Aiming for Q1 2025 - Product - Aiming for Q3 2025

Subscribe for Updates

### Does seem intimating or you just want a simpler solution? **Want to deploy on your own hardware?** We provide technical support for deployment: [send us a email](mailto:admin@thebunkerops.ca) **Don't have any budget for support?** All good, keep reading, this thorough guide will help you deploy your system on any hardware you can get your hands on. **That all sound like a lot of work and you want support along the way?** Daisy can answer your technical questions and we provide free access according to need: [Daisy](../Daisy%20AI%20🌻/Daisy.md) **Worried about your system going obsolete?** We also use the exact same system, and as long as we are doing advocacy work, we will be publishing updated manuals. Plus, if you ever need support, you get to support a local organization fighting for change in your community. **Don't want to manage your server at all?** bnkops can host your machine for you, and if you ever want to leave our services, you can have your unit delivered directly to you: [send us a email](mailto:admin@thebunkerops.ca) ## Cost Savings Total savings, for the average starter advocacy organization, we calculate to be **~$400/month.** For larger organizations with databases over 10,000 entries; this easily could be thousands of dollars in monthly savings. Over a year, savings in the tens of thousands. In a organizations lifetime, we suspect savings could enter the hundreds of thousands. | Service | Replaces | Costs/Month for bnkops server | Savings/Month | | -------------------- | ------------------------------------------- | ----------------------------- | ------------- | | Website & Host | Squarespace, Wordpress, Nationbuilder, etc. | $0/month | ~$30/month | | Automation | Zapier, App Script, etc. | $0/month | ~$250/month | | Database | Google Sheets, Nationbuilder, etc. | $0/month | ~$30/month | | Operating System | Windows, Mac, etc. | $0/month | ~$20/month | | Email Targeter | Newmode, Nationbuilder, etc. | $0/month | ~$50/month | | Knowledge Management | Notion, Notes, etc. | $0/monthj | ~$20/month | _savings calculated based on bnkops own savings_. ## Prerequisites ### Hardware bnkops uses a refurbished [HP ProDesk](https://www.amazon.ca/dp/B07DKL9KYQ?ref=ppx_yo2ov_dt_b_fed_asin_title) as hardware. System can be run on any similar hardware and we have had success deploying on used hardware for under $50. Recommend minimum hardware specifications: | RAM | Storage | Processor | Hardwire Internet Connection | | ---- | ------- | --------- | ---------------------------- | | 16GB | 256GB | 3GHZ | 1GB | Power and internet connections are required. System can be deployed over WIFI however wired connection is strongly recommend as this guide does not account for networking over WIFI. Theoretically, this system can be deployed on much less capable hardware, however we will be developing for these minimum specs. ### Operating System - Ubuntu 24 This system uses Ubuntu 24, which is a free and open-source operating system. The interface is similar to a mac computer and is quite user friendly. As a bonus, Ubunutu OS comes bundled with several open source tools, including a full office suite. If adopted, this can lead to even more savings: | Service | Replaces | Costs/Month for bnkops server | Savings/Month | | ------------------- | --------------------------- | ----------------------------- | ------------- | | Office Management | Docs, Sheets, etc. | $0/month | ~$35/month | | Cloud Storage | Dropbox, Google Cloud, etc. | $0/month | ~$30/month | | Image & PDF Editors | Adobe, PDF Expert, etc. | $0/month | ~40/month | Further, Ubuntu comes preinstalled with a app store, where you can find apps that replace nearly any standard app you would find on other operating systems. ### Cloudflare Cloudflare is a suite of security, performance, and content delivery network (CDN) services that helps protect and accelerate websites, applications, and APIs from various types of online threats, including DDoS attacks, malware, and more, while also improving page load times and user experience. We are going to make use of Cloudflare's free hosting services, specifically their dns services and tunneling, to securely get your systems online. You must open a account and host a domain with them for this guide. We will be exploring localized alternatives in the future however this has worked for us so far. [Cloudflare](https://www.cloudflare.com/) You can register a domain with them directly or transfer one. Full installation manual below. ### Email This system requires you to have a smtp capable email client. bnkops uses [Mailgun](https://www.mailgun.com/), which provides 100 emails for free a day, and has a user friendly dashboard. Almost any mailbox provider will also provide smtp compatibility. For example, [Gmail](https://apps.google.com/supportwidget/articlehome?hl=en&article_url=https%3A%2F%2Fsupport.google.com%2Fa%2Fanswer%2F176600%3Fhl%3Den&assistant_id=generic-unu&product_context=176600&product_name=UnuFlow&trigger_context=a) ships with these features on all mailboxes (however you may find your emails throttled). ## Installation ### Ubuntu [Install the latest Ubuntu release on hardware.](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) Throughout this installation, there may be dependencies that are required. Your system prompt will often tell you what is required for installation. Any average LLM, such as Daisy, will also be able to help you debug as you go. ## Getting Started Have you never used the command line? No? This section is for you! Ubuntu, and other Linux systems, do often require you to use the command line. The command line is an interface where you interact with your computer using text-based commands and inputs, allowing you to automate tasks, manage files, run programs, and access system settings. To open the command line on Ubuntu press the **Ctrl.Alt.T** keys. And voila! You'll open a command window. ![terminal](../Website%20Manuals%20🤓/terminal.png) The command window is what we will use to install most of the apps below. The default configuration of your command line also has some particular keyboard shortcuts. For example, copy and paste work slightly differently: - Copy = Ctrl.Shift.C - Paste = Ctrl.Shift.V You can read a in depth terminal guide [here](https://help.ubuntu.com/community/UsingTheTerminal?action=show&redirect=Terminal) Here is where you'll enter your commands. This build out utilizes the command line to install your software. Once you get used to it, it is by far the the best way to install applications. Along the installation journey, your system will likely require dependencies to be installed. These are just the building blocks for the wider software set. The command line feedback should give you enough information to move forward. In cases where you are stumped, Ai services like Daisy can help you debug. If you want help from a human, you can send us a email [anytime.](mailto:admin@thebunkerops.ca) ## Nice to Haves ### glances Glances is a terminal app that gives a overview of system resourcing. Helps with debugging. Think of it as your activity monitor. To instal glances: ``` pipx install glances[all] ``` To launch Glances ``` glances ``` ### terminator Terminator is a alternative terminal app (command line input) to the stock terminal app that comes with gnome. Lots of nifty features, including tiling windows. ``` sudo apt install terminator ``` To launch terminator now just press Ctrl.Alt.T ## Core Components ### curl Curl (Command Line Utility and Resource) is a powerful tool that lets you transfer data to and from servers over various protocols, such as HTTP, HTTPS, FTP, and more, using simple text-based commands. ``` sudo apt update sudo apt install curl ``` ### cloudflared tunnel A Cloudflare Tunnel is a reverse proxy service that allows you to securely expose services running on your local machine or behind a firewall to the public internet, while keeping them hidden from view and protecting them with Cloudflare's security features. It is a tunnel that puts your website online. You will need a Cloudflare account to get started, including your account identifier and password. To install run: ``` wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb dpkg -i cloudflared-linux-amd64.deb ``` Follow all on screen instructions. ### obsidian Obsidian is the knowledge app of choice and is the system in which we will write content. It will be the platform that publishes your website and manages your cloud files. We cannot praise obsidian enough. Learning this software can introduce you to a whole new way of thinking about data and infromation; empowering you to make connections in your thinking that other software simply doesn't do. A overview video on obsidian we like: [video](https://www.youtube.com/watch?v=DbsAQSIKQXk) Install through the [snap store.](https://snapcraft.io/obsidian) ### syncthing Syncthing is an open-source, peer-to-peer (P2P) syncing solution that lets you securely synchronize files across multiple devices, regardless of whether they're running the same operating system or not, using a decentralized and encrypted method. It is the system that will allow you to edit your site remotely through obsidian. Further instructions on remote editing found here: {inster link} Follow instructions for installation [here.](https://apt.syncthing.net/) If that gives you trouble, try installing through the [snap store. ](https://snapcraft.io/syncthing-gael) After installation the app will be available here: [localhost:8384](http://localhost:8384/) ### mkdocs mkdocs, specifically mkdocs-publisher, is the system that will build and serve your website. Combined with cloudflared tunnel, it will get your website online. Full tutorial here: [How to Replicate this Repo](../Website%20Manuals%20🤓/How%20to%20Replicate%20this%20Repo.md) A expanded mkdocs-publisher deployment available here: [Updated Website Install Guide](../Website%20Manuals%20🤓/Updated%20Website%20Install%20Guide.md) Documentation on how to adjust website [here](https://squidfunk.github.io/mkdocs-material/getting-started/). ### docker Docker is a containerization platform that allows you to package your applications and their dependencies into isolated, self-contained units called containers, which can be easily run on any machine with Docker installed, without worrying about conflicting libraries or environments. Set up Docker's apt repository. ``` # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update ``` Install Latest Version ``` sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` Confirm: ``` sudo docker run hello-world ``` #### Docker Compose Docker Compose is a tool that allows you to define and run multi-container Docker applications in a single command, making it easier to manage complex services and their dependencies. With Docker Compose, you can create a YAML file (called a "docker-compose.yml" file) that specifies the containers you want to run, along with their ports, volumes, and other configurations. With time, we hope to get the entire system down to a single docker-compose install command. For now we are doing everything one at a time. Install Docker Compose ``` sudo apt-get update sudo apt-get install docker-compose-plugin ``` #### Docker Network Create a network: ```bash docker network create my_network ``` ### n8n & budibase #### Intro These are two different software however this section combines them. We do so because these two software work in tandem to deliver bnkops like Simple Targeter. n8n (pronounced "eighten") is a free, open-source workflow automation tool that helps you connect and synchronize data across various services and APIs, using a visual interface to create custom workflows, making it easier to automate repetitive tasks and integrate different systems. n8n documentation here: [n8n](https://docs.n8n.io/]) Budibase is a low-code platform for building custom business applications, allowing users to design, build, and deploy web-based apps without extensive coding knowledge, using a drag-and-drop interface to connect data sources, add workflows, and create user interfaces. Budibase documentation here: [Budibase](https://docs.budibase.com/docs/what-is-budibase) #### Install First we create a docker network to nestle our two software inside. Run n8n in that network: ```bash docker run -it --rm --name n8n --network my_network -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n ``` Run Budibase in the same network: ```bash docker run -d -t \ --name=budibase \ --network my_network \ -p 10000:80 \ -v /local/path/data:/data \ --restart unless-stopped \ budibase/budibase:latest ``` #### Local Access Both of these apps will be locally accessible upon installation: - Budibase: [localhost:10000](http://localhost:10000) - n8n: [localhost:5678](http://localhost:5678) #### Public Access We are going to use cloudflare to get both of these services online (in the same process you got your website online). Manual for creating tunnels here: [Cloudflare Guide](../Website%20Manuals%20🤓/Cloudflare%20Guide.md) #### Configure Both n8n and Budibase require some configuration after start up. For both apps, you will need to input email credentials (smtp). {insert more info} ## bnkops Budibase & n8n apps ### Simple Targeter [bnkops Simple Targeter](../Website%20Manuals%20🤓/bnkops%20Simple%20Targeter.md) is a app that facilitates a email campaign pointed at a single inbox. Simple Targeter itself replaces Newmode and several Simple Targeter instances combined with you mkdocs site provides a full replacement for Nationbuilder. Simple Targeter Budibase code is available here: Simple Targeter n8n code is available here: {instert more info} ## Listmonk Listmonk is an open-source newsletter management platform written in Rust. It's designed to help publishers manage their email newsletters, including features like subscriber management, email sending, and analytics. ### Listmonk Installation #### Prerequisites - Docker and Docker Compose are installed - You have an existing Docker network named `my_network` #### Step 1: Create a Directory for Listmonk ```bash mkdir listmonk && cd listmonk ``` #### Step 2: Create docker-compose.yml Create a file named `docker-compose.yml` and add the following content: ```yaml version: '3' services: listmonk: image: listmonk/listmonk:latest container_name: listmonk restart: unless-stopped environment: - TZ=UTC volumes: - ./config.toml:/listmonk/config.toml depends_on: - db networks: - my_network db: image: postgres:12 container_name: listmonk_db restart: unless-stopped environment: - POSTGRES_PASSWORD=your_strong_database_password - POSTGRES_USER=listmonk - POSTGRES_DB=listmonk volumes: - ./listmonk-data:/var/lib/postgresql/data networks: - my_network networks: my_network: external: true ``` Replace `your_strong_database_password` with a secure password. #### Step 3: Create config.toml Create a file named `config.toml` and add the following content: ```toml [app] address = "0.0.0.0:9000" admin_username = "listmonk" admin_password = "your_secure_admin_password" [db] host = "listmonk_db" port = 5432 user = "listmonk" password = "your_strong_database_password" database = "listmonk" ssl_mode = "disable" [privacy] individual_tracking = false ``` Replace `your_secure_admin_password` with a strong password for the admin account, and ensure `your_strong_database_password` matches the one in `docker-compose.yml`. #### Step 4: Initialize the Database Run the following command to initialize the database: ```bash docker compose run --rm listmonk ./listmonk --install ``` #### Step 5: Start Listmonk Start the Listmonk services: ```bash docker compose up -d ``` #### Step 6: Access Listmonk Listmonk should now be accessible at `http://localhost:9000`. Use the `admin_username` and `admin_password` from your `config.toml` to log in. #### Troubleshooting If you encounter any issues, you can check the logs: ```bash docker compose logs listmonk docker compose logs db ``` #### Updating Listmonk To update Listmonk in the future, run: ```bash docker compose pull docker compose up -d ``` Remember to back up your data before updating. #### Configure Listmonk also requires some internal configuration. How to update your public form: [Customizing Your Listmonk Subscription Form](../Website%20Manuals%20🤓/Customizing%20Your%20Listmonk%20Subscription%20Form.md) smtp public address {insert more info} #### Security Notes - Change the default admin username and password in `config.toml`. - Ensure your firewall is configured to protect the Listmonk port (9000) if exposed. - Regularly update Listmonk and its dependencies. ![Venus1](thatreallyblondehuman/Thoughts%20🤔/Venus1.png)