Free, Open-source Chat for a conversation with a random interlocutor. The WebRTC technology is used, which performs a peer-to-peer connection.
clone https://github.com/andchir/openchatroulette.git
- Open and edit configuration files: ".env" and "openchatroulette/src/environments/environment.prod.ts".
- Back up your env files:
cp .env .env_copy
,cp openchatroulette/src/environments/environment.prod.ts openchatroulette/src/environments/environment.prod.ts_copy
. - Install dependencies:
cd openchatroulette
->npm install
->cd openchatroulette
->npm install
. - Build static production files (html, css, js):
npm run build
. - Return to root folder:
cd ..
. Download and unpack MaxMind's "GeoLite2-Country_xxx.tar.gz" to "geoip" folder. - Install process manager for NodeJS:
sudo npm install -g pm2
- Start server:
pm2 start server/peer-server.js
. - Open in browser: "https://yourdomain.com" or "http://localhost:9000".
- Look application status:
pm2 info peer-server
orpm2 monit
.
- Install STUN/TURN server. For example: https://github.com/coturn/coturn
- Open and edit file "openchatroulette/src/environments/environment.prod.ts".
You can edit "stun_urls", "turn_urls", "turn_username", "turn_credential". - Build production files again:
cd openchatroulette
->npm run build
.
URL: https://yourdomain.com/chatadmin
or http://localhost:9000/chatadmin
Use ADMIN_USERNAME and ADMIN_PASSWORD from .env
.
server {
listen 80;
server_name website.domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name website.domain.com;
client_max_body_size 250m;
ssl_certificate /etc/letsencrypt/live/mydomain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain/privkey.pem;
location / {
proxy_pass https://localhost:9000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
}
}
- Angular with NGXS
- TypeScript
- NodeJS
- PeerJS
- Bootstrap
- MaxMind GeoIP2
- other...
Run in development mode:
npm run start
Extract localization:
npm run extract-i18n