In today’s digital economy, accepting cryptocurrency payments can open up new revenue streams and customer bases for your online business. This guide walks you through using Docker and DuJiaoKa—a popular self-hosted digital goods store system—to integrate USDT (Tether) payments smoothly and securely.
Why Accept USDT Payments?
USDT (Tether) is a stablecoin pegged to the US dollar, offering the benefits of cryptocurrency—fast, global, and low-fee transactions—without the volatility of other digital currencies. By accepting USDT, you can:
- Reach international customers without traditional banking barriers.
- Lower transaction fees compared to credit cards or PayPal.
- Enjoy quicker settlement times.
Integrating USDT with DuJiaoKa via Docker ensures a modular, scalable, and easy-to-maintain setup.
What You’ll Need
Before you begin, make sure you have the following:
- A server running Debian 11 or Ubuntu (recommended for better compatibility).
- Docker and Docker Compose installed.
- A domain name pointed to your server.
- A Telegram account (for bot setup and notifications).
- Basic familiarity with command-line operations.
⚠️ Note: Due to the nature of cryptocurrency transactions, it is highly recommended to use a server based outside of mainland China. US-based servers, for instance, offer a compliant environment for handling crypto payments.
Step-by-Step Setup Guide
Step 1: Install Docker and Docker Compose
If you haven’t already, install Docker and Docker Compose on your server. Use the following commands:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composeLog out and back in for the group changes to take effect.
Step 2: Set Up a Telegram Bot
You’ll need a Telegram bot to handle payment notifications and alerts.
- Open Telegram and search for
BotFather. - Send the command
/newbotand follow the prompts to create a new bot. - Note down the API token provided (e.g.,
6247111111:Asdajkdaksdhkajshi6aUa6pXH4Rxc).
Next, obtain your Telegram User ID:
- Search for
getmyid_boton Telegram. - Start the bot and it will display your User ID.
Step 3: Prepare the Installation Directory
Create a directory for the epusdt setup and navigate into it:
sudo mkdir -p /root/data/docker_data/epusdt
cd /root/data/docker_data/epusdtStep 4: Configure Docker Compose
Create a docker-compose.yml file:
vim docker-compose.ymlPaste the following configuration:
version: "3"
services:
db:
image: mariadb:focal
restart: always
environment:
- MYSQL_ROOT_PASSWORD=your_mysql_root_password
- MYSQL_DATABASE=epusdt
- MYSQL_USER=epusdt
- MYSQL_PASSWORD=your_mysql_user_password
volumes:
- ./mysql:/var/lib/mysql
redis:
image: redis:alpine
restart: always
volumes:
- ./redis:/data
epusdt:
image: stilleshan/epusdt
restart: always
volumes:
- ./epusdt.conf:/app/.env
ports:
- 8000:8000Replace your_mysql_root_password and your_mysql_user_password with strong, unique passwords.
Step 5: Set Up Environment Configuration
Create an epusdt.conf file:
vim epusdt.confUse the following template:
app_name=epusdt
app_uri=https://your_domain.com
app_debug=false
http_listen=:8000
static_path=/static
runtime_root_path=/runtime
log_save_path=/logs
log_max_size=32
log_max_age=7
max_backups=3
mysql_host=db
mysql_port=3306
mysql_user=epusdt
mysql_passwd=your_mysql_user_password
mysql_database=epusdt
mysql_table_prefix=
mysql_max_idle_conns=10
mysql_max_open_conns=100
mysql_max_life_time=6
redis_host=redis
redis_port=6379
redis_passwd=
redis_db=5
redis_pool_size=5
redis_max_retries=3
redis_idle_timeout=1000
queue_concurrency=10
queue_level_critical=6
queue_level_default=3
queue_level_low=1
tg_bot_token=your_telegram_bot_token
tg_proxy=
tg_manage=your_telegram_user_id
api_auth_token=your_api_auth_token
order_expiration_time=10
forced_usdt_rate=Make sure to replace:
your_domain.comwith your actual domain.your_mysql_user_passwordwith the password set in the Docker Compose file.your_telegram_bot_tokenandyour_telegram_user_idwith your bot token and user ID.your_api_auth_tokenwith a secure token for API authentication.
Step 6: Initialize the Database
Create and initialize the database using the provided SQL file. First, create epusdt.sql:
vim epusdt.sqlPaste the SQL schema from the original guide, then run:
docker exec -i epusdt-db-1 sh -c 'exec mysql -uepusdt -pyour_mysql_user_password epusdt' < epusdt.sqlStep 7: Start the Services
Launch the services with Docker Compose:
docker-compose up -dCheck the logs to ensure everything started correctly:
docker logs -f epusdt_epusdt_1Look for http server started on [::]:8000 in the output.
Step 8: Set Up Reverse Proxy
For security and HTTPS, set up a reverse proxy using Nginx Proxy Manager or directly via Nginx.
If using Nginx Proxy Manager:
- Add a new proxy host with your domain.
- Set the forward IP to your server’s IP and the port to
8000. - Enable SSL certificates.
For direct Nginx configuration, use:
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Step 9: Configure DuJiaoKa for USDT Payments
- Log in to your DuJiaoKa admin panel.
- Navigate to Configuration > Payment Methods.
Enable epusdt and enter:
- Merchant ID: The
api_auth_tokenfromepusdt.conf. - Merchant Key:
https://your_domain.com/api/v1/order/create-transaction
- Merchant ID: The
- Use your Telegram bot to add a USDT wallet address for receiving payments.
Frequently Asked Questions
What is USDT?
USDT (Tether) is a cryptocurrency stablecoin pegged to the US dollar. It combines the stability of fiat currency with the flexibility and speed of digital asset transactions.
Why use Docker for this setup?
Docker simplifies deployment, ensures environment consistency, and makes updates and maintenance straightforward. It isolates the payment system from other services for enhanced security.
Can I use another cryptocurrency instead of USDT?
The epusdt system is specifically designed for USDT transactions. While other cryptocurrencies might be integrated with custom development, USDT is recommended for its stability and wide acceptance.
Is this setup legal?
Accepting cryptocurrency payments is legal in many jurisdictions. However, you should consult local regulations regarding cryptocurrency transactions and tax obligations to ensure full compliance.
How do I update epusdt?
Updating is simple with Docker. Navigate to your installation directory, run docker-compose pull to get the latest image, then docker-compose up -d to restart the services with the update.
What if I encounter issues during setup?
Check the logs using docker logs -f epusdt_epusdt_1 for error messages. Ensure all credentials and configurations in epusdt.conf and docker-compose.yml match, and verify that your domain points correctly to your server.
Final Thoughts
Integrating USDT payments into your DuJiaoKa store via Docker is a powerful way to expand your payment options and cater to a global audience. This setup is efficient, scalable, and leverages modern container technology for ease of use.
For further customization or troubleshooting, refer to the epusdt GitHub repository or community forums. 👉 Explore more Docker project guides
Enjoy seamless cryptocurrency transactions and happy selling!