From 7325976ebd84033ced98f13aa8b5d2713e136563 Mon Sep 17 00:00:00 2001 From: CSnap Date: Thu, 21 Aug 2025 01:04:38 -0400 Subject: [PATCH] Update README --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d044b8a..5c87fa6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,94 @@ -# bonfirestarter +# Bonfire Automated Installer -Attempt at an installation and configuration script on "bare metal" for the Fediverse enabled social networking app Bonfire. \ No newline at end of file +This repository provides a single script that installs, configures, and deploys the [Bonfire federated platform](https://bonfirenetworks.org/) on a fresh Ubuntu 24.04 server with Nginx and Let’s Encrypt SSL. + +--- + +## Features + +- Automated installation of dependencies (Postgres, Elixir, Node.js, Nginx, Certbot). +- Prompts for domain, email, and database password. +- Automatic DNS/FQDN validation (checks A/AAAA records). +- Configures Bonfire as a `systemd` service. +- HTTPS enabled via Let’s Encrypt. + +--- + +## Requirements + +- Fresh Ubuntu 22.04+ or Debian 12+ server. +- A fully qualified domain name (FQDN) pointing to the server’s IP. +- Root or sudo access. + + + +## Installation + +### 1. Download the installer +```bash +git clone https://your-repo-url/bonfire-installer.git +cd bonfire-installer +chmod +x install_bonfire.sh +``` +### 2 . Run the installer +```bash +sudo ./install_bonfire.sh +``` +The script will: + - Prompt for your **domain name**, **email address**, and **database password**. + - Validate that your domain resolves correctly (A/AAAA DNS records). + - Install required system packages. + - Configure Postgres and Bonfire. + - Set up Nginx with SSL. + - Create a `systemd` service for Bonfire. + +## Usage + +### Start/Stop/Restart Bonfire +```bash +sudo systemctl start bonfire +sudo systemctl stop bonfire +sudo systemctl restart bonfire +sudo systemctl status bonfire +``` +---------- +### Verify Nginx + SSL +```bash +sudo nginx -t +sudo systemctl reload nginx +``` +### Access the App +Once installation is complete, open: +```http +https://yourdomain.com +``` +## Updating Bonfire +When new versions are released: +```bash +cd /opt/bonfire +sudo -u bonfire git pull +sudo -u bonfire MIX_ENV=prod mix compile +sudo -u bonfire MIX_ENV=prod mix ecto.migrate +sudo systemctl restart bonfire +``` +## Logs +View logs for troubleshooting: +```bash +journalctl -u bonfire -f +``` +## Uninstall +To remove Bonfire and related services: +```bash +sudo systemctl stop bonfire +sudo systemctl disable bonfire +sudo rm -rf /opt/bonfire +sudo deluser --remove-home bonfire +sudo -u postgres dropdb bonfire +sudo -u postgres dropuser bonfire +sudo rm /etc/systemd/system/bonfire.service +sudo systemctl daemon-reload +``` +## Notes + - Ensure your domain’s DNS records are properly configured **before** running the installer. + - The script is intended for production use on a dedicated server or VM. + - For staging/testing, you may adapt the script to use self-signed certificates instead of Let’s Encrypt.