How to install Tryton 5.4 software on Ubuntu 18.04 server


how to install Tryton 5.4 software On Ubuntu 18.04

how to install Tryton 5.4 on ubuntu 18.04 server.
Tryton 5.4 software Installation on ubuntu 18.04

To Install Tryton 5.4 on ubuntu 18.04 linux distribution follow these step :

First Open Terminal on your ubuntu 18.04 server :

Needed Packages for Software

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install python3-pip
  • sudo apt-get install python3-dev libpq-dev postgresql postgresql-contrib
  • pip3 install psycopg2
  • sudo pip3 install "trytond <=5.4"
  • trytond --version # to check tryton version 5.4
  • mkdir tryton # make directory for tryton files
  • cd tryton
  • git clone -b 5.4 https://github.com/tryton/tryton.git #tryton-client

Here we will start working on database configuration

  • sudo nano /etc/postgresql/10/main/pg_hba.conf
  • change (local all all md5) to trust
  • sudo su postgres
  • psql
  • create user tryton with CREATEDB;
  • alter role tryton ENCRYPTED PASSWORD 'Hamza_tryton';
  • \q
  • exit
  • systemctl restart postgresql

This phase to be able to use browser for software not tryton-client

  • SOA Web # Now inside tryton directory
  • git clone -b 5.4 https://github.com/tryton/sao.git
  • cd sao # install inside sao directory
  • sudo apt install npm
  • sudo npm install
  • sudo npm install -g npm
  • sudo npm install -g grunt-cli
  • sudo npm install -g bower
  • sudo bower install --allow-root
  • cd /root/tryton/sao/node_modules/grunt-cli/bin
  • grunt

Here we want to create trytond service

  • cd /root/tryton
  • sudo nano trytond.service

Type as below information inside File

Description=Tryton server
ExecStart=/usr/local/bin/trytond --config /root/tryton/trytond.conf --pidfile=/var/lib/tryton/trytond.pid --logconf=/root/tryton/trytond_log.conf
# Give a reasonable amount of time for the server to start up/shut down
# We rely on systemd to restart trytond if it dies

trytond.service configuration file

To configure software log file

  • sudo nano trytond_log.conf

Type as below information inside File

#Logging configuration file for Tryton Server (trytond)
# This file contains settings for trytond to rotate logs daily and to keep 30 logs.

keys: simple

keys: rotate

keys: root

format: %(asctime)s] %(levelname)s:%(name)s:%(message)s
datefmt: %a %b %d %H:%M:%S %Y

class: handlers.TimedRotatingFileHandler
args: ('/var/log/tryton/trytond.log', 'D', 1, 30)
formatter: simple

level: INFO
handlers: rotate

trytond log file configuration

here is the configuration for tyrton, database and host

  • sudo nano trytond.conf

Type as below information inside File

#Configuration file for Tryton Server (trytond)
uri = postgresql://tryton:Hamza_tryton@localhost:5432/

path = /root/tryton

#list = True

# The number of retries of the Tryton Server when there are errors in a request to the database
#retry = 5

language = en_US


listen =


listen =

# The time (in seconds) until an inactive session expires
timeout = 3600

#The server administration password
# Example password with 'admin'
#super_pwd = jkUbZGvFNeugk
super_pwd = <atieh@abcd@hamza_1> 

# Mail settings The URI to connect to the SMTP server. 
uri = smtp://localhost:25

# The From address used by the Tryton Server to send emails.
from = <tryton@your-domain.tld>


# Path for the web-frontend
listen =
root = /root/tryton/sao

trytond.conf configuration file

log configuration and initiate Database

  • cd /var/log
  • and create new directory
  • mkdir tryton
  • now initiate database
  • trytond-admin -c /root/tryton/trytond.conf -d trytondb --all
  • here it will ask you to create username, password for tryton application
  • systemctl enable /root/tryton/trytond.service
  • systemctl start trytond.service

All ready to go

  • Now open your broswer and type http://ServerIP:8000/
  • Done !!

© 2020 PyOdoo.

TOPICS:  Tryton