cd wplace-masterserver
./start.shThis will:
- Build and start all Docker containers
- Initialize the PostgreSQL database
- Start Redis for caching
- Launch the FastAPI backend on port 8008
- Launch the Astro frontend on port 3000
Open your browser and navigate to: http://localhost:3000
You'll see the WPlace Master Dashboard with:
- Connected Slaves panel (initially empty)
- Control Panel for managing bots
- Real-time telemetry display
- Activity logs
To connect browser instances as slaves:
- Install the WPlace AutoBOT Chrome extension
- Navigate to https://wplace.live
- Click the extension icon and select "Slave Mode"
- Create a new bookmark with this JavaScript code:
javascript:(async()=>{const U="https://raw.githubusercontent.com/Alarisco/WPlace-AutoBOT/refs/heads/main/Auto-Slave.js";try{const r=await fetch(U,{cache:"no-cache"});if(!r.ok)throw new Error(r.status+" "+r.statusText);const code=await r.text();const blob=new Blob([code+"\n//# sourceURL="+U],{type:"text/javascript"});const blobUrl=URL.createObjectURL(blob);try{await new Promise((ok,err)=>{const s=document.createElement("script");s.src=blobUrl;s.onload=ok;s.onerror=err;document.documentElement.appendChild(s);});}catch(e){await import(blobUrl);}}catch(e){alert("[Auto-Slave] Could not load/inject: "+e.message+"\nTry another page or use Option C (module).");})();- Navigate to https://wplace.live
- Click the bookmarklet
- Navigate to https://wplace.live
- Open Developer Tools (F12)
- Go to Console tab
- Paste and execute the Auto-Slave.js code
- Select Connected Slaves: Check the boxes next to the slaves you want to use
- Choose Bot Mode: Mode will be auto-detected from uploaded project file
- Upload Project File (optional): For Image/Guard modes, upload a JSON configuration file
- Select Charge Strategy: Choose how to distribute pixel placement charges
- Click Start Session: Begin coordinated bot operation
- Shows all browser instances connected as slaves
- Displays slave ID, status, and connection indicator
- Use checkboxes to select which slaves to include in sessions
- Bot Mode: Auto-detected from project file - Image (auto-paint) or Guard (protect/repair)
- Project File: Upload JSON configurations for Image/Guard bots
- Charge Strategy:
- Balanced: Distribute charges evenly across all slaves
- Drain One Slave: Use up one slave's charges before moving to the next
- Priority Based: Use slaves in order of selection
- Repaired Pixels: Total pixels placed/repaired across all slaves
- Missing Pixels: Pixels that need attention
- Absent Pixels: Pixels completely missing from protected areas
- Remaining Charges: Total charges available across all slaves
- Real-time log stream from all connected slaves
- Shows connection events, bot actions, and errors
- Automatically scrolls to show latest activity
- Purpose: Automatically paint pixel art from uploaded images
- Configuration: Upload a JSON file with image URL and coordinates
- Use Case: Collaborative art creation with multiple accounts
- Purpose: Protect and repair existing pixel art
- Configuration: Define protected areas via JSON coordinates
- Use Case: Defend community art from vandalism
{
"image_url": "https://example.com/pixel-art.png",
"start_x": 100,
"start_y": 100,
"scale": 1,
"dithering": false
}{
"protected_areas": [
{
"name": "Logo Area",
"x1": 100,
"y1": 100,
"x2": 200,
"y2": 200,
"priority": "high"
}
],
"repair_threshold": 5
}# View all service logs
docker-compose logs -f
# View specific service logs
docker-compose logs -f server
docker-compose logs -f ui
# Check service health
curl http://localhost:8008/healthSlaves not connecting:
- Ensure the Master server is running on localhost:8008
- Check browser console for WebSocket connection errors
- Verify firewall settings allow connections to port 8008
Dashboard not loading:
- Confirm Astro frontend is running on port 3000
- Check Docker container status:
docker-compose ps - Review nginx logs:
docker-compose logs ui
Database errors:
- Restart PostgreSQL:
docker-compose restart postgres - Check database connectivity:
docker-compose exec postgres pg_isready -U wplace
- Optimal Slave Count: 3-5 slaves per session for best coordination
- Charge Management: Use "Balanced" strategy for consistent progress
- Network Stability: Ensure stable internet connection for all slave browsers
- Resource Usage: Monitor CPU/memory usage with many concurrent slaves
# Stop all services
docker-compose down
# Stop and remove all data (reset)
docker-compose down -v- The system is designed for local development/testing
- For production use, implement proper authentication
- Use HTTPS and WSS in production environments
- Consider rate limiting and abuse prevention
The FastAPI backend provides REST endpoints for programmatic control:
# Get connected slaves
curl http://localhost:8008/api/slaves
# Create a project
curl -X POST http://localhost:8008/api/projects \
-H "Content-Type: application/json" \
-d '{"name": "Test Project", "mode": "Image", "config": {}}'
# Start a session
curl -X POST http://localhost:8008/api/sessions/{session_id}/startConnect directly to WebSocket endpoints for real-time updates:
// UI updates
const uiWs = new WebSocket('ws://localhost:8008/ws/ui');
// Slave connection
const slaveWs = new WebSocket('ws://localhost:8008/ws/slave');This completes the basic usage guide. For more advanced features and customization, refer to the API documentation at http://localhost:8008/docs when the server is running.