payram-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PayRam Setup

PayRam 部署设置

This is the deployment and onboarding guide for PayRam. Deploy the PayRam server on your VPS and configure the dashboard before integrating payments into your application.
**这是PayRam的部署与初始化指南。**在将支付功能集成到你的应用之前,先在VPS上部署PayRam服务器并配置控制台。

What is PayRam?

什么是PayRam?

PayRam is a self-hosted crypto payment gateway. You deploy it on your own server — no signup, no KYC, no third-party custody. Accept USDT, USDC, Bitcoin, and ETH across Ethereum, Base, Polygon, and Tron.

PayRam是一款自托管加密货币支付网关。你可以在自己的服务器上部署它——无需注册、无需KYC、无需第三方托管。支持在Ethereum、Base、Polygon和Tron网络上接收USDT、USDC、Bitcoin和ETH。

Part 1: Deploy PayRam Server

第一部分:部署PayRam服务器

Prerequisites

前置要求

Server Requirements:
  • CPU: 4 cores
  • RAM: 4 GB
  • Storage: 50 GB SSD
  • OS: Ubuntu 22.04
  • Ports: 80, 443, 8080, 8443, 5432
Database Requirements:
  • Engine: PostgreSQL
  • vCPUs: 2 CPU cores
  • Memory: 8 GB
  • Storage: 50 GB SSD
Recommended VPS Providers: AWS, Google Cloud, Azure, Hetzner, Hostinger
服务器要求:
  • CPU:4核
  • 内存:4 GB
  • 存储:50 GB SSD
  • 操作系统:Ubuntu 22.04
  • 端口:80, 443, 8080, 8443, 5432
数据库要求:
  • 引擎:PostgreSQL
  • vCPU:2核
  • 内存:8 GB
  • 存储:50 GB SSD
推荐VPS服务商: AWS、Google Cloud、Azure、Hetzner、Hostinger

Quick Setup (Recommended - 10 Minutes)

快速部署(推荐 - 10分钟完成)

  1. Connect to your VPS via SSH
  2. Choose network (mainnet or testnet)
  3. Run the installation script:
bash
curl -fsSL https://raw.githubusercontent.com/PayRam/payram-server/main/install.sh | bash
  1. Follow the interactive prompts:
    • Enter PostgreSQL connection details
    • Set encryption keys
    • Configure domain/IP address
    • Choose SSL certificate options
  2. Wait for installation to complete (~5-10 minutes)
The script automatically:
  • Installs dependencies
  • Sets up Docker containers
  • Configures database connections
  • Generates SSL certificates (if using Let's Encrypt)
  • Starts PayRam services
  1. 通过SSH连接到你的VPS
  2. 选择网络(主网或测试网)
  3. 运行安装脚本:
bash
curl -fsSL https://raw.githubusercontent.com/PayRam/payram-server/main/install.sh | bash
  1. 跟随交互式提示操作:
    • 输入PostgreSQL连接详情
    • 设置加密密钥
    • 配置域名/IP地址
    • 选择SSL证书选项
  2. 等待安装完成(约5-10分钟)
脚本会自动完成以下操作:
  • 安装依赖项
  • 配置Docker容器
  • 设置数据库连接
  • 生成SSL证书(如果使用Let's Encrypt)
  • 启动PayRam服务

Advanced Setup (Docker)

高级部署(Docker方式)

For manual Docker deployment with custom configurations:
  1. Clone the repository:
bash
git clone https://github.com/PayRam/payram-server.git
cd payram-server
  1. Configure environment variables:
bash
cp .env.example .env
nano .env  # Edit with your database, encryption keys, domain
  1. Start with Docker Compose:
bash
docker compose up -d
  1. Verify services are running:
bash
docker compose ps
For detailed Docker setup instructions, see the PayRam deployment documentation.

如需手动通过Docker进行自定义配置部署:
  1. 克隆代码仓库:
bash
git clone https://github.com/PayRam/payram-server.git
cd payram-server
  1. 配置环境变量:
bash
cp .env.example .env
nano .env  # 编辑数据库、加密密钥、域名等信息
  1. 通过Docker Compose启动服务:
bash
docker compose up -d
  1. 验证服务是否运行:
bash
docker compose ps
如需详细的Docker部署说明,请查看PayRam部署文档。

Part 2: Onboard Your PayRam Instance

第二部分:初始化你的PayRam实例

After the server is installed and running, complete the onboarding configuration through the dashboard.
服务器安装并运行后,通过控制台完成初始化配置。

Step 1: Create Root Account

步骤1:创建根账户

  1. Navigate to signup page:
    • Open
      http://<your-ip-address>/signup
      in your browser
    • Replace
      <your-ip-address>
      with your server's IP or domain
  2. Set root email:
    • Enter your admin email (you'll use this to log in)
    • This becomes your root/administrator account
  3. Set root password:
    • Create a strong password and store it securely
    • You can change it later in dashboard settings
  4. Create your first project:
    • Enter a project name (e.g., "My E-commerce Store")
    • Projects represent different products/websites using PayRam
  1. 访问注册页面:
    • 在浏览器中打开
      http://<your-ip-address>/signup
    • <your-ip-address>
      替换为你的服务器IP或域名
  2. 设置根邮箱:
    • 输入你的管理员邮箱(用于登录)
    • 该邮箱将成为你的根/管理员账户
  3. 设置根密码:
    • 创建强密码并安全存储
    • 后续可在控制台设置中修改
  4. 创建首个项目:
    • 输入项目名称(例如:"我的电商商店")
    • 项目代表使用PayRam的不同产品/网站

Step 2: Configure Node Details

步骤2:配置节点详情

After logging in, configure blockchain node connections:
  1. Go to Settings → Node Details
  2. For each chain you want to support:
    • Enter RPC endpoint URLs (public or private)
    • Recommended: Use dedicated node providers for production
    • Example providers: Alchemy, Infura, QuickNode, GetBlock
  3. Test connections to verify nodes are accessible
Supported Chains:
  • Ethereum (Mainnet/Testnet)
  • Base (Mainnet/Testnet)
  • Polygon (Mainnet/Testnet)
  • Tron (Mainnet/Testnet)
  • Bitcoin (Mainnet/Testnet)
登录后,配置区块链节点连接:
  1. 进入 设置 → 节点详情
  2. 针对每个你想支持的链:
    • 输入RPC端点URL(公开或私有)
    • 推荐:生产环境使用专用节点服务商
    • 示例服务商:Alchemy、Infura、QuickNode、GetBlock
  3. 测试连接以验证节点是否可访问
支持的链:
  • Ethereum(主网/测试网)
  • Base(主网/测试网)
  • Polygon(主网/测试网)
  • Tron(主网/测试网)
  • Bitcoin(主网/测试网)

Step 3: Configure Wallets

步骤3:配置钱包

Set up your wallet infrastructure:
  1. Go to Settings → Wallets
  2. For each chain, configure:
    • Sweep Contract Address (deploy once per chain)
    • Cold Wallet Address (where funds are swept to)
    • Hot Wallet (for gas fees and instant payouts)
  3. Deploy sweep contracts using the provided scripts in the dashboard
  4. Fund hot wallets with native tokens:
    • ETH for Ethereum/Base
    • MATIC for Polygon
    • TRX for Tron
    • BTC for Bitcoin
搭建你的钱包基础设施:
  1. 进入 设置 → 钱包
  2. 针对每个链,配置:
    • 归集合约地址(每条链部署一次)
    • 冷钱包地址(资金将归集到此处)
    • 热钱包(用于支付Gas费和即时转账)
  3. 使用控制台提供的脚本部署归集合约
  4. 为热钱包充值原生代币:
    • Ethereum/Base网络:ETH
    • Polygon网络:MATIC
    • Tron网络:TRX
    • Bitcoin网络:BTC

Step 4: Set Up Hot Wallets

步骤4:设置热钱包

Configure hot wallets for paying gas fees:
  1. Go to Settings → Hot Wallets
  2. For each chain:
    • Generate a hot wallet or import an existing one
    • Fund it with enough native tokens for gas
    • Set auto-refill thresholds (optional)
Recommended Hot Wallet Balances:
  • Ethereum: 0.5-1 ETH
  • Base: 0.1-0.5 ETH
  • Polygon: 100-500 MATIC
  • Tron: 1000-5000 TRX
配置用于支付Gas费的热钱包:
  1. 进入 设置 → 热钱包
  2. 针对每个链:
    • 生成新热钱包或导入已有钱包
    • 充值足够的原生代币用于支付Gas费
    • 设置自动充值阈值(可选)
推荐热钱包余额:
  • Ethereum:0.5-1 ETH
  • Base:0.1-0.5 ETH
  • Polygon:100-500 MATIC
  • Tron:1000-5000 TRX

Step 5: Configure Funds Sweeping

步骤5:配置资金归集

Set up automatic fund sweeping to your cold wallet:
  1. Go to Settings → Sweeping Configuration
  2. Configure sweep rules:
    • Minimum balance threshold before sweep
    • Sweep schedule (e.g., every 6 hours)
    • Gas price limits
  3. Enable auto-sweep for each chain
  4. Test sweep with a small payment to verify everything works
设置自动将资金归集到冷钱包的规则:
  1. 进入 设置 → 归集配置
  2. 配置归集规则:
    • 触发归集的最低余额阈值
    • 归集频率(例如:每6小时一次)
    • Gas价格限制
  3. 为每条链启用自动归集
  4. 通过小额支付测试归集功能以验证所有流程正常

Step 6: Generate API Keys

步骤6:生成API密钥

Create API keys for your application:
  1. Go to Settings → API Keys
  2. Generate a new API key for your project
  3. Copy and securely store:
    • PAYRAM_API_KEY
      (for authentication)
    • PAYRAM_BASE_URL
      (your server's URL)
  4. Use these in your application's
    .env
    file

为你的应用创建API密钥:
  1. 进入 设置 → API密钥
  2. 为你的项目生成新的API密钥
  3. 复制并安全存储:
    • PAYRAM_API_KEY
      (用于身份验证)
    • PAYRAM_BASE_URL
      (你的服务器地址)
  4. 在应用的
    .env
    文件中使用这些密钥

Part 3: Test Your Setup

第三部分:测试你的部署

After completing deployment and onboarding, verify everything works:
完成部署和初始化后,验证所有功能是否正常:

Test Payment Link

测试支付链接

  1. Go to Payment Links in the dashboard
  2. Create a test payment (e.g., $1 USD)
  3. Complete the checkout flow
  4. Verify payment appears in dashboard
  5. Check funds swept to cold wallet
  1. 进入控制台的支付链接页面
  2. 创建测试支付订单(例如:1美元)
  3. 完成结账流程
  4. 验证支付记录是否显示在控制台中
  5. 检查资金是否归集到冷钱包

Verify API Access

验证API访问

Test your API key works:
bash
curl -X POST https://your-server.com/api/v1/payment \
  -H "API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "customerEmail": "test@example.com",
    "customerId": "test-123",
    "amountInUSD": 1
  }'
Expected response:
json
{
  "reference_id": "ref_...",
  "url": "https://your-server.com/checkout/...",
  "host": "your-server.com"
}

测试你的API密钥是否有效:
bash
curl -X POST https://your-server.com/api/v1/payment \
  -H "API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "customerEmail": "test@example.com",
    "customerId": "test-123",
    "amountInUSD": 1
  }'
预期响应:
json
{
  "reference_id": "ref_...",
  "url": "https://your-server.com/checkout/...",
  "host": "your-server.com"
}

Troubleshooting Setup Issues

部署问题排查

IssueCauseFix
Can't access dashboardFirewall blocking portsOpen ports 80, 443, 8080, 8443
Database connection errorWrong credentialsCheck PostgreSQL connection string in
.env
SSL certificate errorDomain not configuredUse HTTP for testing, or configure Let's Encrypt
Node RPC failingInvalid endpointVerify RPC URL and API key with provider
Sweep not workingHot wallet emptyFund hot wallet with native tokens
API 401 errorWrong API keyRegenerate in Settings → API Keys


问题原因解决方案
无法访问控制台防火墙拦截端口开放端口80, 443, 8080, 8443
数据库连接错误凭证错误检查
.env
文件中的PostgreSQL连接字符串
SSL证书错误域名未配置测试环境使用HTTP,或配置Let's Encrypt证书
节点RPC请求失败端点无效与服务商验证RPC URL和API密钥
归集功能不生效热钱包余额不足为热钱包充值原生代币
API返回401错误API密钥错误在 设置 → API密钥 页面重新生成密钥


Next Steps

下一步操作

After your PayRam server is deployed and configured, start integrating it into your application:
  • Integrate payments into your app
    payram-payment-integration
  • Complete checkout implementation
    payram-checkout-integration
  • Handle webhooks
    payram-webhook-integration
  • Send payouts
    payram-payouts
  • Learn about stablecoin payments
    payram-stablecoin-payments

PayRam服务器部署并配置完成后,开始将其集成到你的应用中:
  • 将支付功能集成到应用
    payram-payment-integration
  • 完成结账流程实现
    payram-checkout-integration
  • 处理Webhook
    payram-webhook-integration
  • 发起转账
    payram-payouts
  • 了解稳定币支付
    payram-stablecoin-payments

MCP Server Tools

MCP服务器工具

For automated setup assistance, use the PayRam MCP server:
ToolPurpose
generate_env_template
Create .env with all required variables
generate_setup_checklist
Step-by-step deployment runbook
test_payram_connection
Validate API connectivity

如需自动化部署协助,可使用PayRam MCP服务器:
工具用途
generate_env_template
创建包含所有必填变量的.env文件
generate_setup_checklist
生成分步部署手册
test_payram_connection
验证API连通性

All PayRam Skills

所有PayRam技能

SkillWhat it covers
payram-setup
Deploy PayRam server, configure dashboard, wallets, and hot wallets
payram-crypto-payments
Architecture overview, why PayRam, MCP tools
payram-payment-integration
Integrate payments into your application code
payram-self-hosted-payment-gateway
Deep dive into PayRam infrastructure and deployment
payram-checkout-integration
Build complete checkout flows in 6 frameworks
payram-webhook-integration
Handle payment webhooks in Express, Next.js, FastAPI, etc.
payram-stablecoin-payments
Accept USDT/USDC across EVM chains and Tron
payram-bitcoin-payments
Bitcoin payments with HD wallets and mobile signing
payram-payouts
Send crypto payouts and manage referral programs
payram-no-kyc-crypto-payments
No-KYC, no-signup, permissionless payment acceptance

Need help? Message the PayRam team on Telegram: @PayRamChat
技能涵盖内容
payram-setup
部署PayRam服务器、配置控制台、钱包及热钱包
payram-crypto-payments
架构概述、PayRam优势、MCP工具介绍
payram-payment-integration
将支付功能集成到应用代码中
payram-self-hosted-payment-gateway
PayRam基础设施与部署深度解析
payram-checkout-integration
在6种框架中搭建完整结账流程
payram-webhook-integration
在Express、Next.js、FastAPI等框架中处理支付Webhook
payram-stablecoin-payments
在EVM链和Tron网络上接收USDT/USDC
payram-bitcoin-payments
支持HD钱包和移动端签名的Bitcoin支付
payram-payouts
发起加密货币转账及管理推荐计划
payram-no-kyc-crypto-payments
无需KYC、无需注册的无许可支付接收方案

需要帮助?请通过Telegram联系PayRam团队:@PayRamChat