Secure Chat Server with end-to-end encryption for rapid VPS deployment  TELEMPORIO

Secure Chat Server with end-to-end encryption for rapid VPS deployment

Telemporio combines self-hosting, domain-based identities, multi-user capacity and ephemeral messaging with end-to-end encryption into a chat platform that you can deploy on any budget VPS in minutes, and operate entirely under your own control

download and install

Download and Install on any VPS (Installation Guide Included)

When sensitive communications matter, many organizations prefer not to rely entirely on third-party messaging platforms. Even when a messaging service offers strong security features, you still depend on someone else's infrastructure and rules. Telemporio takes a different approach. Instead of entrusting your communications to a remote service provider, you deploy and operate your own encrypted chat server on a VPS you control and keep ownership of your infrastructure and identity. If you're looking for a practical way to deploy a private encrypted chat server on your own infrastructure, read on.

Telemporio is a complete client/server chat system designed for fast deployment on VPS nodes under a domain name that you own, such as xyz.com. When you deploy a Telemporio chat server on a VPS, the system assigns the default user identity admin.xyz.com to you, and your public communications endpoint, where you can be reached, becomes the https://admin.xyz.com URL or, as a convention in the particular case of the admin user, the naked domain https://xyz.com.

As the admin user, you are the owner and administrator of the domain and of the VPS, and you may configure multiple server processes to be started for additional users that will be offered to family members, friends and colleagues. Each additional user runs independently as an autonomous server process with its own passwords and endpoint address (user1.xyz.com, user2.xyz.com, etc), providing a level of isolation comparable to the deployment on distinct VPSes. These additional user instances are interconnected by default (federated), and thus immediately capable of initiating secure chat sessions with each other, and of viewing each other's online status.

All Telemporio communications are end-to-end encrypted and ephemeral by default. Messages exist only while they are being exchanged. They are held in memory and are never written to disk or stored in a database, and once a conversation ends, no message history remains on the server. Furthermore, Telemporio's end-to-end encryption model ensures that message decryption keys remain on user devices and are never available to the server. As a result, the server can relay encrypted messages between participants without being able to read their contents.

Deployment guide

1) Get yourself a domain name and a VPS

This, of course, in case you don't already have a domain and a VPS. In our days, there are many VPS hosting providers that are competing for the lowest prices. You may choose a low cost VPS. Telemporio is lightweight enough to run smoothly on any low-end VPS available on the market. For a few coins per month, typical entry-level VPS plans include 2 vCores, 4 GB RAM and 40 GB SSD NVMe! In any case, you should order your VPS with Debian 12 Linux preinstalled. With a very small effort, Telemporio will surely work on any known Linux distribution, but, at this moment, we have only compiled and tested it on Debian 12 systems. Finally, as soon as you have both the domain name and the VPS under your control, make sure to change the A record of the domain DNS to point to the IP address of the VPS.

2) Deploy telemporio server application with a few simple linux commands

As soon as you buy a VPS, within seconds you will receive an email with details for how to connect. The email will determine the IP address of your new VPS, say '141.94.27.72', the default user, say 'debian', and an initial password, say 'WrSWENx76xmP'. Therefore, assuming that you are sitting in front of a linux system, open a terminal and use ssh in order to connect to your new VPS for the first time. When prompted for password type 'WrSWENx76xmP'.

Now, just follow the simple instructions below but make sure you replace xyz.com with your own domain and the '141.94.27.72' IP address with the IP address of your own VPS.

$ ssh debian@141.94.27.72

The system will immediately ask you to change your password, so go ahead and do so.

Then, the first thing we need to do is set a root password:

$ sudo passwd root 

Next, we'll create 'admin' user. Using the 'admin' username is an established convention in the Telemporio system, so stick with it and don't be tempted to change it to a different one.

$ sudo useradd -m admin -s /usr/bin/bash 

Next, login as root and give admin user a password.

$ su 
# passwd admin 

Then, add admin in sudoers file.

# vi /etc/sudoers 
... 
root	ALL=(ALL:ALL) ALL 
admin	ALL=(ALL:ALL) ALL 
... 

Next, change /etc/hostname to "emporio"

$ sudo vi /etc/hostname 

Next, change the contents of /etc/hosts to the following:

$ sudo vi /etc/hosts 
... 
127.0.0.1	localhost 
127.0.0.1	emporio.xyz.com emporio 
141.94.27.72	emporio.xyz.com emporio 
... 

Copy /etc/hosts to /etc/hosts_orig:

$ sudo cp /etc/hosts /etc/hosts_orig

Reboot for the changes to take effect and log back in as admin user:

$ sudo shutdown -r now
Connection to 141.94.27.72 closed. 
... 
$ ssh admin@141.94.27.72



The Telemporio client/server application consists of three executable files that are available for download as a compressed archive. Let's create a bin directory where we will extract the three files from the compressed archive after we download it.

$ cd /home/admin 
$ mkdir -p telemporio/bin 
$ cd /home/admin/telemporio/bin 
$ wget https://telemporio.com/i/telemporio.tar.gz 
$ tar -xvf telemporio.tar.gz 

You should now have three more files in /home/admin/telemporio/bin directory other than the downloaded telemporio.tar.gz (telemporio, telemporio.js and telemporio.wasm). Let's copy the 'telemporio' file to /usr/local/bin/ directory and execute it with the '-init' parameter in order to initialize everything. It doesn't hurt if you repeat the -init command a couple of times more, just in case. The second and third time it will immediately terminate indicating that everything has been installed and set.

$ sudo cp telemporio /usr/local/bin/ 
$ sudo telemporio -init 
$ sudo telemporio -init 
$ sudo telemporio -init 
... 
All packages are up to date. 
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
... 

Upon completion of the '-init' command, all debian linux dependencies should have been installed and all necessary configuration should have been completed. As a final step, let's create some wildcard TSL certificates for xyz.com that are necessary for the server to operate securely. During this process you will need access to the DNS dashboard of the website where you registered your domain in order to add some necessary TXT records. If you have done it before, the process is very straightforward. Just follow the instructions but make sure you replace xyz.com with your own domain.

$ sudo certbot certonly --manual --preferred-challenges=dns --rsa-key-size 4096 -d "*.xyz.com" -d "xyz.com"

At the end of this process your public/private certificate files should be stored in /etc/letsencrypt/live/xyz.com directory. You only need to change their permissions so that your server can use them even after dropping the root priviliges at start-up.

$ sudo chmod -R 655 /etc/letsencrypt/live 

Now finally, you can start your chat server.

$ sudo telemporio -start xyz.com 

Let's test it. Open your browser and go to https://xyz.com Your chat server is up and running!

The next important step is to access the administrator's control panel and change the default passwords. (Telemorio uses two numeric passwords, up to nine digits each.) By convention, the initial default passwords for admin.xyz.com are '888' and '888'. Also by convention, the default administrator control panel is located at https://admin.xyz.com/x/a/888/888. You can now access your control panel and change the default passwords to some other more difficult to guess numbers.

A high level description of Telemporio's architecture and software design

In our days, many people have begun to think that it might be a good idea to start protecting their data exposed on the Internet. During the last decade, since the launch of the major social networks, people have openly posted photos and stories of even their most intimate personal lives, and have considered it reasonable and cool. Furthermore, they have chatted through messaging applications offered for free by their favorite social networks, and they never considered whether their private conversations remained private on those platforms that they did not control.

Those days are gone. With the advent of Artificial Intelligence, most people have realized how easy it is for AI agents to collect and exploit their data, and that global surveillance is no longer a conspiracy theory, but a harsh legal reality. International law does not protect individuals from AI-powered surveillance, and it's time to start protecting your data.

Telemporio is a software project that arose from the need to protect privacy in online conversations. The core idea is that privacy-conscious individuals would need secure and low-cost tools that will allow them to control their communication infrastructure. The most logical choice for a software product that meets this requirement is a lightweight and secure chat server that can be hosted on a low-end VPS. And this is what Telemporio project has been building since 2020.

Therefore, Telemporio is a secure, self-hosted chat platform that we designed and implemented from scratch on Debian Linux Operating System, with an architecture that emphasizes robust systems engineering, reliable operation, end-to-end security, and easy deployment.

The basic idea is that anyone who decides to use Telemporio will need two things: a domain name and a VPS. The domain name is necessary because a chat server needs a public URL, and the VPS is necessary because the servers must be hosted somewhere in order to be available.

For example, let's say Alice chooses the domain name 'xyz.com' for deploying her Telemporio chat server. After deployment, her public chat address will by convention be https://admin.xyz.com, and she can then share it with her contacts, family members, friends and colleagues; anyone who wants to chat with her must simply open a browser and type this address. In other words, the same way we own a mobile phone number and give it to our contacts so that they can call us, we can own a chat server address and give it to our contacts so that they can initiate chat sessions with us.

Therefore, during basic setup and deployment, the Telemporio chat server is configured with a single subdomain, the admin subdomain, which is always available in every deployment. However, if Telemporio owners wish, they can easily set up additional server instances. Returning to Alice's example, suppose she chats a lot with her mother and father and wants to set up two additional Telemporio server instances that will run alongside her admin instance. She can fo it. She can configure the public addresses of these two additional instances to be https://mama.xyz.com and https://papa.xyz.com. These three server instances, let's call them 'admin', 'papa', and 'mama' instances, will be completely independent Linux server processes with their own memory space, database, etc, but they will be interconnected in a mesh with each other, that is, they will be federated. Every time Alice logs in, she will be able to see if her mother or father has also logged in and she will be able to start a chat with them.

From what we've described, Alice has actually begun building her own private social network on a low-cost infrastructure that she controls herself. This is the core idea behind Telemporio. Now, let's delve deeper into the implementation and look at more details. Already during the early design phase of Telemporio's implementation, we decided to implement three features for enhanced privacy and security.

First, all conversations would be end-to-end encrypted by default. In practice, end-to-end encryption means that all conversations are encrypted by default and that the encryption keys would never leave the browser environment. In terms of security, this means that even if a server were compromised, the attacker would only find encrypted messages in there, messages that would be impossible to decrypt and read because the decryption keys would not be present.

Second, all server operations would be ephemeral and performed solely in RAM, meaning that the exchanged encrypted messages would not be stored on disk or in any database. This implies that, in Telemporio, conversations exist only while they are taking place, and as soon as someone ends the chat session or closes the browser, all messaging data disappear from the system and cannot be recovered.

And third, we would not use cookies for HTTP session management. This means no more annoying browser pop-ups asking us to accept the use of cookies, etc.

Given the requirement that Telemporio would be hosted and run on the most basic VPS nodes available, and that each VPS would need to start and manage multiple user process servers in parallel, the server process had to be as lightweight as possible in terms of its system resource requirements, i.e., CPU and RAM. For this reason, we decided to build the server using the very low-level C programming language in order to control every aspect of system resource utilization and achieve the necessary performance optimizations.

Furthermore, we wanted to reuse a significant portion of the system's data structures and improve the speed and performance of the web client as well. Therefore, we decided to develop the client using WebAssembly, compiled from the same C code that would run on the server. The fact that both the server and client would ran the same efficient and ultra-fast C code made the design a unique and stimulating challenge. The server and web client would communicate asynchronously using secure WebSockets and cooperate seamlessly in order to establish secure, end-to-end encrypted chat sessions between independent Telemporio users, who would use their own servers and identify themselves with a pseudonymous subdomain identity.

Contact:  admin@telemporio.com






CAUTION! admin is offline, so end-to-end encryption is not technically possible. Everything you type here will be sent via email, which is not as secure and, moreover, contradicts Telemporio's server philosophy of operating solely in RAM, since email is not a RAM-based service, but stores its data permanently on disk. As soon as admin connects, this panel will turn green, and then you will be able to safely exchange e2e encrypted, ephemeral messages that will disappear at the end of the session.

about_selectedabout chatchathomereload