An open source live media chat.
pawnhearts 3ecfcd92a7
Merge pull request #160 from pawnhearts/master
4 months ago
lib pin admin command 4 months ago
node_modules/captcha Revert "odili fork pull request" 1 year ago
pages Tons of various changes 1 year ago
public pin admin command 4 months ago
.gitignore added streaming (using libs, poorly credited) and IRCd 4 years ago
AD.png Revert "odili fork pull request" 1 year ago
LICENSE added initial license file 5 years ago
Procfile Separate routes and models 5 years ago
README.md readme changes 1 year ago
TODO.md added TODO file 5 years ago
banners.py new files 1 year ago
block_tor modified tor blocking to use iptables 5 years ago
block_tor.py new files 1 year ago
bower.json remove vulnerable BBCode script, reimplement some tags 5 years ago
build_client_js.sh remove vulnerable BBCode script, reimplement some tags 5 years ago
config.js pinned threads, wiping, silent, max_convos/max_posts, autorotation 4 months ago
genflags.py new files 1 year ago
package.json Tons of various changes 1 year ago
restart_node massive update 4 years ago
run_livechan massive update 4 years ago
stickers.py new files 1 year ago
tor_list.txt update 5 years ago
tripflags.py new files 1 year ago

README.md

livechan

livechan is a live IRC like image board written in node.js.

Installation

Requirements:

Suggested OS is ubuntu 14.04

The commands below are based on a Debian installation, other distros / operating systems will vary.

1) Install git:

sudo apt-get install git

2) Install node.js and NPM:

sudo apt-get install nodejs npm nodejs-legacy

(nodejs-legacy creates a symlink from /usr/bin/node to Debian’s location /usr/bin/nodejs, needed for installation scripts that call “node”.)

3) Install MongoDB:

sudo apt-get install mongodb

4) Install ImageMagick:

sudo apt-get install imagemagick

5) Install the dependencies of the canvas module:

sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++

6) Install FFmpeg. See instructions at https://ffmpeg.org/download.html.

Add the sources from http://www.deb-multimedia.org/ to your /etc/apt/sources.list and do:

sudo apt-get update
sudo apt-get install deb-multimedia-keyring
sudo apt-get update
sudo apt-get install ffmpeg

Alternately you can download a static build from http://ffmpeg.gusari.org/static/ and copy the extracted binaries to /usr/local/bin:

sudo cp ffmpeg ffprobe /usr/local/bin

Note that many distributions come with Libav in place of FFmpeg. FFmpeg is recommended. Using Libav instead should be possible, but will require appropriate changes to format-image.js and generate-thumbnail.js in lib/utils.

If you do not want audio/video support, you should edit your config.js so that video_formats and audio_formats are both empty arrays.

7) Clone the git repo

git clone https://github.com/emgram769/livechan-js.git

8.a) Install the dependencies with npm install

cd livechan-js; npm install

8.b) Download a country lookup database

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; gunzip GeoLiteCity.dat.gz

9) Restore the changes to the captcha module which were overwritten by npm install:

git checkout node_modules/captcha/captcha.js

10) Get ircd.js modified for livechan

cd ..; git clone https://github.com/emgram769/ircd.js; cd ircd.js; npm install; cd ../livechan-js

11) Make sure the public/tmp/uploads and public/tmp/thumb folders are writable

chmod 777 public/tmp/uploads public/tmp/thumb

12) Set the admin password

node lib/set-password.js

This is used for the admin commands to delete/change posts and ban users.

13) Run LiveChan

npm start

Nginx proxy config

Requires nginx 1.3+:

# the IP(s) on which your node server is running. I chose port 8083.
upstream app_livechan {
    server 127.0.0.1:8083;
}

# the nginx server instance
server {
    listen 0.0.0.0:80;
    server_name livechan.net;
    access_log /var/log/nginx/livechan.log;

    # pass the request to the node.js server with the correct headers and much more can be added, see nginx config options
    location / {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;

      proxy_pass http://app_livechan/;
      proxy_redirect off;
    }
}

Relevant links

Live instance: https://livebunker.rocks