Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/build-namecoin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Namecoin Images

on:
workflow_dispatch:

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
matrix:
include:
- context: namecoin/namecoind
image: ghcr.io/mstrofnone/namecoin-core-umbrel
- context: namecoin/web
image: ghcr.io/mstrofnone/namecoin-core-umbrel-web

steps:
- uses: actions/checkout@v4

- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/setup-buildx-action@v3

- uses: docker/build-push-action@v5
id: build
with:
context: ${{ matrix.context }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ matrix.image }}:30.2

- name: Print digest
run: echo "${{ matrix.image }} digest=${{ steps.build.outputs.digest }}"
33 changes: 33 additions & 0 deletions namecoin/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: "3.7"

services:
app_proxy:
environment:
APP_HOST: namecoin_web_1
APP_PORT: 18080

namecoind:
image: ghcr.io/mstrofnone/namecoin-core-umbrel:30.2

Check failure on line 10 in namecoin/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Invalid image name "ghcr.io/mstrofnone/namecoin-core-umbrel:30.2"

Error: HTTP 401 for ghcr.io/mstrofnone/namecoin-core-umbrel:30.2: {"errors":[{"code":"UNAUTHORIZED","message":"authentication required"}]}

Check failure on line 10 in namecoin/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Invalid image name "ghcr.io/mstrofnone/namecoin-core-umbrel:30.2"

Images should be named like "<name>:<version-tag>@<sha256>"
user: "1000:1000"
restart: on-failure
stop_grace_period: 15m30s
volumes:

Check notice on line 14 in namecoin/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Mounted file/directory "/namecoin/data/namecoind" doesn't exist

The volume "${APP_DATA_DIR}/data/namecoind:/data/.namecoin" tries to mount the file/directory "/namecoin/data/namecoind", but it is not present. This can lead to permission errors!
- ${APP_DATA_DIR}/data/namecoind:/data/.namecoin
environment:
NAMECOIN_RPC_USER: umbrel
NAMECOIN_RPC_PASS: namecoinrpc
ports:

Check notice on line 19 in namecoin/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

External port mapping "${APP_NAMECOIN_P2P_PORT}:8334"

Port mappings may be unnecessary for the app to function correctly. Docker's internal DNS resolves container names to IP addresses within the same network. External access to the web interface is handled by the app_proxy container. Port mappings are only needed if external access is required to a port not proxied by the app_proxy, or if an app needs to expose multiple ports for its functionality (e.g., DHCP, DNS, P2P, etc.).
- "${APP_NAMECOIN_P2P_PORT}:8334"

web:
image: ghcr.io/mstrofnone/namecoin-core-umbrel-web:30.2

Check failure on line 23 in namecoin/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Lint apps

Invalid image name "ghcr.io/mstrofnone/namecoin-core-umbrel-web:30.2"

Images should be named like "<name>:<version-tag>@<sha256>"
user: "1000:1000"
restart: on-failure
environment:
NAMECOIND_HOST: namecoin_namecoind_1
NAMECOIND_RPC_PORT: 8336
NAMECOIND_RPC_USER: umbrel
NAMECOIND_RPC_PASS: namecoinrpc
PORT: 18080
depends_on:
- namecoind
6 changes: 6 additions & 0 deletions namecoin/exports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export APP_NAMECOIN_NODE_IP="10.21.22.10"
export APP_NAMECOIN_WEB_IP="10.21.22.11"
export APP_NAMECOIN_P2P_PORT="8334"
export APP_NAMECOIN_RPC_PORT="8336"
export APP_NAMECOIN_RPC_USER="umbrel"
export APP_NAMECOIN_RPC_PASS="namecoinrpc"
10 changes: 10 additions & 0 deletions namecoin/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions namecoin/namecoind/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Namecoin Core daemon for Umbrel
# Build and push as: ghcr.io/mstrofnone/namecoin-core-umbrel:30.2

# Stage 1: Build from source
FROM debian:bookworm-slim AS builder

ARG NAMECOIN_VERSION=nc30.2

RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
cmake \
curl \
git \
libevent-dev \
libboost-dev \
libdb5.3++-dev \
libsqlite3-dev \
libzmq3-dev \
pkg-config \
pkgconf \
python3 \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /build
RUN git clone --depth 1 --branch ${NAMECOIN_VERSION} https://github.com/namecoin/namecoin-core.git

WORKDIR /build/namecoin-core
RUN cmake -B build \
-DBUILD_GUI=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_BENCH=OFF \
-DENABLE_IPC=OFF \
-DWITH_ZMQ=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local
RUN cmake --build build -j$(nproc)
RUN mkdir -p /output/usr/local/bin && \
cp build/src/namecoind build/src/namecoin-cli build/src/namecoin-tx /output/usr/local/bin/ 2>/dev/null || \
cp build/src/bitcoin build/src/bitcoin-cli build/src/bitcoin-tx /output/usr/local/bin/ 2>/dev/null

# Stage 2: Runtime
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y \
bash \
ca-certificates \
curl \
libevent-2.1-7 \
libdb5.3++ \
libsqlite3-0 \
libzmq5 \
tini \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /output/usr/local/bin/ /usr/local/bin/
# Namecoin Core nc30.x builds binaries named 'bitcoin', 'bitcoin-cli', 'bitcoin-tx'
# Create symlinks for namecoin-prefixed names
RUN for bin in bitcoin bitcoin-cli bitcoin-tx; do \
if [ -f /usr/local/bin/$bin ]; then \
ln -sf $bin /usr/local/bin/namecoin${bin#bitcoin}; \
fi; \
done

COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh

RUN mkdir -p /data/.namecoin && chown -R 1000:1000 /data

EXPOSE 8334 8336

ENTRYPOINT ["tini", "--", "entrypoint.sh"]
36 changes: 36 additions & 0 deletions namecoin/namecoind/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
set -euo pipefail

CONF_FILE="/data/.namecoin/namecoin.conf"

RPC_USER="${NAMECOIN_RPC_USER:-umbrel}"
RPC_PASS="${NAMECOIN_RPC_PASS:-namecoinrpc}"

cat > "$CONF_FILE" <<EOF
# Namecoin Core configuration for Umbrel
server=1
listen=1
bind=0.0.0.0
port=8334

# RPC
rpcuser=${RPC_USER}
rpcpassword=${RPC_PASS}
rpcbind=0.0.0.0
rpcport=8336
rpcallowip=0.0.0.0/0

# Data
datadir=/data/.namecoin
txindex=1
namehistory=1

# Performance
dbcache=450
maxconnections=125

# Logging
printtoconsole=1
EOF

exec namecoind -datadir=/data/.namecoin -conf="$CONF_FILE" "$@"
48 changes: 48 additions & 0 deletions namecoin/umbrel-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
manifestVersion: 1
id: namecoin
category: bitcoin
name: Namecoin Core
version: "30.2"
tagline: Run a Namecoin full node — the first Bitcoin fork, powering decentralized DNS and identity
description: >-
Namecoin is a decentralized, open source information registration and transfer system based on
the Bitcoin cryptocurrency. It was the first fork of Bitcoin and the first to implement merged
mining and a decentralized DNS.


Namecoin Core is the reference full node implementation. Running your own Namecoin node allows
you to independently verify the Namecoin blockchain, register and manage .bit domain names,
store identity information, and transact NMC without trusting any third party.


Key features:

- Full blockchain validation and peer-to-peer networking

- Name registration, lookup, update, and renewal via RPC

- Built-in wallet for NMC transactions

- Merged mining support (mine NMC alongside BTC)

- Transaction index for full blockchain querying

- Configurable pruning to save disk space


The Namecoin blockchain is significantly smaller than Bitcoin's, making it practical to run
a full archival node even on modest hardware like a Raspberry Pi.
releaseNotes: ""
developer: Namecoin Developers
website: https://www.namecoin.org/
dependencies: []
repo: https://github.com/namecoin/namecoin-core
support: https://github.com/namecoin/namecoin-core/issues
port: 18080
gallery: []
path: ""
defaultUsername: ""
defaultPassword: ""
torOnly: false
submitter: mstrofnone
submission: https://github.com/getumbrel/umbrel-apps/pull/4962
16 changes: 16 additions & 0 deletions namecoin/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Simple web interface showing Namecoin Core connection info
# Build and push to Docker Hub as: namecoin/namecoin-core-umbrel-web:30.2

FROM node:20-slim

WORKDIR /app

COPY package.json .
RUN npm install --production

COPY server.js .
COPY public/ public/

EXPOSE 18080

CMD ["node", "server.js"]
12 changes: 12 additions & 0 deletions namecoin/web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "namecoin-core-umbrel-web",
"version": "30.2.0",
"description": "Simple web interface for Namecoin Core on Umbrel",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.18.2"
}
}
Loading
Loading