Skip to content
webchat via WebSockets/WebRTC that allows messaging/video call/screen sharing
Branch: master
Clone or download
Latest commit 816302b May 19, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
chat Added title May 12, 2019
docker-all Docker split autobuild May 12, 2019
docker Bumped docker alpine version May 30, 2018
fe fixed May 14, 2019
log Change main tornado ping process detection, Now it's via ping May 3, 2018
logo Added license to logo Jun 2, 2018
migrations Created and tested migration command for smileys Dec 31, 2017
rootfs moved to cloudflare dns May 12, 2019
screen_cast_extension ScreenShare seems to work Jul 26, 2018
templates Refactored separate components for nav: nav user, nav edit message Jun 20, 2018
.dockerignore Added nginx logs to log directory for docker_all May 29, 2018
.excludeMAIN Added speedup managent plugin Nov 15, 2018
.gitmodules Fixed bugs in script Dec 31, 2017 Update May 17, 2019
DefaultSmilies.cfpack REMOVED djangochat-config repository Dec 30, 2017 Fixed install May 12, 2019
LICENSE Create LICENSE May 17, 2017 Update May 19, 2019
_config.yml Set theme jekyll-theme-cayman Feb 28, 2018
config.json Video record seems to work Jul 11, 2018 Docker split autobuild May 12, 2019 REMOVED djangochat-config repository Dec 30, 2017 removed story module, replaced in favor to chat Nov 8, 2015
package.json Started implementing chat via vuejs + typescript Jun 9, 2018
requirements.txt Fixed docker for May 12, 2019
yarn.lock Started implementing chat via vuejs + typescript Jun 9, 2018

Scrutinizer Code Quality Code Health Codacy Badge

Live demo: Tutorial video

Table of contents


This is free web (browser) chat, that features:

  • Send instant text messages via websockets.
  • Send: images, smiles, anchors, embedded youtube, giphy, code highlight
  • Make calls and video conference using Peer to peer WebRTC.
  • Share screen during call or conference
  • Send files directly to another PC (p2p) using WebRTC + FileSystem Api (up to 50MByte/s, limited by RTCDataChannel speed)
  • Edit images with integrated painter (brush/line/reactangle/oval/flood fill/erase/crop/cpilboard paste/resize/rotate/zoom/add text/ctrl+a)
  • Login in with facebook/google oauth.
  • Send offline messages with Firebase push notifications
  • Responsive interface (bs like)+ themes
  • Admin interface with django-admin

Brief description

Pychat is written in Python with django. For handling realtime messages WebSockets are used: browser support on client part and asynchronous framework Tornado on server part. Messages are being broadcast by means of redis pub/sub feature using tornado-redis backend. Redis is also used as django session backend and for storing current users online. For video call WebRTC technology was used with stun server to make a connection, which means you will always get the lowest ping and the best possible connection channel. Client part is written with progressive js framework VueJs which means that pychat is SPA, so even if user navigates across different pages websocket connection doesn't break. Pychat also supports OAuth2 login standard via FaceBook/Google. Css is compiled from sass. Server side can be run on any platform Windows, Linux, Mac with Python 2.7 and Python 3.x.Client (users) can use the Pychat from any browser with websocket support: IE11, Edge, Chrome, Firefox, Android, Opera, Safari...

When should I use pychat:

By this time there're a lot of chats: skype, telegram, discord, slack, viber... What is the purpose of one more? Well, here's why:

  • You need a private chat for your company. Maybe you want to share it over private network, so only some people can access it.
  • You don't want your entire chat to be managable by 3rd party SaaS. 3rd party services can compromise your data or just disappear one day. You may also google for history leaks. Only with pychat you gain full controll over your chat.
  • You don't want to spend a penny on chat. While most of service come free in standard edition, they are still making money from you somehow. And when you've been using them a while, once you will discover that the feature that you need is paid. Forget about it all! Every single feature is free in pychat!
  • You need a custom feature in your chat that no other solutions provide. Codding chat from the scratch is really a quite long way (oh believe me). Just fork pychat and code anything you want there.
  • You just want the running chat and you don't have time on this nonsence. Follow the Build docker section. It's takes only a few minutes to setup an instance.

How to run on my own server:

You can always use, but if you want run Pychat yourself you have 3 options:

  • Test pychat with prebuilt docker image
  • Build docker image for production/test
  • Run Pychat for development
  • Set up for production w/o docker

Run test docker image

Please don't use this build for production, as it uses debug ssl certificate, lacks a few features and all files are located inside of container, meaning you will lose all data on container destroy.

  • Download and run image:
docker run -p 443:443 deathangel908/pychat-test

Run prod docker image

  • You need create ssl certificates, place server.key and certificate.crt in current directory. For example
openssl req -nodes -new -x509 -keyout server.key -out certificate.crt -days 3650
  • Download into current directory and edit it according comments in it. You need at least to set SECRET_KEY, you can use command below to generate it:
tr -dc 'A-Za-z0-9!@#$%^&*(\-\_\=\+)' < /dev/urandom | head -c 50
docker run -v $PWD/production.json:/srv/http/fe/production.json -v $PWD/ -v $PWD/server.key:/etc/nginx/ssl/server.key -v $PWD/certificate.crt:/etc/nginx/ssl/certificate.crt -v $PWD/volumes/mysql:/var/lib/mysql -v $PWD/volumes/photos:/srv/http/photos -v $PWD/volumes/redis:/var/lib/redis -v $PWD/volumes/migrations:/srv/http/chat/migrations -p 443:443 deathangel908/pychat
  • Open https://localhost and enjoy it! If something is broken you can check /srv/http/log/ in docker docker exec -it containerId bash

Run without docker

Take a look at

Contributing and development setup:

To run chat in development take a look at

For development tips also check

You can’t perform that action at this time.