Install frappe on Debian base (ubuntu)

Debian / Ubuntu

install python3.10

install supervisor :
apt-get install supervisor
systemctl enable supervisor
systemctl start supervisor
sudo systemctl restart supervisor

Install git, python, and redis

sudo apt install git python-dev python-pip redis-server
# use below commadn on ubunntu 20
sudo apt install git python-dev python3-pip redis-server

Install MariaDB

sudo apt install software-properties-common

If you are on Ubuntu version older than 20.04, run this before installing MariaDB:

sudo apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] xenial main'

If you are on version Ubuntu 20.04, then MariaDB is available in default repo and you can directly run the below commands to install it:

sudo apt-get update
sudo apt-get install mariadb-server

During this installation you’ll be prompted to set the MySQL root password. If you are not prompted, you’ll have to initialize the MySQL server setup yourself. You can do that by running the command:


Remember: only run it if you’re not prompted the password during setup.

It is really important that you remember this password, since it’ll be useful later on. You’ll also need the MySQL database development files.

apt-get install mariadb-client-10.3

Now, edit the MariaDB configuration file.

nano /etc/mysql/my.cnf

And add this configuration

character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

default-character-set = utf8mb4

Now, just restart the mysql service and you are good to go.

service mysql restart

Install Node

We recommend installing node using nvm

curl -o- | bash

After nvm is installed, you may have to close your terminal and open another one. Now run the following command to install node.

nvm install 14

Verify the installation, by running:

node -v
# output

Finally, install yarn using npm

npm install -g yarn

Install wkhtmltopdf

apt-get install xvfb libfontconfig wkhtmltopdf

Install Bench CLI

Install bench via pip3

pip3 install frappe-bench

Confirm the bench installation by checking version

bench --version

# output

Create your first bench folder.

cd ~
bench init frappe-bench

After the frappe-bench folder is created, change your directory to it and run this command

bench start

Congratulations, you have installed bench on to your system.

Linux Technology

apt update vs apt upgrade: What’s the difference?

Linux Technology

Install def file in ubuntu

Use command below :
sudo dpkg -i PACKAGEFILE

reference :

Linux Technology

Share screen in ubunut 22

You need to disable Wayland

refrence :

Linux Technology

Find software which is using a port on linux

lsof -i :8000

Linux Shell Technology

Watch all tpc port that are listening :

ss -apt
Linux Technology

Remove A app from linux completely

first , purge main package name :

sudo apt-get purge mariadb-server 


sudo apt autoremove

then run this command to find all packages that may are related to the package which you want to purge :

sudo dpkg -l | grep mariadb 

after that purg services that are returned one by one


telegram proxy

devops Technology

DockerFile properties


On building a docker image you may want to have some variables (you can also have them in docker-compose)

you can define ARG in docker file (you can also set default value for them in docker file)

for example :

# in docker file
ARG some_variable_name = xxxx
ARG uid

#on building image : 
$ docker build --build-arg some_variable_name=a_value


ENV variables are also available during the build, as soon as you introduce them with an ENV instruction. However, unlike ARG, they are also accessible by containers started from the final image. ENV values can be overridden when starting a container, more on that below.

# no default value
ENV hey
# a default value
ENV foo /bar
# or ENV foo=/bar

# ENV values can be used during the build
ADD . $foo
# or ADD . ${foo}
# translates to: ADD . /bar

on running docker : 
$ docker run -e "env_var_name=another_value" alpine env


for example :

# Install system dependencies
RUN apt-get update && apt-get install -y \
    git \
    curl \
    libpng-dev \
    libonig-dev \
    libxml2-dev \
    zip \

# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd


COPY and ADD are both Dockerfile instructions that serve a similar purpose. They let you copy files from a specific location into a Docker image.


ADD  does that same but in addition, it also supports 2 other sources. 

  1. A URL instead of a local file/directory.
  2. Extract tar from the source directory into the destination.


COPY takes in a source and destination. It only lets you copy in a local or directory from your host (the machine-building the Docker image) into the Docker image itself.

for example :

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer


for example:

# Set working directory
WORKDIR /var/www


for example:

USER $user
Technology Web Development

change PHP version

Change Global (command line) php version (for laravel):

use this command :

sudo update-alternatives --config php

for more see link below :

Change apache PHP version (for projects which you run with apache):

#(old php version)
sudo a2dismod php5 

#(new php version )
sudo a2enmod php7.1 

sudo systemctl restart apache2