Attempt at an installation and configuration script on "bare metal" for the Fediverse enabled social networking app Bonfire.
Go to file
CSnap 7325976ebd Update README 2025-08-21 01:04:38 -04:00
LICENSE Initial commit 2025-08-21 00:43:11 -04:00
README.md Update README 2025-08-21 01:04:38 -04:00
bonfire_turnkey.sh Add installer 2025-08-21 01:03:50 -04:00

README.md

Bonfire Automated Installer

This repository provides a single script that installs, configures, and deploys the Bonfire federated platform on a fresh Ubuntu 24.04 server with Nginx and Lets 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 Lets Encrypt.

Requirements

  • Fresh Ubuntu 22.04+ or Debian 12+ server.
  • A fully qualified domain name (FQDN) pointing to the servers IP.
  • Root or sudo access.

Installation

1. Download the installer

git clone https://your-repo-url/bonfire-installer.git
cd bonfire-installer
chmod +x install_bonfire.sh

2 . Run the installer

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

sudo systemctl start bonfire
sudo systemctl stop bonfire
sudo systemctl restart bonfire
sudo systemctl status bonfire

Verify Nginx + SSL

sudo nginx -t
sudo systemctl reload nginx

Access the App

Once installation is complete, open:

https://yourdomain.com

Updating Bonfire

When new versions are released:

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:

journalctl -u bonfire -f

Uninstall

To remove Bonfire and related services:

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 domains 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 Lets Encrypt.