2.1 System Requirements and Installation
This page describes the installation of the Tryton server (trytond) and the web client sao, the configuration and the setup of the database. Required are Python 3.13, Node.js with npm, git and a PostgreSQL server with a database user tryton.
The descriptions on this page cover a development or test system. Productive operation requires additional measures (among others securing server, database and access, encryption, backups). Every operator is responsible for the security of their own systems.
Install the Tryton Server
Create and enter the project directory:
Create a new Python virtual environment:
Activate the environment:
Install Tryton with all modules via the
requirements.txt:
Install the Web Client sao
Enter the project directory; sao is installed in a directory of its own below it:
The version of sao (here 8.0) must match the version of trytond.
Install the web app in the directory with Node:
Build the web app with Grunt:
Configure the Server
trytond.conf
The file trytond.conf holds the database connection, the web server with the sao directory and the settings of the module, e.g.:
- [queue] worker runs background tasks, e.g. Ausführen (Execute) of an adjustment run.
- [bus] allow_subscribe is needed for notifications in the client.
- [real_estate] genesis_token is the access key for GENESIS-Online (Destatis) used to fetch the price indices, see 6.7.2 Index Rent.
Comments go on a line of their own starting with #. A comment after a value (root = /path # comment) is read as part of the value. Password and access key belong only in the local file, not in a repository.
Protecting Passwords
Passwords and access keys do not have to be in trytond.conf:
- Database without password: if Tryton and PostgreSQL run on the same machine, trytond connects via the Unix socket (
uri = postgresql:///); PostgreSQL checks the operating system user viapeer(entrylocal … peerinpg_hba.conf). ~/.pgpass: the URI only containspostgresql://tryton@localhost:5432/, the password is in the file~/.pgpassof the user running trytond (localhost:5432:*:tryton:<password>, permissions600).- Environment variables: trytond takes values from variables named
TRYTOND_<SECTION>__<OPTION>, e.g.TRYTOND_DATABASE__URIorTRYTOND_REAL_ESTATE__GENESIS_TOKEN. They are set in the start script, e.g. from the Mac keychain (security find-generic-password … -w) or a password manager. - Containers: mount secrets at runtime as Docker secrets or Kubernetes
Secretand set the environment variables from them – never write them into the image or Dockerfile.
In general trytond.conf belongs only to the user running trytond (permissions 600) and never into a repository. The database user only needs rights on its own database.
logconf.conf
Logging is defined in a file of its own, here rotating daily in tryton.log (30 files) and additionally to the console:
Manage the Database
The database is managed with the PostgreSQL tools; user and name (here both tryton) must match the trytond.conf.
Run the following actions with care – dropping and restoring in particular overwrite data irrevocably.
| Action | Command |
|---|---|
| Create the database | createdb -U tryton tryton |
| Drop the database | dropdb -U tryton tryton |
| Back up the database | pg_dump -U tryton -Fc -d tryton > tryton_$(date +%Y%m%d_%H%M%S).dump |
| Restore the database | pg_restore -U tryton -d tryton tryton_<date_time>.dump |
The backup creates a dump in PostgreSQL format with the database name and date/time in the file name.
trytond is now installed, the configuration is set and an empty database is set up.
Initialise the Database and Start the Server
On a new database
trytond-admincreates all tables and initialises Tryton:The shell asks for the e-mail address and the password of the user admin:
Start the server:
--devis the development mode (among other things, changed files are reloaded); for production start without--dev.Open http://localhost:8000/#tryton in the browser and log in as admin.
Initial Setup in the Client
After the first login the wizard Module Configuration guides through the initial setup. The forms are in English at first.
Log in with database
tryton, user admin and the password fromtrytond-admin.

Figure 2.1-1: Login The wizard Module Configuration starts; continue with OK.

Figure 2.1-2: Module Configuration Configure Languages: mark the languages whose translations are to be loaded, e.g. English and German, then Load.

Figure 2.1-3: Configure Languages Configure Modules: mark the required modules, e.g.
real_estate– dependent modules are activated as well –, then Activate.

Figure 2.1-4: Configure Modules Perform Pending Activation/Upgrade lists all modules to be activated (here 73); start with OK. The server creates the tables, the log shows the registered models. Finally the client reports “The modules have been upgraded / activated.”

Figure 2.1-5: Modules to activate

Figure 2.1-6: Server log during activation

Figure 2.1-7: Activation done The Module Configuration continues; go on with OK.

Figure 2.1-8: Continue Module Configuration Configure Company: after the note the company is created. In the field Party enter a new party with name, language and address and save it; choose currency (Euro) and timezone (Europe/Berlin). Employees are optional. Create with Add.

Figure 2.1-9: Configure Company – note

Figure 2.1-10: Configure Company

Figure 2.1-11: Party of the company The progress is shown; continue with Next.

Figure 2.1-12: Progress Create Chart of Accounts from Template: after the note choose company and account template, e.g. Kontenrahmen der Wohnungswirtschaft (WoWi), then set the default accounts for receivables, payables, revenue and expense and create them with Create.

Figure 2.1-13: Chart of accounts – note

Figure 2.1-14: Chart of accounts – choose template

Figure 2.1-15: Chart of accounts – default accounts “The configuration is done.” – finish with OK.

Figure 2.1-16: Configuration done
The menu with Immobilien (real estate) is now available. The user menu at the top right (Einstellungen…, preferences) allows, among other things, setting the user’s language.

Further modules can be activated later, see 2.2 Activate Modules.
Starting Server, Worker and Cron
For full operation three processes run side by side, each in its own terminal in the project directory:
| Process | Task |
|---|---|
Server (trytond) | Login and use via the client |
Worker (trytond-worker) | Background processing (queue), e.g. Ausführen (Execute) of an adjustment run; requires [queue] worker = True |
Cron (trytond-cron) | Scheduled jobs, e.g. fetching the price indices, see 2.6 Jobs and Periodic Tasks |
The server is started as described above:
The worker for background processing:
The cron for scheduled jobs:
If the worker is not running, background tasks stay in the queue; if the cron is not running, no jobs are executed.