-
Notifications
You must be signed in to change notification settings - Fork 1
Quickly set up KiwiIRC
This is the install process for setting up KiwiIRC immediately, on Ubuntu.
As root:
apt-get install python-software-properties python g++ make screen
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs
Then:
adduser usernamehere
Follow the prompts provided by that command. You can run KiwiIRC as root, and have it change to the user that you just added prior to this step. You'll find this option in config.js
However, for our setup, we use nginx and KiwiIRC. nginx automatically redirects normal http traffic to https traffic. From there, we use iptables PREROUTING to transparently redirect port 443 traffic to port 9000, our SSL port for KiwiIRC.
Then:
su usernamehere
cd /home/usernamehere
Finally:
Download the Kiwi source or clone the git repository:
git clone [email protected]:prawnsalad/KiwiIRC.git && cd KiwiIRC
Install the dependencies:
npm install
Copy and edit the configuration file as needed:
cp config.example.js config.js
nano config.js
Make sure the client code is built:
./kiwi build
Or, for faster roll-out, use the configuration we supply to you, but note that this is very specific to FurryAvalon. In addition, if you are linking to FurryAvalon IRC, you MUST get the configuration from Keiro to allow the Webchat to pass the IP of the user to your server.
Note: For upgrades to the KiwiIRC infrastructure, we do:
git fetch/pull (one or the other, not both! ie, git pull OR git fetch)
git merge
To be able to redirect port 80 traffic to port 9091, we do the following, as root:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 9000
iptables -t nat -I PREROUTING --src 0/0 --dst iphere -p tcp --dport 443 -j REDIRECT --to-ports 9000
iptables-save
You will then have port 443 traffic transparently redirected to port 9091 on the server itself, so that users do not need to remember how to prepend the port number.
To generate an SSL certificate in SSH, do the following:
openssl genrsa -des3 -out server.key 2048
Alternatively, if you do not wish to deal with the passphrase issues, though there are ways to remove the passphrase after you initially create the certificate and CSR:
openssl genrsa -out www.key 2048
Follow prompts.
openssl req -new -key server.key -out server.csr
then:
nano server.csr
Copy/pasta the CSR and provide to SSL provider.
Wait for SSL certificate.
Finally, do the following:
cat ca.crt >> server.crt
Then when that's done, to run KiwiIRC with SSL if you have a passphrase in your SSL certificate:
screen -S Webchat
Finally:
./kiwi -f
When you've verified that KiwiIRC is running with SSL successfully, CTRL + A + D to detach from the running screen session.
Note: To allow users to embed the webchat, you need to set it up as follows for users:
<iframe src="https://webchat.furryavalon.net/kiwi/?nick=ExampleUser|?#FurryAvalon" style="border:0; width:100%; height:450px;"></iframe>