Installation Guide
Prerequisites
Section titled “Prerequisites”- Node.js 18 or higher
- npm or yarn
- Java 17+ (for APK building)
- Docker & Docker Compose (optional, for containerized deployment)
Installation Methods
Section titled “Installation Methods”Method 1: Docker (Recommended)
Section titled “Method 1: Docker (Recommended)”- Clone the repository:
git clone https://github.com/localzet/device-control.gitcd device-control- Start the server:
cd dockerdocker-compose up -d- Access the web interface at http://localhost:22533
Method 2: Manual Installation
Section titled “Method 2: Manual Installation”- Clone the repository:
git clone https://github.com/localzet/device-control.gitcd device-control- Install dependencies:
npm install- Start the server:
npm start- Access the web interface at http://localhost:22533
Configuration
Section titled “Configuration”Environment Variables
Section titled “Environment Variables”Create a .env file in the root directory:
NODE_ENV=productionWEB_PORT=22533CONTROL_PORT=22222Port Configuration
Section titled “Port Configuration”Default ports:
- 22533 - Web interface (HTTP)
- 22222 - Socket.IO for device connections
To change ports, edit includes/const.js:
exports.web_port = 22533;exports.control_port = 22222;Building Android Client
Section titled “Building Android Client”See APK Building Guide for detailed instructions.
Quick build:
cd scripts/app-factory.\configure-server-url.ps1 -AutoDetect.\check-and-rebuild.ps1Production Deployment
Section titled “Production Deployment”Using Docker
Section titled “Using Docker”- Configure environment variables
- Set up reverse proxy (nginx/traefik) for HTTPS
- Configure firewall rules
- Set up SSL certificates
Manual Deployment
Section titled “Manual Deployment”- Use process manager (PM2, systemd):
pm2 start index.js --name device-control- Set up reverse proxy
- Configure firewall
- Enable auto-start on boot
Troubleshooting
Section titled “Troubleshooting”Port Already in Use
Section titled “Port Already in Use”Change ports in includes/const.js or stop the conflicting service.
Cannot Connect Devices
Section titled “Cannot Connect Devices”- Check firewall settings
- Verify server URL in APK
- Ensure devices are on the same network
- Check server logs for errors
Docker Issues
Section titled “Docker Issues”See Docker README for troubleshooting.