{"id":50816982,"url":"https://github.com/yan253319066/XPayLabs-docker","last_synced_at":"2026-06-30T18:00:41.577Z","repository":{"id":363542083,"uuid":"1262642569","full_name":"yan253319066/XPayLabs-docker","owner":"yan253319066","description":"Self-hosted, non-custodial crypto payment gateway — multi-chain USDT/USDC payments with Docker Compose","archived":false,"fork":false,"pushed_at":"2026-06-21T09:07:24.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T11:09:07.560Z","etag":null,"topics":["accept-crypto","bitpay-alternative","blockchain","coinbase-commerce-alternative","crypto-payment-gateway","cryptocurrency","docker-compose","evm","merchant","non-custodial","open-source","payment-processing","self-hosted","sui","tron","usdc","usdt","web3"],"latest_commit_sha":null,"homepage":"https://www.xpaylabs.com/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yan253319066.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-08T07:20:45.000Z","updated_at":"2026-06-21T09:07:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yan253319066/XPayLabs-docker","commit_stats":null,"previous_names":["yan253319066/xpaylabs-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yan253319066/XPayLabs-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yan253319066%2FXPayLabs-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yan253319066%2FXPayLabs-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yan253319066%2FXPayLabs-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yan253319066%2FXPayLabs-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yan253319066","download_url":"https://codeload.github.com/yan253319066/XPayLabs-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yan253319066%2FXPayLabs-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34977672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accept-crypto","bitpay-alternative","blockchain","coinbase-commerce-alternative","crypto-payment-gateway","cryptocurrency","docker-compose","evm","merchant","non-custodial","open-source","payment-processing","self-hosted","sui","tron","usdc","usdt","web3"],"created_at":"2026-06-13T10:05:23.184Z","updated_at":"2026-06-30T18:00:41.572Z","avatar_url":"https://github.com/yan253319066.png","language":null,"funding_links":[],"categories":["Featured"],"sub_categories":["XPayLabs"],"readme":"# XPayLabs Docker — Self-Hosted Multi-Tenant Crypto Payment Gateway\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"README.zh-CN.md\"\u003e中文\u003c/a\u003e · \u003cstrong\u003eEnglish\u003c/strong\u003e\n\u003c/p\u003e\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Docker](https://img.shields.io/badge/docker-compose-2496ED?logo=docker)](docker-compose.yml)\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eDeploy your own multi-chain crypto payment gateway. Host unlimited merchants on a single instance, collect transaction fees, and keep 100% of the revenue.\u003c/em\u003e\n\u003c/p\u003e\n\n**XPayLabs** is a production-ready, open-source cryptocurrency payment gateway designed for operators who want full control over their payment infrastructure. Deploy a multi-chain, multi-tenant crypto payment system with a single `docker compose up` command — then onboard merchants and earn from every transaction processed.\n\n---\n\n## Features\n\n- **Multi-Chain Support** — Accept payments on Ethereum (ETH), TRON (TRX \u0026 USDT), BNB Smart Chain (BSC), Polygon (MATIC), Avalanche (AVAX), and SUI\n- **Self-Hosted** — Full ownership of data, funds, and infrastructure. No third-party dependency\n- **Multi-Tenant** — Host unlimited merchants on a single deployment. Set your own fee structure and earn from every transaction\n- **Merchant Dashboard** — Vue 3 + Element Plus admin panel for order management, payout, and settlement\n- **Embedded Checkout** — Drop-in payment page with QR code, wallet connect (Reown AppKit), and direct crypto transfer\n- **Collection Orders** — Generate unique deposit addresses per order; automatic blockchain scanning confirms payments\n- **Webhook Callbacks** — Real-time payment notifications via merchant-registered callback URLs\n- **HMAC Authentication** — Secure API communication using merchant token (HMAC-SHA256 signature)\n- **RSA Encryption** — Sensitive API payloads encrypted with RSA key pairs between frontend and backend\n\n---\n\n## Architecture Overview\n\n```\n┌──────────────┐    ┌──────────────┐    ┌──────────────┐\n│  Merchant    │    │   Checkout   │    │   Gateway    │\n│  Dashboard   │    │   (Vue 3)    │    │  (Nginx)     │\n│  (Vue 3)     │    │              │    │   :180       │\n└──────┬───────┘    └──────┬───────┘    └──────┬───────┘\n       │                   │                   │\n       └───────────────────┼───────────────────┘\n                           │\n              ┌────────────┴────────────┐\n              │     xpay-merchant       │\n              │   (Spring Boot, :8078)  │\n              ├─────────────────────────┤\n              │      xpay-user          │\n              │   (Spring Boot, :8077)  │\n              └────────────┬────────────┘\n                           │\n         ┌─────────────────┼─────────────────┐\n         │                 │                 │\n  ┌──────┴──────┐  ┌──────┴──────┐  ┌──────┴──────┐\n  │  xpay-eth   │  │ xpay-tron   │  │  xpay-sui   │\n  │  Scanner    │  │ Scanner     │  │  Scanner    │\n  └─────────────┘  └─────────────┘  └──────┬───────┘\n                                           │\n                                    ┌──────┴──────┐\n                                    │ sui-node-svc │\n                                    │ (Express)    │\n                                    └─────────────┘\n┌─────────────┐          ┌─────────────┐\n│   MySQL     │          │   Redis     │\n│    :3306    │          │   :6379     │\n└─────────────┘          └─────────────┘\n```\n\n### Services Breakdown\n\n| Service | Image | Role |\n|---------|-------|------|\n| `mysql` | `mysql:8.0` | Primary database |\n| `redis` | `redis:7-alpine` | Cache \u0026 session store |\n| `sui-node-service` | `ghcr.io/yan253319066/sui-node-service` | SUI blockchain RPC proxy (Express) |\n| `xpay-tron` | `ghcr.io/yan253319066/xpay-java` | TRON blockchain scanner |\n| `xpay-sui` | `ghcr.io/yan253319066/xpay-java` | SUI blockchain scanner |\n| `xpay-eth` | `ghcr.io/yan253319066/xpay-java` | EVM-compatible scanner (ETH, BSC, Polygon, Avalanche) |\n| `xpay-user` | `ghcr.io/yan253319066/xpay-java` | User \u0026 collection order API service |\n| `xpay-merchant` | `ghcr.io/yan253319066/xpay-java` | Merchant backend (RuoYi-Vue-Plus based) |\n| `merchant-vue` | `ghcr.io/yan253319066/merchant-vue` | Merchant admin dashboard (Vue 3 + Element Plus) |\n| `checkout` | `ghcr.io/yan253319066/checkout` | Payment checkout page (Vue 3 + Vite 7) |\n| `gateway` | `nginx:alpine` | Single entry point (reverse proxy) |\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- [Docker](https://docs.docker.com/engine/install/) 24+\n- [Docker Compose](https://docs.docker.com/compose/install/) v2+\n\n### 1. Clone\n\n```bash\ngit clone https://github.com/yan253319066/XPayLabs-docker.git\ncd XPayLabs-docker\n```\n\n### 2. Configure\n\n```bash\ncp .env.example .env\n# Edit .env to set your own passwords, RPC endpoints, and domain URLs\n```\n\n### 3. Launch\n\n```bash\ndocker compose up -d\n```\n\nThe gateway starts on **port 180** by default. Visit `http://localhost:180` to access the merchant dashboard.\n\n### 4. Initialize Database\n\nThe `./sql` directory is mounted to `/docker-entrypoint-initdb.d` — MySQL auto-executes `init.sql` on first startup. To reinitialize:\n\n```bash\ndocker compose down -v    # WARNING: destroys all data\ndocker compose up -d\n```\n\n---\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `MYSQL_ROOT_PASSWORD` | ✅ | MySQL root password |\n| `DB_USERNAME` | ✅ | Database username |\n| `DB_PASSWORD` | ✅ | Database password |\n| `REDIS_PASSWORD` | ❌ | Redis password (empty = no auth) |\n| `ENCRYPTION_KEY` | ✅ | AES-256-CBC key (exactly 32 chars) |\n| `JWT_SECRET_KEY` | ✅ | JWT signing secret |\n| `SKIP_SIGN_SECRET` | ✅ | HMAC-SHA256 secret for SkipSign |\n| `XPAY_PAY_DOMAIN` | ✅ | Public checkout URL |\n| `XPAY_API_DOMAIN` | ✅ | Public API domain |\n| `ETH_CHAINS_*` | ❌ | Ethereum RPC URLs (comma-separated) |\n| `TRON_CHAINS_*` | ❌ | TRON node \u0026 API configuration |\n| `HOST_PORT_*` | ❌ | Host port mappings |\n\nSee [`.env.example`](.env.example) for all configurable options.\n\n---\n\n## Port Mapping\n\n| Default Port | Service | Description |\n|-------------|---------|-------------|\n| `180` | Gateway (Nginx) | Single public entry point |\n| `13306` | MySQL | Database |\n| `16379` | Redis | Cache |\n| `13001` | sui-node-service | SUI blockchain proxy |\n| `18077` | xpay-user | User/order API |\n| `18078` | xpay-merchant | Merchant API |\n| `18076` | xpay-eth | EVM scanner |\n| `18075` | xpay-tron | TRON scanner |\n| `18074` | xpay-sui | SUI scanner |\n\n---\n\n## SSL / HTTPS\n\n1. Place your certificate files (`.crt` + `.key`) in `./certs/`\n2. Uncomment SSL lines in `docker-compose.yml` (lines 198, 201-202)\n3. Switch nginx config: rename `gateway-ssl.conf` → `default.conf` in the volume mount\n4. Set `HOST_PORT_GATEWAY_HTTPS` in `.env`\n\n---\n\n## Supported Blockchains\n\n| Chain | Network | Scanner Service |\n|-------|---------|----------------|\n| Ethereum | Mainnet, Sepolia | `xpay-eth` |\n| BNB Smart Chain | Mainnet, Testnet | `xpay-eth` |\n| Polygon | Mainnet, Amoy | `xpay-eth` |\n| Avalanche C-Chain | Mainnet, Fuji | `xpay-eth` |\n| TRON | Mainnet, Shasta | `xpay-tron` |\n| SUI | Mainnet, Testnet | `xpay-sui` + `sui-node-service` |\n\n---\n\n## Logs\n\nAll Java services output logs to `./logs/` (mounted at `/app/logs`). Each service writes to its own subdirectory:\n\n```\n./logs/\n├── sui-node-service/\n├── XPayLabs-tron/\n├── XPayLabs-sui/\n├── XPayLabs-eth/\n├── XPayLabs/\n└── XPayLabs-merchant/\n```\n\n---\n\n## Terminology\n\n| Term | Meaning |\n|------|---------|\n| Collection Order | A payment order awaiting funds (not \"payment\" order) |\n| Payout | Sending funds to any address |\n| Merchant Token | HMAC-SHA256 signed authentication token (not Bearer) |\n| Deposit Address | Per-order crypto address (not \"payment address\") |\n| Webhook Callback | Merchant-registered URL for payment notifications |\n\n---\n\n## Related Projects\n\n| Repository | Description |\n|------------|-------------|\n| [XPayLabs](https://github.com/yan253319066/XPayLabs) | Marketing website (Next.js 15) |\n| [XPayLabs-docs](https://github.com/yan253319066/XPayLabs-docs) | Documentation (Mintlify) |\n| [XPayLabs-checkout](https://github.com/yan253319066/XPayLabs-checkout) | Checkout page (Vue 3) |\n| [XPayLabs-demo-vue](https://github.com/yan253319066/XPayLabs-demo-vue) | E-commerce demo (Vue 3) |\n| [XPayLabs-example-react](https://github.com/yan253319066/XPayLabs-example-react) | React integration example (React 18 + MUI) |\n| [XPayLabs-example-vue](https://github.com/yan253319066/XPayLabs-example-vue) | Vue integration example (Vue 3) |\n| [XPayLabs-x402](https://github.com/yan253319066/XPayLabs-x402) | x402 buyer SDK (npm `@xpaylabs/x402`) |\n| [XPayLabs-x402-seller](https://github.com/yan253319066/XPayLabs-x402-seller) | x402 seller test server (Express) |\n| [XPayLabs-java-sdk](https://github.com/yan253319066/XPayLabs-java-sdk) | Java SDK (Java 17 + OkHttp) |\n| [XPayLabs-node-sdk](https://github.com/yan253319066/XPayLabs-node-sdk) | Node.js SDK (TypeScript + Axios) |\n\n---\n\n## License\n\n[MIT](LICENSE) © 2026 XPay Labs\n\n---\n\n## FAQ\n\n### What is XPayLabs Docker?\n\nXPayLabs Docker is a production-ready, self-hosted cryptocurrency payment gateway that supports multiple blockchains and multiple merchants on a single deployment. Run it with `docker compose up` and you have a complete payment infrastructure.\n\n### Can I host multiple merchants?\n\nYes. XPayLabs is **multi-tenant by design**. A single deployment can serve unlimited merchants, each with isolated data, separate API credentials, and independent configuration.\n\n### Can I charge fees to merchants?\n\nAbsolutely. As the platform operator, you set your own fee structure — percentage-based or flat fee per transaction. Since you run the infrastructure yourself, there are no third-party fees eating into your margin.\n\n### What blockchains are supported?\n\nEthereum, TRON (TRX \u0026 USDT), BNB Smart Chain, Polygon, Avalanche, and SUI — with more being added.\n\n### Do I need KYC?\n\nNo. Self-hosted means no KYC, no third-party approval, no onboarding delays. You are in complete control.\n\n---\n\n## Self-Hosted vs. Payment Processor\n\n| | XPayLabs (Self-Hosted) | Third-Party Processor |\n|---|---|---|\n| **Fee Control** | You set the rates. Zero processor cut | 1–3% per transaction + monthly fees |\n| **Multi-Tenant** | Host unlimited merchants | Usually single-merchant or upcharge per seat |\n| **Data Ownership** | Full. All data stays on your servers | Shared with processor and their sub-processors |\n| **Fund Settlement** | Direct to your wallet. Instant settlement | Processor holds and batches payouts |\n| **KYC** | None required | KYC for you and your merchants |\n| **Customization** | Full control over UI, chains, integrations | Limited to processor's SDK and templates |\n| **Counterparty Risk** | You control the private keys | Processor can freeze or delay funds |\n\n---\n\n*Last updated: June 2026. Maintained by [XPayLabs](https://github.com/yan253319066).*\n\n## Repository\n\n**GitHub:** [yan253319066/XPayLabs-docker](https://github.com/yan253319066/XPayLabs-docker)\n**Gitee (mirror):** [XPayLabs/XPayLabs-docker](https://gitee.com/XPayLabs/XPayLabs-docker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyan253319066%2FXPayLabs-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyan253319066%2FXPayLabs-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyan253319066%2FXPayLabs-docker/lists"}