Skip to content

Deploying SHKeeper

Introduction

SHKeeper is a self-hosted cryptocurrency payment gateway that enables businesses to accept digital currency payments while maintaining complete control over their funds. Unlike third-party payment processors, SHKeeper runs on your own infrastructure, eliminating intermediaries and their associated fees.

Built with a focus on security and simplicity, SHKeeper supports multiple cryptocurrencies and provides a straightforward API for integration with e-commerce platforms, invoicing systems, and custom applications. The platform generates unique payment addresses for each transaction, monitors blockchain confirmations, and sends callbacks to your application upon payment completion.

Key highlights of SHKeeper:

  • Self-Custody: All funds go directly to your wallets with no intermediary access
  • Multi-Currency Support: Accept Bitcoin, Ethereum, Litecoin, and other major cryptocurrencies
  • Unique Addresses: Generate fresh payment addresses for each transaction
  • Confirmation Tracking: Monitor blockchain confirmations in real-time
  • Callback System: Receive instant notifications when payments complete
  • Exchange Rate Integration: Automatic conversion between fiat and crypto amounts
  • API-First Design: RESTful API for seamless integration
  • Payment Pages: Optional hosted payment pages for quick integration
  • No Transaction Fees: Only network fees apply, no platform charges
  • Open Source: Full transparency and customization possibilities

This guide walks through deploying SHKeeper on Klutch.sh using Docker, configuring cryptocurrency wallets, and integrating the payment gateway with your applications.

Why Deploy SHKeeper on Klutch.sh

Deploying SHKeeper on Klutch.sh provides several advantages for cryptocurrency payments:

Simplified Deployment: Klutch.sh automatically builds your SHKeeper configuration without complex server setup. Push to GitHub for automatic deployment.

Persistent Storage: Attach persistent volumes for wallet data and transaction history. Your payment records survive container restarts.

HTTPS by Default: Klutch.sh provides automatic SSL certificates, ensuring secure payment communications.

GitHub Integration: Store your configuration in version control. Changes trigger automatic redeployments.

Scalable Resources: Allocate resources based on transaction volume.

Environment Variable Management: Securely store API keys and wallet credentials through Klutch.sh’s environment system.

Always-On Availability: Your payment gateway remains accessible 24/7 for processing transactions.

Prerequisites

Before deploying SHKeeper on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your SHKeeper configuration
  • Basic familiarity with Docker and containerization concepts
  • Cryptocurrency wallets for the currencies you want to accept
  • Extended public keys (xpub) for HD wallet address generation
  • (Optional) A custom domain for your payment gateway

Deploying SHKeeper on Klutch.sh

    Create Your Repository

    Create a new GitHub repository for your SHKeeper deployment. Add a Dockerfile:

    FROM shkeeper/shkeeper:latest
    ENV SHKEEPER_HOST=0.0.0.0
    ENV SHKEEPER_PORT=5000
    EXPOSE 5000
    HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
    CMD wget --no-verbose --tries=1 --spider http://localhost:5000/api/health || exit 1

    Push to GitHub

    Commit and push your Dockerfile to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “shkeeper” or “crypto-payments”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select your repository.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 5000

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    SHKEEPER_API_KEYA secure random API key
    SHKEEPER_SECRETSecret key for encryption
    DATABASE_URLDatabase connection string

    Attach Persistent Volumes

    Add the following volumes for data persistence:

    Mount PathRecommended SizePurpose
    /app/data10 GBApplication data and configuration
    /app/db5 GBTransaction database

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will build the container, attach volumes, and provision HTTPS.

    Access SHKeeper

    Once deployment completes, access your SHKeeper dashboard at the provided URL.

Wallet Configuration

Adding Cryptocurrency Wallets

Configure wallets for each cryptocurrency you want to accept:

  1. Access the SHKeeper admin dashboard
  2. Navigate to Wallets section
  3. Add a new wallet for each cryptocurrency
  4. Enter your extended public key (xpub) for HD address generation

Supported Cryptocurrencies

SHKeeper supports major cryptocurrencies:

  • Bitcoin (BTC): Native Bitcoin payments
  • Ethereum (ETH): Ethereum and ERC-20 tokens
  • Litecoin (LTC): Fast, low-fee transactions
  • Bitcoin Cash (BCH): Bitcoin Cash payments
  • Additional coins: Check SHKeeper documentation for full list

HD Wallet Setup

For secure address generation:

  1. Use your wallet software to export the extended public key
  2. Never share private keys with SHKeeper
  3. SHKeeper derives unique addresses for each payment
  4. All funds remain in your control

API Integration

Authentication

All API requests require authentication:

Authorization: Bearer YOUR_API_KEY

Creating a Payment

Create a new payment request via the API:

POST /api/v1/payment
{
"amount": "100.00",
"currency": "USD",
"crypto": "BTC",
"callback_url": "https://yoursite.com/payment/callback",
"order_id": "ORDER-12345"
}

Payment Callbacks

SHKeeper sends callbacks when payments are confirmed:

{
"order_id": "ORDER-12345",
"status": "confirmed",
"crypto_amount": "0.00234",
"crypto_currency": "BTC",
"confirmations": 3,
"tx_hash": "abc123..."
}

Checking Payment Status

Query payment status programmatically:

GET /api/v1/payment/{payment_id}

Payment Pages

Hosted Payment Pages

SHKeeper provides optional hosted payment pages:

  1. Configure payment page styling in settings
  2. Redirect customers to payment URL
  3. Customers see QR code and payment details
  4. Automatic redirect on payment completion

Customization Options

Customize payment pages to match your brand:

  • Logo and colors
  • Custom messages
  • Redirect URLs
  • Confirmation requirements

E-Commerce Integration

WooCommerce

Install the SHKeeper plugin for WooCommerce:

  1. Download the plugin from SHKeeper
  2. Install in WordPress
  3. Configure API credentials
  4. Enable cryptocurrency payments at checkout

Custom Integration

Integrate with any platform using the REST API:

  1. Create payment on order creation
  2. Redirect to payment page or display QR code
  3. Handle callback to confirm order
  4. Update order status on confirmation

Security Best Practices

API Key Management

  • Generate strong, unique API keys
  • Rotate keys periodically
  • Use environment variables, never hardcode

Wallet Security

  • Keep extended public keys separate from private keys
  • Monitor wallet balances regularly
  • Use hardware wallets for key storage

Callback Verification

  • Verify callback signatures
  • Confirm payment amounts match expectations
  • Check confirmation counts before fulfilling orders

Monitoring and Reporting

Transaction History

View all transactions in the dashboard:

  • Payment status tracking
  • Confirmation progress
  • Callback delivery status

Export Options

Export transaction data for accounting:

  • CSV export
  • Date range filtering
  • Currency filtering

Troubleshooting

Payments Not Detected

  • Verify wallet configuration is correct
  • Check blockchain explorer for transaction
  • Review confirmation requirements

Callback Failures

  • Verify callback URL is accessible
  • Check SSL certificate validity
  • Review callback logs in dashboard

Address Generation Issues

  • Confirm xpub is entered correctly
  • Check wallet derivation path settings
  • Verify cryptocurrency compatibility

Additional Resources

Conclusion

Deploying SHKeeper on Klutch.sh provides a secure, self-hosted cryptocurrency payment gateway for your business. With full control over your funds, no intermediary fees, and flexible API integration, you can accept cryptocurrency payments while maintaining complete sovereignty over your transactions. Klutch.sh’s automatic HTTPS, persistent storage, and reliable hosting ensure your payment gateway is always available for your customers.