This Docker Compose setup provides a Bitcoin Core node with a secure Nginx reverse proxy that handles SSL termination for JSON-RPC calls.
- Bitcoin Core node with JSON-RPC enabled
- Nginx reverse proxy with automatic SSL certificate management via certbot
- Secure HTTPS access to Bitcoin Core JSON-RPC API
- Docker and Docker Compose
- Domain name pointing to your server
- Basic understanding of Bitcoin Core and nginx configuration
-
Clone this repository
-
Copy
.env.example
to.env
and fill in the required values:RPC_AUTH=your_rpc_auth_string RPC_PASSWORD=your_rpc_password
-
Update the nginx configuration in
user_conf.d/
with your:- Domain name
- Bitcoin Core RPC authentication token
-
Configure
nginx-certbot.env
with your:- Email address for Let's Encrypt notifications
- Domain name
-
Start the services:
docker compose up -d
Bitcoin blockchain data is stored in /data/btc
on the host machine.
SSL certificates are stored in a Docker volume named nginx_secrets
.
- Bitcoin Core: 8332 (RPC), 8333 (P2P)
- Nginx: 80 (HTTP), 443 (HTTPS)