- host bolt cards
- web admin
- low resource use
- Phoenix Server
- SQLite database
- docker deployment
- provision an m.1s VPS on lunanode using the
Debian 12 64-bit
template
($3.50 per month, LunaNode accept bitcoin and are lighting enabled for payments) - log in to the machine using SSH (Linux) or Putty (Windows)
- install docker
- enable managing docker as a non root user
- initialise the system as below
- enter
hub.yourdomain.com
and set up an A record pointing to the VPS
docker volume create phoenix_data
docker volume create caddy_data
docker volume create caddy_config
docker volume create card_data
git clone https://github.com/boltcard/hub
cd hub
./docker_init.sh
- for a full local build from source and start
docker compose build
docker compose up
- optional stage to remove a Caddy note about buffer sizes and maybe increase performance
sudo nano /etc/sysctl.d/60-custom-network.conf
- add these lines and reboot
net.core.rmem_max=7500000
net.core.wmem_max=7500000
- wait for a few minutes for the TLS certificate to be installed
- access the admin web interface at https://domain-name/admin/ to set a password and login
docker compose up -d
docker compose logs -f
sudo cat /var/lib/docker/volumes/hub_phoenix_data/_data/seed.dat ; echo
sudo apt install sqlite3
sudo sqlite3 /var/lib/docker/volumes/hub_card_data/_data/cards.db
sqlite> .tables
sqlite> .schema settings
sqlite> select * from settings;
sqlite> update settings set value='' where name='admin_password_hash';
sqlite> .quit
sqlite> .dump cards
sudo rm /var/lib/docker/volumes/hub_card_data/_data/cards.db
docker container ps
docker exec -it ContainerId sh
df -h
docker system df
docker system prune
- docker compose suggests adding
export COMPOSE_BAKE=true
to your .profile, don't do this (March 2025), it doesn't alway pick up changes - to persist the docker compose environment across reboots for production use
sudo nano /etc/systemd/system/docker-compose-app.service
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/path/to/your/docker/compose/directory
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
[Install]
WantedBy=multi-user.target
sudo systemctl enable docker-compose-app.service
sudo systemctl start docker-compose-app.service