-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
112 lines (98 loc) · 3.03 KB
/
Copy pathsetup.bat
File metadata and controls
112 lines (98 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
@echo off
REM Radiant Stratum Proxy Setup Script for Windows
echo [*] Setting up Radiant Stratum Proxy...
REM Check if Docker is installed
docker --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Docker is not installed. Please install Docker Desktop first.
pause
exit /b 1
)
REM Check if Docker Compose is available
docker-compose --version >nul 2>&1
if errorlevel 1 (
docker compose version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Docker Compose is not available. Please install Docker Compose.
pause
exit /b 1
)
)
REM Create .env file if it doesn't exist
if not exist .env (
echo [*] Creating .env file...
REM Generate random password (simplified for Windows)
set RXD_PASS=rxd_%RANDOM%_%RANDOM%
(
echo # Radiant Node Configuration
echo RXD_RPC_USER=radiant_user
echo RXD_RPC_PASS=%RXD_PASS%
echo RXD_RPC_PORT=7332
echo RXD_P2P_PORT=7333
echo RXD_ZMQ_PORT=29332
echo RXD_ZMQ_RAW_PORT=29333
echo.
echo # Stratum Proxy Configuration
echo STRATUM_PORT=54321
echo TESTNET=false
echo LOG_LEVEL=INFO
echo SHOW_JOBS=false
echo USE_EASIER_TARGET=true
echo.
echo # ZMQ Configuration
echo ENABLE_ZMQ=true
echo RXD_ZMQ_ENDPOINT=tcp://radiant:29332
echo.
echo # Dashboard Configuration
echo ENABLE_DASHBOARD=true
echo DASHBOARD_PORT=8080
echo.
echo # Database Configuration ^(for historical data^)
echo ENABLE_DATABASE=true
echo.
echo # Variable Difficulty ^(optional^)
echo ENABLE_VARDIFF=false
echo VARDIFF_TARGET_SHARE_TIME=15.0
echo VARDIFF_MIN_DIFFICULTY=0.00001
echo VARDIFF_MAX_DIFFICULTY=0.1
echo.
echo # Notifications ^(optional - fill in to enable^)
echo # DISCORD_WEBHOOK_URL=
echo # TELEGRAM_BOT_TOKEN=
echo # TELEGRAM_CHAT_ID=
) > .env
echo [OK] .env file created with random password
) else (
echo [OK] .env file already exists
)
REM Create data directories
if not exist submit_history mkdir submit_history
if not exist data mkdir data
echo [OK] Data directories created
REM Check binaries
echo [*] Checking binaries...
if exist check-binaries.bat call check-binaries.bat
REM Build and start services
echo [*] Building and starting services...
docker compose build --no-cache
docker compose up -d
echo.
echo [SUCCESS] Setup complete!
echo.
echo [*] Service Status:
docker compose ps
echo.
echo [*] Next Steps:
echo 1. Wait for blockchain sync (check with: docker compose logs -f radiant)
echo 2. Connect your miner to localhost:54321
echo 3. View dashboard at http://localhost:8080
echo.
echo [*] Commands:
echo View logs: docker compose logs -f
echo Stop services: docker compose down
echo Restart: docker compose restart
echo.
echo [*] Monitoring:
echo RXD status: docker compose exec radiant radiant-cli getblockchaininfo
echo Proxy logs: docker compose logs -f stratum-proxy
pause