Skip to content

boltcard/hub

Repository files navigation

Bolt Card Hub - Phoenix Edition

A lightweight, self-hosted service for hosting NFC Bolt Cards on the Lightning Network, powered by phoenixd.

Features

  • host bolt cards
  • web admin
  • low resource use

Technologies

  • Phoenix Server
  • SQLite database
  • docker deployment

Install

  • provision an m.1s VPS on lunanode using the Debian 12 64-bit template ($3.50 per month, LunaNode accept bitcoin and are lightning enabled for payments)
  • log in to the machine using SSH (Linux) or Putty (Windows)
  • install docker
  • enable managing docker as a non root user
  • add swap space (the Go build needs more memory than the 1GB VPS provides)
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
  • set up a DNS A record pointing hub.yourdomain.com to the VPS IP address
git clone https://github.com/boltcard/hub
cd hub
cp .env.example .env
# Edit .env to set HOST_DOMAIN=hub.yourdomain.com
  • build and start the services
docker compose build
docker compose up -d

Operations

View the Logs

docker compose logs

Access the Database

docker compose exec card sqlite3 /card_data/cards.db

Get a Shell on a Container

docker exec -it phoenix bash
./phoenix-cli
docker exec -it card bash
./app

Update

git pull
docker compose down
docker compose build
docker compose up -d
docker system prune

About

Bolt Card Hub - Phoenix Edition

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •