|
|
||
|---|---|---|
| LICENSE | ||
| README.md | ||
| bonfire_turnkey.sh | ||
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 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
systemdservice. - 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
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 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.