Webitel was designed to be as accessible as possible, and can be set up on your own server. To make self-hosting very flexible, you have the following options:

Linux

Debian Stable or Ubuntu Server 64 bit is strongly recommended!

Docker and docker-compose

Install docker:

# apt-get install curl
# curl -sSL https://get.docker.com/ | sh
# docker --version
Docker version 18.03.0-ce, build 0520e24

Install docker-compose:

# curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose

Prepare webitel

Get shell scripts and socker-compose YML files from our GitHub:

$ sudo gpasswd -a ${USER} docker
$ cd /opt
$ sudo mkdir /opt/webitel
$ sudo git clone https://github.com/webitel/orchestration.git
$ sudo chown -R ${USER}:docker /opt/webitel /opt/orchestration
$ cd /opt/orchestration
$ git checkout v3.10.2

Configuration

Inside /opt/orchestration/env directory you will find configuration files with extension *.example. Copy examples to you one:

$ cd /opt/orchestration/env
$ for f in *.example; do cp $f `basename $f .example`; done

In the file env/environment, please, change 2 variables:


  • WEBITEL_HOST - FQDN for webitel server. It's also needed by TLS certificate.
  • WEBITEL_PASS - password for root user.

Linux kernel settings:

# sudo -s
# cat /opt/orchestration/etc/sysctl.conf >> /etc/sysctl.conf
# sysctl -p

Start Webitel on the system boot:

# cp /opt/orchestration/etc/cron.d/webitel /etc/cron.d/

Docker images

Pull docker images from the Docker Hub:

$ cd /opt/orchestration
./bin/bootstrap.sh pull

First run of the webitel:

$ cd /opt/orchestration
./bin/bootstrap.sh up -d

Let's Encrypt webitel

We recommend to use HTTPS for webitel and WebRTC. You can get a free TLS certificate from Let's Encrypt:
$ cd /opt/orchestration
./bin/bootstrap.sh letsencrypt
./bin/bootstrap.sh down -v
After all is done, change variables the file env/environment:
env/environment
export WEBITEL_WS="wss"
export WEBITEL_SSL="on"
export WEBITEL_PROTO="https"
export WEBITEL_HOST="vk.webitel.com"

Now, You may start webitel with HTTPS

$ cd /opt/orchestration
./bin/bootstrap.sh up -d

Add auto renew of the certificates

$ sudo cp /opt/orchestration/etc/cron.d/letsencrypt /etc/cron.d/

Check that all is work:

./bin/bootstrap.sh ps

If You wish to reboot webitel, please, use the command:

$ cd /opt/orchestration
./bin/reboot.sh

Now, Webitel is ready to go:

What's next ?