Link Search Menu Expand Document


MadelineProto requires the mbstring, xml, json, fileinfo, gmp, ffi, openssl extensions to function properly.

The ev and event extensions are highly recommended to improve performance.

PHP 8.1+ is required.

MadelineProto explicitly supports Linux and UNIX systems (including Mac OS).
I don’t recommend using Windows: MadelineProto generally works on Windows, though there might be some random issues caused by AV engines, so I personally recommend using Linux.

Running on webservers and webhosts is fully supported, but I highly recommend running long-running applications like event handler bots via CLI.

Running via docker is highly recommended, see here » for more info on how to run MadelineProto in docker, on any Linux distro.

Otherwise, see here » for more info on how to install MadelineProto dependencies manually on Ubuntu.

Follow these instructions » to install MadelineProto dependencies on any linux distro, using the official docker image.


To install MadelineProto dependencies manually on Ubuntu, run the following command in your command line:

sudo apt-get update
sudo apt-get install software-properties-common -y
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.2 php8.2-dev php8.2-xml php8.2-zip php8.2-gmp php8.2-cli php8.2-mbstring php8.2-ffi php-pear libevent-dev -y
sudo pecl install event ev

echo 262144 | sudo tee /proc/sys/vm/max_map_count
echo vm.max_map_count=262144 | sudo tee /etc/sysctl.d/40-madelineproto.conf

Next, add and to php.ini.

Finally, follow the instructions on to install PrimeModule.

The max_map_count sysctl configuration is required to avoid “Fiber stack allocate failed” and “Fiber stack protect failed” errors, since the PHP engine mmaps two memory regions per fiber.

Next section