Table of contents
- Breaf description
- When should I use pychat
- How to run on my own server
- Contributing and development setup
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
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 pychat.org, 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
- Open https://localhost
Run prod docker image
- You need create ssl certificates, place
certificate.crtin current directory. For example
openssl req -nodes -new -x509 -keyout server.key -out certificate.crt -days 3650
- Download settings_example.py 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/settings_example.py:/srv/http/chat/settings.py -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
docker exec -it containerId bash
Run without docker
Take a look at INSTALL.md
Contributing and development setup:
To run chat in development take a look at INSTALL.md
For development tips also check Contributing.md