TrueConf Server video conferencing platform can be installed both on Windows OS and on various Linux distros. For even more convenient deployment you can use our Docker container that already contains TrueConf Server. The Docker container is available in a public repository, follow this link to download:
https://hub.docker.com/r/trueconf/trueconf-server
Table of Contents
What is Docker?
Docker is software package designed for delivering applications to physical and virtual machines and running these applications in an isolated environment (so-called container). In its turn, the container is created from the image, which contains packaged software and all the necessary dependencies. The machine where you installed the docker engine and the environment where your containers operate is called host (e.g. your computer).
A number of popular images are hosted in public repositories on the Docker Hub official portal.
This way of software deployment is often used thanks to its versatility, lower system resources usage, quick and easy launch, simple maintenance and rich database of publicly available images. Additionally, containers are independent and isolated from each other.
This article shows how to install Docker on Debian 10 and run TrueConf Server container.
If you want to learn how to install Docker on Windows and macOS, check out the official guide.
In order to run the following commands you should have sudo app, while user’s name has to belong to the respective group. If you’d like to check whether you have sudo installed, please run sudo -V
command. If you don’t have sudo by default, you can install it by using apt install sudo
(it should be run under the root account). To add another user with user login to the sudo group, please run sudo usermod -a -G sudo user
. You should also add this user to the docker group as shown in the official guide.
Step 1. Installing Docker
In order to install Docker on Debian from the official repository you should run the following commands in your console:
- Install necessary software package to work with the repositories via HTTPS:
1sudo apt update && sudo apt install -yq apt-transport-https ca-certificates curl gnupg lsb-release - Import official Docker GPG key:
1curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg - Use the following command to set up the stable repository:
123echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - Install Docker and all the relevant packages:
1sudo apt update && sudo apt install -yq docker-ce docker-ce-cli containerd.io - Verify that the installation has been successful:
1sudo docker run hello-world
This command downloads a test image, opens the image in an isolated container, displays relevant information in the terminal console and stops the container automatically.
Step 2. Downloading and running TrueConf Server container
In order to create and run TrueConf Server container from an image automatically, the docker run command is used. If you don’t have image file in your system it will be downloaded automatically from the public repository:
1 |
sudo docker run [OPTIONS] trueconf/trueconf-server:testing |
where [OPTIONS]
are additional parameters. For instance, a command which is run the first time:
1 |
sudo docker run -d -p 80:80 -p 443:443 -p 4307:4307 -e ADMIN_USER=tc_admin -e ADMIN_PASSWORD=12345 -v /home/$USER/trueconf/server/lib:/opt/trueconf/server/var/lib trueconf/trueconf-server:release |
downloads TrueConf Server image, then creates and runs the container in the background, and returns control of the terminal to the user. Meanwhile, all the necessary ports for TrueConf Server operation will be open. The control panel access is given to the admin with username tc_admin
and password 12345
, while TrueConf Server working directory will be mounted to the host directory by the path /home/$USER/trueconf/server
.
Below we will review some of the used parameters which we can combine with the standard Docker options described in the official guide. For instance, you can enter key --name
in order to give name to the container for more convenient usage.
$USER
is an environment variable of the Linux family; when used in commands, it is automatically replaced by the current user’s login name.Host network connection (–network=host)
In order to establish the container connection with the network run the command --network=host
. It allows you to use the host network connection.
If you have specified this parameter, it will not be necessary to configure port forwarding described below. However, you have to make sure that the required ports are opened on the host machine, at least 80, 443, and 4307.
Port forwarding (-p [host_port]:[container_port]/[protocol])
Binding of the host machine port [host_port]
to port [container_port]
of the container using [protocol]
(if not specified, tcp is used by default). Port ranges are specified in the same way, e.g. -p 53000-55000:53000-55000/udp
.
If you need to provide access for TrueConf Server additional ports, (e.g. for WebRTC), you should also specify them:
1 |
sudo docker run -d -p 80:80 -p 443:443 -p 4307:4307 -p 53000-55000:53000-55000/udp -e ADMIN_USER=tc_admin -e ADMIN_PASSWORD=12345 -v /home/$USER/trueconf/server/lib:/opt/trueconf/server/var/lib trueconf/trueconf-server:release |
Setting environment variables (-e [variable]=[value])
Setting environment variables for the container. You can set:
-e ADMIN_USER=tc_admin -e ADMIN_PASSWORD=password
– creates a TrueConf Server admin account with logintc_admin
and passwordpassword
inside the container. Please note that this user is not related to host OS users, which is why you can use any authorization data.-e INIT_DB=true
– creates a database cluster for initial use in the force mode. The database is mounted on the host volume. This option erases all the previous TrueConf Server settings such as registration information, user and group list, conferences profiles, etc. Only video conference recordings will be saved, however they won’t be displayed in the control panel.-e ServerID=xxxx -e Serial=xxxx -e ServerName=xxxx
– automatic TrueConf Server registration (if you have already received TrueConf Server registration key), where:ServerID
– Server IDSerial
– registration key without the first four or five characters, e.g., if your registration key isAAAAA-BBBB-CCCC-DDDD
, you should enterBBBB-CCCC-DDDD
ServerName
– domain name (FQDN) to get the access to the server, e.g.,video.company.name
.
Please note that to start registration you should enter all the three parameters at once.
-e ServiceAddress
– external video conferencing server address to get access outside the corporate network. If it’s not set, it will beServerName
by default.
Mounting directories (-v [host_path]:[container_path])
Mounting [host_path]
directory on the host to the [container_path]
container directory. You can use a directory mounting to save log files and other generated server data to the [host_path]
path. It includes such data as server settings, accounts, conferences list, recordings, SSL certificates and user scripts, etc. After the container stops, the data is saved and is available next time the container is running. If the [host_path]
doesn’t exist on the host, it will be created automatically.
We will show available paths for mounting with examples below:
-v /home/$USER/trueconf/server/lib:/opt/trueconf/server/var/lib
– saving all the files in TrueConf Server working directory except for the log files in the/home/$USER/trueconf/server
host directory.-v /home/$USER/trueconf/server/log:/opt/trueconf/server/var/log
– saving log files that generate only when TrueConf Server is running in the/home/$USER/trueconf/server/log
host directory.-v /path/to/custom/certs:/ssl
– specifies path to the/path/to/custom/certs
host directory with SSL certificate files to be used by the server in the container. In order to apply SSL certificates after the mounting, please open the TrueConf Server control panel, go to Web → HTTPS section and select Use custom certificate in the HTTPS Mode drop-down list. Click Test configuration and Apply to save changes.-v /path/to/custom/scripts:/setup.d
– command for/path/to/custom/scripts
volume mounting with additional sh scripts files to be run at the container startup.
- TrueConf Server works only with the .crt format. So, the folder should include two files with the following extensions: .crt for the certificate file and .key for the key file. If your certificate is in a different format, convert into .crt as it is described in our article about HTTPS configuration.
- The files should be named in the following way: the certificate — tls.crt, the key — tls.key.
Container name and ID
To use a number of commands, one has to know the name and identifier (ID) of the container. To get this information, run this command:
1 |
sudo docker ps -a |
You will get the list of all containers and their statuses.
To display only running containers, execute this command:
1 |
sudo docker ps |
In the Docker documentation, you can find more examples of how the ps
command can be used.
Stopping and restarting the container
To stop the container, please run the command:
1 |
sudo docker stop vcs_server |
where vcs_server
is the name or identifier of your container.
To restart the container that has been stopped earlier, please run the command:
1 |
sudo docker start vcs_server |
One-time container running
For testing purposes you may need to run one-time container. This container will be deleted automatically after its stop. You can do it by running --rm
.
Here’s how one-time container launch command with an admin’s login and password specified will look like:
1 |
sudo docker run --rm --network=host -e ADMIN_USER=tc_admin -e ADMIN_PASSWORD=12345 trueconf/trueconf-server:stable |
Step 3. Registering TrueConf Server
If you didn’t register your TrueConf Server earlier by using -e key , you can register it via the TrueConf Server control panel. Open the control panel in the browser on any of your local network computers and enter the IP address of the server where the container is running.
Step 4. Adding TrueConf Server administrators
Before adding new users with admin access to the TrueConf Server control panel, please make sure that the container has been run, and its directory /opt/trueconf/server/var/lib
has already been mounted to the /home/$USER/trueconf/server/lib
directory on the host as shown before.
These are the three authorization files which have to be created by executing the following command:
1 |
sudo touch /home/$USER/trueconf/server/docker/passwd /home/$USER/trueconf/server/docker/tcadmins /home/$USER/trueconf/server/docker/tcsecadmins |
where
- passwd – a login and an encrypted password
- tcadmins – a list of server administrator logins with full access
- tcsecadmins – a list of server administrator logins with Security Admin access level.
After that please follow the next steps:
- Install apache2-utils utility package which contains htpasswd to manage secret passwords:
1sudo apt install -yq apache2-utils - Generate a password for a new login. The password will be saved as passwd file in the directory from which the terminal has been run:
1htpasswd -c -d -b passwd new_admin password
where
new_admin
– a new admin’s loginpassword
– password
- Add content from the generated passwd file to the
/home/$USER/trueconf/server/docker/passwd
file. The file is on the volume which is mounted on the host. For this purpose you can use a text editor such as vim or nano. Please run it under the root account or using sudo. You can also run the command:
1sudo bash -c 'cat passwd >> /home/$USER/trueconf/server/docker/passwd' - Add the admin login you have created either to tcadmins or tcsecadmins file, depending on the level access you want to grant to the admin:
1sudo bash -c 'echo new_admin >> /home/$USER/trueconf/server/docker/tcadmins' - To check if you have added admins successfully, please visit TrueConf Server guest page, click Administrator login and sign in with a new account.
Step 5. Adding container to run automatically
In order to start TrueConf Server container automatically, e.g, after host machine reboot, please use --restart
key. You can specify the key by running the update
command:
1 |
sudo docker container update --restart always vcs_server |
where vcs_server
is your container’s name or ID.
You can also do it at the time when the container is running.
You can view information about the container which is running by using sudo docker ps
command.
Updating TrueConf Server in the container
For TrueConf Server 5.2.9 and above
If TrueConf Server 5.2.9 or above is run in the container, you will only need to download a new image to update (e.g., you may use the stable tag to download the release version).
- Download an image with this command:
1sudo docker pull trueconf/trueconf-server:stable
- Stop the current container with TrueConf Server as it is described before.
1sudo docker stop vcs_server
- Run the new container from the image downloaded at step 1 ( the example with the stable tag). You will need to specify the paths for mounting directories (they must be identical to the ones used previously):
1sudo docker run -d --network=host -e ADMIN_USER=tc_admin -e ADMIN_PASSWORD=12345 -v /home/$USER/trueconf/server/lib:/opt/trueconf/server/var/lib trueconf/trueconf-server:stable
If everything is installed successfully, you may delete the previous containers and the image as it is described below.
For TrueConf Server 5.2.8 or below
If you run TrueConf Server 5.2.8 or below in the container, you will need to export information from the database to update to version 5.2.9 or above.
- Download the image with the new version (e.g., by using the stable tag to download the release version):
1sudo docker pull trueconf/trueconf-server:stable
- Go to the command shell (terminal) of the container where TrueConf Server is deployed:
1sudo docker exec -it vcs_server bash
where
vcs_server
is the name or identifier of your container. - Create a backup copy of the TrueConf Server database:
1su -s /bin/sh postgres --command='PGCLUSTER=11/trueconf pg_dumpall -p 5433 -U postgres > /opt/trueconf/server/var/lib/database/11/trueconf/tcs_db.dump'
- As a result, the backup copy will be saved in the mounted directory at the path
1<mounted_lib_path>/database/11/trueconf/tcs_db.dump
where
is the path specified when the container was started. Here is an example of the path to the backup file:1/home/$USER/trueconf/server/lib/database/11/trueconf/tcs_db.dump - Exit the container terminal:
1exit - Copy the backup copy of the database to any convenient location, for example
/home/$USER/backup
:1sudo cp /home/$USER/trueconf/server/lib/database/11/trueconf/tcs_db.dump /home/$USER/backup - Execute the following command to create and run the container with the new version of TrueConf Server:
1sudo docker run -d --network=host -e ADMIN_USER=tc_admin -e ADMIN_PASSWORD=12345 -v /home/$USER/trueconf/server:/opt/trueconf/server/var/lib -e INIT_DB=TRUE -e DUMP_PATH=/opt/backup -v /home/$USER/backup:/opt/backup trueconf/trueconf-server:stable
where
/home/$USER/backup
is the directory with the database backup file.In addition to the database backup path, use the
-v
key to specify the paths for mounting directories (they must be identical to the ones used before). - Go to the guest page of the server by using the IP address of the machine where the container is running. Make sure that all the settings have been imported. If everything works as it should, the previous container and image can be deleted as it is described below.
Deleting the container and image
If you no longer need the container, you can delete it with the rm
command:
1 |
sudo docker rm vcs_server |
where vcs_server
is the name or identifier of your container. The corresponding image will remain even if all containers are deleted. Besides, the directory which was used for mounting will also remain in the OS.
To delete a running container, add the key --force
:
1 |
sudo docker rm --force vcs_server |
To delete an image (e.g., if you have downloaded a new image and the old one is no longer needed):
- Check the list of all images together with their tags and identifiers:
1sudo docker images
- To delete the selected image, run the
rmi
command, for example:1sudo docker rmi trueconf/trueconf-server:5.2.8.10213In this case, you will delete the image with the repository and tag
trueconf/trueconf-server:5.2.8.10213
. If this image no longer has any tags, it will also be deleted. To learn more about the use of this command, read the official Docker documentation. - Since the
rmi
command does not free up space on the OS storage, you will need to executesystem prune
command to delete unnecessary images and containers:1sudo docker system prune -a