Installation Guide
Prerequisites
Заголовок раздела «Prerequisites»- Node.js 18 or higher
- npm or yarn
- Java 17+ (for APK building)
- Docker & Docker Compose (optional, for containerized deployment)
Installation Methods
Заголовок раздела «Installation Methods»Method 1: Docker (Recommended)
Заголовок раздела «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
Заголовок раздела «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
Заголовок раздела «Configuration»Environment Variables
Заголовок раздела «Environment Variables»Create a .env file in the root directory:
NODE_ENV=productionWEB_PORT=22533CONTROL_PORT=22222Port Configuration
Заголовок раздела «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
Заголовок раздела «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
Заголовок раздела «Production Deployment»Using Docker
Заголовок раздела «Using Docker»- Configure environment variables
- Set up reverse proxy (nginx/traefik) for HTTPS
- Configure firewall rules
- Set up SSL certificates
Manual Deployment
Заголовок раздела «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
Заголовок раздела «Troubleshooting»Port Already in Use
Заголовок раздела «Port Already in Use»Change ports in includes/const.js or stop the conflicting service.
Cannot Connect Devices
Заголовок раздела «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
Заголовок раздела «Docker Issues»See Docker README for troubleshooting.