A secure Node.js microservice for creating and managing Hive blockchain accounts. Built with TypeScript, Express, and the official Hive @hiveio/dhive library. Features two-step account creation, emergency key recovery, and Docker + Tailscale deployment.
Production URL: https://minivlad.tail9656d3.ts.net
Health Check: https://minivlad.tail9656d3.ts.net/healthz
- 🔒 Secure by Default: Authentication via token, rate limiting, helmet security headers
- 🚀 TypeScript: Strict type checking and enhanced developer experience
- 📊 Structured Logging: JSON logging with Pino and request tracing
- 🔑 Account Creation: Create Hive accounts using claimed account credits
- 🧭 Two-step Account Creation: Prepare account + finalize flow with session management
- 💾 Emergency Key Storage: Local temporary key backup for recovery scenarios
- 💰 Resource Credits: Claim account credits using RC instead of HIVE tokens
- 🐳 Docker Ready: Multi-stage Dockerfile with non-root user
- 🌐 Tailscale Integration: Permanent hosting via Tailscale Funnel
- ⚡ Production Ready: Auto-restart, health checks, CORS support
- Node.js 20.x or higher
- A Hive account with sufficient Resource Credits (RC)
- Active private key for the creator account (WIF)
- Clone the repository:
git clone https://github.com/SkateHive/account-manager.git
cd account-manager- Install dependencies:
npm install- Create environment configuration:
cp .env.example .env-
Edit
.envand configure your environment variables (see Configuration section) -
Start development server:
npm run devNote: recent changes introduced a two-step account creation flow and emergency key storage; see the "Two-step API" and "Emergency Key Storage" sections below.
- Build the Docker image:
docker build -t skatehive-hive-signer .- Run the container:
docker run -d \
--name hive-signer \
-p 3000:3000 \
-e HIVE_NODE_URL=https://api.hive.blog \
-e HIVE_CREATOR=your-account \
-e HIVE_CREATOR_ACTIVE_WIF=5YourPrivateKey \
-e SIGNER_TOKEN=your-secure-token \
-e PORT=3000 \
-e NODE_ENV=production \
skatehive-hive-signerAll configuration is done via environment variables:
| Variable | Description | Required | Default |
|---|---|---|---|
HIVE_NODE_URL |
Hive API node URL | Yes | https://api.hive.blog |
HIVE_CREATOR |
Hive account name that creates accounts | Yes | - |
HIVE_CREATOR_ACTIVE_WIF |
Active private key (WIF format) of creator | Yes | - |
SIGNER_TOKEN |
Secret token for API authentication | Yes | - |
PORT |
Server port | No | 3000 |
NODE_ENV |
Environment (development/production/test) | No | development |
EMERGENCY_STORAGE_PATH |
Local path for temporary emergency key storage | No | ./emergency-recovery |
- Docker installed and running
- Tailscale connected with Funnel enabled
- Configure environment:
# Copy and edit production config
cp .env.production.example .env.production
# Edit .env.production with your values- Deploy:
# Make scripts executable and deploy
chmod +x deploy.sh configure-production.sh
./configure-production.sh # Copies from .env to .env.production
./deploy.sh # Builds and deploys Docker container- Your service is now live at:
- Public URL:
https://minivlad.tail9656d3.ts.net - Local URL:
http://localhost:3001
- Public URL:
- HIVE_NODE_URL: The Hive RPC node to connect to. Use a reliable public node or your own.
- HIVE_CREATOR: Your Hive account that will create new accounts. Must have sufficient RC.
- HIVE_CREATOR_ACTIVE_WIF: The active private key of your creator account. Keep this secure!
- SIGNER_TOKEN: A random secure token (minimum 32 characters) for API authentication.
# Linux/Mac
openssl rand -hex 32
# Or using Node.js
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Check service availability and optionally validate authentication:
GET /healthz
# Optional: x-signer-token header for auth validationResponse:
{
"status": "ok",
"timestamp": "2025-10-31T12:34:56.789Z",
"auth": "valid" | "invalid" | "not-provided"
}Claim a Hive account creation credit using Resource Credits:
POST /claim-account
Headers: { x-signer-token: your-secure-token }Reserve a session and verify account name availability:
POST /prepare-account
Headers: {
x-signer-token: your-secure-token,
Content-Type: application/json
}
Body: { "new_account_name": "desiredname" }Response:
{
"session_id": "uuid-session-id",
"expires_at": "2025-10-31T12:15:00.000Z"
}Finalize account creation with session and authorities:
POST /create-claimed-account
Headers: {
x-signer-token: your-secure-token,
Content-Type: application/json
}
Body: {
"session_id": "uuid-from-prepare",
"new_account_name": "desiredname",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM8ownerkey...", 1]]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM8activekey...", 1]]
},
"posting": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM8postingkey...", 1]]
},
"memo_key": "STM8memokey...",
"signature_proof": "signature-or-proof"
}Success Response:
{
"success": true,
"transaction_id": "hive-transaction-id",
"account_name": "desiredname",
"message": "Account created successfully"
}class HiveAccountService {
constructor(baseUrl = 'https://minivlad.tail9656d3.ts.net', signerToken) {
this.baseUrl = baseUrl;
this.headers = {
'Content-Type': 'application/json',
'x-signer-token': signerToken
};
}
async checkHealth() {
const response = await fetch(`${this.baseUrl}/healthz`, {
headers: { 'x-signer-token': this.headers['x-signer-token'] }
});
return response.json();
}
async prepareAccount(accountName) {
const response = await fetch(`${this.baseUrl}/prepare-account`, {
method: 'POST',
headers: this.headers,
body: JSON.stringify({ new_account_name: accountName })
});
return response.json();
}
async createAccount(sessionId, accountName, authorities, signatureProof) {
const response = await fetch(`${this.baseUrl}/create-claimed-account`, {
method: 'POST',
headers: this.headers,
body: JSON.stringify({
session_id: sessionId,
new_account_name: accountName,
...authorities,
signature_proof: signatureProof
})
});
return response.json();
}
}
// Usage
const service = new HiveAccountService('https://minivlad.tail9656d3.ts.net', 'your-token');
// Test health and auth
const health = await service.checkHealth();
console.log('Service health:', health); // { status: 'ok', auth: 'valid' }
// Two-step account creation
const { session_id } = await service.prepareAccount('newuser123');
const result = await service.createAccount(session_id, 'newuser123', authorities, proof);# Test health endpoint
curl https://minivlad.tail9656d3.ts.net/healthz
# Test with authentication
curl -H "x-signer-token: YOUR_TOKEN" https://minivlad.tail9656d3.ts.net/healthz
# Test prepare account
curl -X POST https://minivlad.tail9656d3.ts.net/prepare-account \
-H "x-signer-token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"new_account_name": "testuser123"}'curl -X POST http://localhost:3000/claim-account \
-H "x-signer-token: your-secure-token"- Prepare the account:
curl -X POST http://localhost:3000/prepare-account \
-H "x-signer-token: your-secure-token" \
-H "Content-Type: application/json" \
-d '{"new_account_name": "testuser123"}'-
Frontend generates keys locally and builds authority objects using public WIF keys.
-
Finalize creation with
session_id:
curl -X POST http://localhost:3000/create-claimed-account \
-H "x-signer-token: your-secure-token" \
-H "Content-Type: application/json" \
-d '{
"session_id": "the-session-id-from-prepare",
"new_account_name": "testuser123",
"owner": { "weight_threshold": 1, "account_auths": [], "key_auths": [["STM8...",1]] },
"active": { "weight_threshold": 1, "account_auths": [], "key_auths": [["STM8...",1]] },
"posting": { "weight_threshold": 1, "account_auths": [], "key_auths": [["STM8...",1]] },
"memo_key": "STM8...",
"signature_proof": "..."
}'- NEVER commit private keys to version control.
- NEVER log private keys or the
HIVE_CREATOR_ACTIVE_WIFenvironment variable. - Store the active WIF only in environment variables or a secrets manager.
- Use secret management systems (AWS Secrets Manager, HashiCorp Vault) in production.
- Rotate the
SIGNER_TOKENregularly. - Use different tokens for different environments.
The service implements two layers of rate limiting:
- Global: 120 requests per 15 minutes per IP
- Account Operations: 30 requests per 15 minutes per IP
All protected endpoints require the x-signer-token header. Keep this token secure and rotate it regularly.
CORS is disabled by default. Enable only if needed and configure allowed origins in src/server.ts.
- Use HTTPS in production (configure via reverse proxy like nginx).
- Restrict access to the service using firewall rules.
- Consider running behind a VPN or using IP whitelisting.
npm run dev- Start development server with hot reloadnpm run build- Build TypeScript to JavaScriptnpm start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issues automatically
deploy.sh- Complete Docker deployment with Tailscale Funnel setupconfigure-production.sh- Helper to setup production environment from development configtest-2step-creation.sh- Integration testing script for two-step account creation flow
# Make scripts executable
chmod +x deploy.sh configure-production.sh test-2step-creation.sh
# Setup and deploy
./configure-production.sh # Setup production config
./deploy.sh # Deploy Docker container with Tailscale
# Test the deployment
./test-2step-creation.sh # Integration test (optional)This service integrates seamlessly with existing Docker infrastructure:
- ✅ Docker multi-service setup (VSC node, Bitcoin, MongoDB, etc.)
- ✅ Tailscale with Funnel:
minivlad.tail9656d3.ts.net - ✅ Port management: Service runs on port 3001, proxied via Tailscale
Internet → Tailscale Funnel → Docker Container (port 3001) → Account Manager
# Build image
docker build -t skatehive-account-manager .
# Run container
docker run -d \
--name skatehive-account-manager \
--restart unless-stopped \
-p 3001:3000 \
--env-file .env.production \
skatehive-account-manager
# Enable Tailscale Funnel (new syntax)
/Applications/Tailscale.app/Contents/MacOS/Tailscale funnel --bg 3001
# Check status
docker ps --filter name=skatehive-account-managerversion: '3.8'
services:
account-manager:
build: .
container_name: skatehive-account-manager
restart: unless-stopped
ports:
- "3001:3000"
environment:
- NODE_ENV=production
- HIVE_NODE_URL=${HIVE_NODE_URL}
- HIVE_CREATOR=${HIVE_CREATOR}
- HIVE_CREATOR_ACTIVE_WIF=${HIVE_CREATOR_ACTIVE_WIF}
- SIGNER_TOKEN=${SIGNER_TOKEN}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/healthz"]
interval: 30s
timeout: 10s
retries: 3
networks:
- skatehive-network# .env.production
HIVE_NODE_URL=https://api.hive.blog
HIVE_CREATOR=your-creator-account
HIVE_CREATOR_ACTIVE_WIF=5YourActivePrivateKeyHere
SIGNER_TOKEN=your-secure-32-character-token
NODE_ENV=production
PORT=3000.
├── src/
│ ├── config/
│ │ └── env.ts # Environment variable validation
│ ├── lib/
│ │ ├── hive.ts # Hive blockchain client and operations
│ │ └── validators.ts # Zod validation schemas
│ ├── middleware/
│ │ ├── auth.ts # Authentication middleware
│ │ └── rate.ts # Rate limiting middleware
│ ├── routes/
│ │ ├── accounts.ts # Account creation endpoints
│ │ └── health.ts # Health check endpoint
│ └── server.ts # Express app and server setup
├── .env.example # Example environment configuration
├── .eslintrc.json # ESLint configuration
├── Dockerfile # Multi-stage Docker build
├── nodemon.json # Nodemon configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Additional important files/directories (recent additions):
src/lib/session-storage.ts- In-memory session storage for the two-step prepare/confirm flow. Sessions are short-lived and meant to prevent replay attacks.src/lib/emergency-storage.ts- Local, temporary emergency key storage (filesystem). Files are created with restricted permissions and the directory is gitignored. Use only as last-resort recovery.
The service uses Pino for structured JSON logging with the following features:
- Request IDs for distributed tracing
- Automatic redaction of sensitive fields (tokens, private keys)
- Different log levels based on HTTP status codes
- Pretty printing in development mode
- JSON output in production for log aggregation
- Validation Errors (400): Check the JSON body against the Zod schemas in
src/lib/validators.ts. - Authentication Errors (401): Verify the
x-signer-tokenheader. - Rate Limit Errors (429): Respect the rate limits or increase limits in middleware configuration.
- Blockchain Errors (502): Check the configured Hive node and RC availability.
- "Non-base58 character" errors when creating PrivateKey objects: Ensure keys are in correct WIF format when passed to
@hiveio/dhive. When generating deterministic keys locally, convert to WIF before sending or use the server helper that returns WIF if appropriate.
Local temporary key backup system for recovery scenarios:
- Path:
./emergency-recovery(configurable viaEMERGENCY_STORAGE_PATH) - Permissions: Files written with 0600 (owner read/write only)
- Git-ignored: Directory excluded from version control
- Development only: Use secrets manager in production
# List stored accounts (development only)
GET /emergency/accounts
Headers: { x-signer-token: your-token }
# Retrieve keys for specific account
GET /emergency/retrieve/:accountName
Headers: { x-signer-token: your-token }- Start the server in dev mode:
npm run dev- Prepare account (replace host/port as needed):
curl -X POST http://localhost:3000/prepare-account \
-H "x-signer-token: your-secure-token" \
-H "Content-Type: application/json" \
-d '{"new_account_name": "testuser123"}'-
Generate keys locally in your frontend or test harness (owner/active/posting/memo). Build the authorities objects using public WIF keys.
-
Finalize creation with proof and the
session_id:
curl -X POST http://localhost:3000/create-claimed-account \
-H "x-signer-token: your-secure-token" \
-H "Content-Type: application/json" \
-d '{
"session_id": "the-session-id-from-prepare",
"new_account_name": "testuser123",
"owner": { "weight_threshold": 1, "account_auths": [], "key_auths": [["STM8...",1]] },
"active": { "weight_threshold": 1, "account_auths": [], "key_auths": [["STM8...",1]] },
"posting": { "weight_threshold": 1, "account_auths": [], "key_auths": [["STM8...",1]] },
"memo_key": "STM8...",
"signature_proof": "..."
}'If the frontend could not persist the private keys, check the emergency storage (local only) for a recovery copy — but only if you intentionally enabled or allowed emergency recovery in development.
200- Success400- Validation Error (check request body format)401- Authentication Error (invalid x-signer-token)409- Account name already exists429- Rate limit exceeded502- Blockchain error (insufficient RC, network issues)
{
"error": "Error Type",
"message": "Human readable message",
"details": "Additional context or validation errors"
}- Global: 120 requests per 15 minutes per IP
- Account Operations: 30 requests per 15 minutes per IP
- Development:
localhost:3000,localhost:3001,localhost:5173,localhost:8080 - Production:
https://skatehive.app,https://www.skatehive.app
- Expiration: 15 minutes for account preparation sessions
- Single-use: Sessions invalidated after account creation
- Cleanup: Automatic cleanup of expired sessions
- CORS Error: Verify origin matches allowed domains
- "Non-base58 character": Keys must be in WIF format for
@hiveio/dhive - Session expired: Sessions expire in 15 minutes, prepare new session
- Rate limited: Respect rate limits or increase in middleware config
- Auth invalid: Double-check
x-signer-tokenmatches server config
# Basic connectivity
curl https://minivlad.tail9656d3.ts.net/healthz
# With authentication test
curl -H "x-signer-token: YOUR_TOKEN" https://minivlad.tail9656d3.ts.net/healthz
# Expected responses:
# {"status":"ok","timestamp":"...","auth":"valid"} - ✅ Ready
# {"status":"ok","timestamp":"...","auth":"invalid"} - ❌ Wrong token
# {"status":"ok","timestamp":"...","auth":"not-provided"} - ⚠️ No token- ✅ Two-step account creation with session management
- ✅ Emergency key storage for development recovery
- ✅ Docker + Tailscale deployment integration
- ✅ Enhanced health endpoint with auth validation
- ✅ CORS support for frontend integration
- ✅ Production deployment scripts and automation
- ✅ Comprehensive documentation consolidation
- Configure
.env.productionwith real values - Test health endpoint:
curl https://minivlad.tail9656d3.ts.net/healthz - Verify Docker container is healthy:
docker ps --filter name=skatehive-account-manager - Confirm Tailscale Funnel is active:
/Applications/Tailscale.app/Contents/MacOS/Tailscale funnel status - Test frontend integration with two-step flow
- Monitor container logs:
docker logs skatehive-account-manager - Set up log aggregation for production monitoring
- Configure secrets management for production keys
- Test emergency recovery procedures (development only)
🎯 Quick Start: Run ./deploy.sh after configuring .env.production to get your permanent Hive account creation service running at https://minivlad.tail9656d3.ts.net
A secure Node.js microservice for creating and managing Hive blockchain accounts. Built with TypeScript, Express, and the official Hive dhive library.
- 🔒 Secure by Default: Authentication via token, rate limiting, helmet security headers
- 🚀 TypeScript: Strict type checking and enhanced developer experience
- 📊 Structured Logging: JSON logging with Pino and request tracing
- 🔑 Account Creation: Create Hive accounts using claimed account credits
- 💰 Resource Credits: Claim account credits using RC instead of HIVE tokens
- 🐳 Docker Ready: Multi-stage Dockerfile with non-root user
- ⚡ Production Ready: Graceful shutdown, error handling, health checks
- Node.js 20.x or higher
- A Hive account with sufficient Resource Credits (RC)
- Active private key for the creator account
- Clone the repository:
git clone https://github.com/SkateHive/account-manager.git
cd account-manager- Install dependencies:
npm install- Create environment configuration:
cp .env.example .env-
Edit
.envand configure your environment variables (see Configuration section) -
Start development server:
npm run dev- Build the Docker image:
docker build -t skatehive-hive-signer .- Run the container:
docker run -d \
--name hive-signer \
-p 3000:3000 \
-e HIVE_NODE_URL=https://api.hive.blog \
-e HIVE_CREATOR=your-account \
-e HIVE_CREATOR_ACTIVE_WIF=5YourPrivateKey \
-e SIGNER_TOKEN=your-secure-token \
-e PORT=3000 \
-e NODE_ENV=production \
skatehive-hive-signerAll configuration is done via environment variables:
| Variable | Description | Required | Default |
|---|---|---|---|
HIVE_NODE_URL |
Hive API node URL | Yes | https://api.hive.blog |
HIVE_CREATOR |
Hive account name that creates accounts | Yes | - |
HIVE_CREATOR_ACTIVE_WIF |
Active private key (WIF format) of creator | Yes | - |
SIGNER_TOKEN |
Secret token for API authentication | Yes | - |
PORT |
Server port | No | 3000 |
NODE_ENV |
Environment (development/production/test) | No | development |
- HIVE_NODE_URL: The Hive RPC node to connect to. Use a reliable public node or your own.
- HIVE_CREATOR: Your Hive account that will create new accounts. Must have sufficient RC.
- HIVE_CREATOR_ACTIVE_WIF: The active private key of your creator account. Keep this secure!
- SIGNER_TOKEN: A random secure token (minimum 32 characters) for API authentication.
# Linux/Mac
openssl rand -hex 32
# Or using Node.js
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Check if the service is running:
GET /healthzResponse:
{
"status": "ok",
"timestamp": "2024-01-01T12:00:00.000Z"
}Claim an account creation credit using Resource Credits (RC):
POST /claim-account
Headers:
x-signer-token: your-secure-tokenResponse (Success):
{
"success": true,
"transaction_id": "abc123...",
"message": "Account claim successful. You can now create a claimed account."
}Create a new Hive account using a previously claimed credit:
POST /create-claimed-account
Headers:
x-signer-token: your-secure-token
Content-Type: application/json
Body:
{
"new_account_name": "newusername",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM7abc123...", 1]]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM7def456...", 1]]
},
"posting": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM7ghi789...", 1]]
},
"memo_key": "STM7jkl012...",
"json_metadata": "{}"
}Response (Success):
{
"success": true,
"transaction_id": "xyz789...",
"account_name": "newusername",
"message": "Account created successfully"
}curl -X POST http://localhost:3000/claim-account \
-H "x-signer-token: your-secure-token"curl -X POST http://localhost:3000/create-claimed-account \
-H "x-signer-token: your-secure-token" \
-H "Content-Type: application/json" \
-d '{
"new_account_name": "skatehiveuser",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM8owner1234567890abcdefghijklmnopqrstuvwxyz12345", 1]]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM8active123456789abcdefghijklmnopqrstuvwxyz12345", 1]]
},
"posting": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [["STM8posting12345678abcdefghijklmnopqrstuvwxyz12345", 1]]
},
"memo_key": "STM8memo1234567890abcdefghijklmnopqrstuvwxyz123456",
"json_metadata": "{}"
}'- NEVER commit private keys to version control
- NEVER log private keys or the
HIVE_CREATOR_ACTIVE_WIFenvironment variable - Store the active WIF only in environment variables
- Use secret management systems (AWS Secrets Manager, HashiCorp Vault) in production
- Rotate the
SIGNER_TOKENregularly - Use different tokens for different environments
The service implements two layers of rate limiting:
- Global: 120 requests per 15 minutes per IP
- Account Operations: 30 requests per 15 minutes per IP
All protected endpoints require the x-signer-token header. Keep this token secure and rotate it regularly.
CORS is disabled by default. Enable only if needed and configure allowed origins:
// In src/server.ts, uncomment and configure:
app.use(cors({ origin: 'https://your-frontend-domain.com' }));- Use HTTPS in production (configure via reverse proxy like nginx)
- Restrict access to the service using firewall rules
- Consider running behind a VPN or using IP whitelisting
- Use environment-based configuration, never hardcode secrets
npm run dev- Start development server with hot reloadnpm run build- Build TypeScript to JavaScriptnpm start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issues automatically
.
├── src/
│ ├── config/
│ │ └── env.ts # Environment variable validation
│ ├── lib/
│ │ ├── hive.ts # Hive blockchain client and operations
│ │ └── validators.ts # Zod validation schemas
│ ├── middleware/
│ │ ├── auth.ts # Authentication middleware
│ │ └── rate.ts # Rate limiting middleware
│ ├── routes/
│ │ ├── accounts.ts # Account creation endpoints
│ │ └── health.ts # Health check endpoint
│ └── server.ts # Express app and server setup
├── .env.example # Example environment configuration
├── .eslintrc.json # ESLint configuration
├── Dockerfile # Multi-stage Docker build
├── nodemon.json # Nodemon configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This file
The API returns consistent JSON error responses:
{
"error": "Validation Error",
"message": "Invalid request parameters",
"details": [
{
"field": "new_account_name",
"message": "Account name must be at least 3 characters"
}
]
}{
"error": "Unauthorized",
"message": "Invalid x-signer-token"
}{
"error": "Too Many Requests",
"message": "Account operations rate limit exceeded. Please try again later."
}{
"error": "Blockchain Error",
"message": "Failed to create account on Hive blockchain",
"details": "RC bandwidth limit exceeded"
}The service uses Pino for structured JSON logging with the following features:
- Request IDs for distributed tracing
- Automatic redaction of sensitive fields (tokens, private keys)
- Different log levels based on HTTP status codes
- Pretty printing in development mode
- JSON output in production for log aggregation
error- 5xx responses and exceptionswarn- 4xx responsesinfo- Successful requests and server eventsdebug- Detailed debugging information (dev only)
- Set
NODE_ENV=production - Use a strong
SIGNER_TOKEN(minimum 32 characters) - Configure HTTPS via reverse proxy
- Set up log aggregation (CloudWatch, ELK, etc.)
- Configure monitoring and alerts
- Use a secret management system for sensitive variables
- Enable firewall rules to restrict access
- Set up automated backups of creator account
- Configure proper resource limits (memory, CPU)
- Use a reliable Hive RPC node or run your own
Example deployment configuration:
apiVersion: apps/v1
kind: Deployment
metadata:
name: hive-signer
spec:
replicas: 2
selector:
matchLabels:
app: hive-signer
template:
metadata:
labels:
app: hive-signer
spec:
containers:
- name: hive-signer
image: skatehive-hive-signer:latest
ports:
- containerPort: 3000
env:
- name: HIVE_NODE_URL
value: "https://api.hive.blog"
- name: HIVE_CREATOR
valueFrom:
secretKeyRef:
name: hive-secrets
key: creator
- name: HIVE_CREATOR_ACTIVE_WIF
valueFrom:
secretKeyRef:
name: hive-secrets
key: active-wif
- name: SIGNER_TOKEN
valueFrom:
secretKeyRef:
name: hive-secrets
key: signer-token
- name: PORT
value: "3000"
- name: NODE_ENV
value: "production"
resources:
limits:
memory: "256Mi"
cpu: "500m"
requests:
memory: "128Mi"
cpu: "250m"
livenessProbe:
httpGet:
path: /healthz
port: 3000
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /healthz
port: 3000
initialDelaySeconds: 5
periodSeconds: 10MIT
For issues and questions, please open an issue on GitHub.
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Ensure all tests pass and code is linted
- Submit a pull request