Go back

How to run TrueConf Server in a Docker container

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/truetrueconf/trueconf-server

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:

  1. Install necessary software package to work with the repositories via HTTPS:
  2. Import official Docker GPG key:
  3. Use the following command to set up the stable repository:
  4. Install Docker and all the relevant packages:
  5. Verify that the installation has been successful:

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:

where [OPTIONS] are additional parameters. For instance, a command which is run the first time:

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.

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.

It is required to forward ports mandatory for TrueConf Server: 80, 443, 4307.

If you need to provide access for TrueConf Server additional ports, (e.g. for WebRTC), you should also specify them:

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 login tc_admin and password password 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 ID
    • Serial – registration key without the first four or five characters, e.g., if your registration key is AAAAA-BBBB-CCCC-DDDD, you should enter BBBB-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 be ServerName 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:/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.

Stopping and restarting the container

To stop the container, please run the command:

where vcs_server is your container’s name or ID. To find out this parameter, please run the command sudo docker ps -a, and you will get a full list of containers and information about their statuses.

To restart the container that has been stopped earlier, please run the command:

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:

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 directory on the host as shown before.

These are the three authorization files which have to be created by executing the following command:

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:

  1. Install apache2-utils utility package which contains htpasswd to manage secret passwords:
  2. 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:

where

  • new_admin – a new admin’s login
  • password –password
  1. 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:
  2. 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:
  3. 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:

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 pscommand.


Still have questions? Please contact our support team directly via online chat.

Sign up for newsletter