搭建 – Epusdt 新版本 0.0.8
手动部署
前置条件
- 如果准备从源码编译,需要与当前源码仓库
src/go.mod兼容的 Go 工具链(当前为Go 1.25.0) - 或者直接使用 GitHub Releases 发布包
- 一台 Linux 服务器
- 一个用于收银台和 API 的公网域名,例如
epusdt.dashenk.com - 生产环境建议使用 Nginx 或其他反向代理提供 HTTPS
- 一个安全的
api_auth_token - 可选但推荐填写
tron_grid_api_key
从源码编译
mkdir -p /opt/epusdt
cd /opt/epusdt
git clone https://github.com/GMwalletApp/epusdt.git
cd epusdt/src
go build -o /opt/epusdt/epusdt .
cp .env.example /opt/epusdt/.env
创建 .env
当前源码支持 sqlite、mysql、postgres 三种数据库方案。
最小 SQLite 示例:
app_name=epusdt
app_uri=https://epusdt.dashenk.com
log_level=info
http_access_log=false
sql_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
db_type=sqlite
sqlite_database_filename=
sqlite_table_prefix=
runtime_sqlite_filename=epusdt-runtime.db
queue_concurrency=10
queue_poll_interval_ms=1000
callback_retry_base_seconds=5
tg_bot_token=
tg_proxy=
tg_manage=
api_auth_token=请替换为高强度随机密钥
order_expiration_time=10
order_notice_max_retry=0
forced_usdt_rate=
api_rate_url=
tron_grid_api_key=
# 选填,可在 https://www.trongrid.io/ 申请 API Key,提高 TRON 网络请求稳定性
如果你使用 MySQL:
db_type=mysql
mysql_host=127.0.0.1
mysql_port=3306
mysql_user=your_user
mysql_passwd=your_password
mysql_database=epusdt
mysql_table_prefix=
mysql_max_idle_conns=10
mysql_max_open_conns=100
mysql_max_life_time=6
如果你使用 PostgreSQL:
db_type=postgres
postgres_host=127.0.0.1
postgres_port=5432
postgres_user=your_user
postgres_passwd=your_password
postgres_database=epusdt
postgres_table_prefix=
postgres_max_idle_conns=10
postgres_max_open_conns=100
postgres_max_life_time=6
这里部署的是 Epusdt 支付服务本体,不是
epusdt-docs文档站。
先直接启动测试
chmod +x /opt/epusdt/epusdt
cd /opt/epusdt
./epusdt http start
配置 Nginx 反向代理
server {
listen 80;
server_name epusdt.dashenk.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name epusdt.dashenk.com;
ssl_certificate /etc/ssl/cf/dashenk.com.crt;
ssl_certificate_key /etc/ssl/cf/dashenk.com.key;
ssl_protocols TLSv1.2 TLSv1.3;
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;
}
}
创建 systemd 服务文件
/etc/systemd/system/epusdt.service
[Unit]
Description=Epusdt Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/epusdt
ExecStart=/opt/epusdt/epusdt http start
# 自动重启(防止挂掉)
Restart=on-failure
RestartSec=5
# 最小资源占用优化
Nice=10
CPUWeight=10
IOSchedulingClass=idle
IOSchedulingPriority=7
# 限制资源(防止吃满)
MemoryMax=200M
TasksMax=50
# 安全增强(可选但推荐)
NoNewPrivileges=true
PrivateTmp=true
[Install]
WantedBy=multi-user.target
启动命令
systemctl daemon-reload
systemctl start epusdt
systemctl status epusdt
systemctl enable epusdt
journalctl -u epusdt -f
📌 版权声明
文章作者:大神K
原文链接:https://dashenk.com/2026/04/21/%e6%90%ad%e5%bb%ba-epusdt-%e6%96%b0%e7%89%88%e6%9c%ac-0-0-8/
版权说明:本文为原创内容,转载请注明出处。