# HowTo install Tryton on a VM

**URL:** <https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115>\
**Category:** User\
**Created:** [May 3, 2023, 9:30am UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115 "2023-05-03T09:30:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![damies13](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/edb3f5/32.png) [@damies13](https://discuss.tryton.org/u/damies13)\
**Post date:** [May 3, 2023, 9:30am UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/1 "2023-05-03T09:30:43Z")

</div>

Hi All,  
I’m new here, looking for guidance on installing a recent version of Tryton.

---

<div class="post-metadata">

**Author:** ![damies13](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/edb3f5/32.png) [@damies13](https://discuss.tryton.org/u/damies13)\
**Post date:** [May 3, 2023, 9:34am UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/2 "2023-05-03T09:34:34Z")

</div>

I had a long post typed with what I’ve tried so far, but unfortunately I’m new here and can only put 2 lines in a post.

---

<div class="post-metadata">

**Author:** ![damies13](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/edb3f5/32.png) [@damies13](https://discuss.tryton.org/u/damies13)\
**Post date:** [May 3, 2023, 10:15am UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/3 "2023-05-03T10:15:25Z")

</div>

Hi All,

(New users can only put 2 lines in a new post, here’s my original post)

Basically what I hope to achieve is to replicate demo. tryton. org on a local virtual machine/container (not docker), unfortunately the documentation for how to do this is not clear and I couldn’t find any how-to’s

I have a proxmox cluster, so I can use an LXC container (preferred) or a virtual machine, it shouldn’t really make a difference, but i’ve added this for reference.

So starting with [How to install Tryton — Tryton server](https://docs.tryton.org/projects/server/en/latest/topics/install.html)

> There are three options to install Tryton:
> 
> - Install the version provided by your operating system distribution. This is the quickest and recommended option for those who has operating system that distributes Tryton.
> - Install the published package. You first need to have pip installed. Then to install `trytond` run:

“Install the version provided by your operating system distribution” would have been nice if I could just do something like `apt-get install trytond trytond-webclient` but the deb packages don’t seem to install the webclient (sao?) and also seem to install Tryton version 5.x where I would prefer to start with something more recent at least in the version 6.x range but ideally \>6.6

So onto the next option “Install the published package”

Here’s what I have so far:

- Install OS (in my case I used Debian 11 that comes with Python 3.9.x)
- apt update & apt upgrade (ensure OS is up to date)
- apt-get install python3-pip (Install pip)
- apt install nodejs npm (tryton web client / sao? needs nodejs? [Setup web client with Debian 10](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125), This installs nodejs v12.22.12 and npm v7.5.2 are these OK?)
- pip install trytond (from install docs)
- pip install trytond\_sale (from install docs)

Here’s where it gets really unclear:

- what other modules are used for the demo site?
- what pip module do I install for the webclient?
- Is there anything else I’m missing?
- If I’ve understood correctly, if I don’t specify a database like Postgres Tryton will default to sqlite, is this correct? This will be fine for me for now.

Sorry if this is all clearly documented somewhere I couldn’t find it.

Dave.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [May 3, 2023, 12:33pm UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/4 "2023-05-03T12:33:43Z")

</div>

> [@damies13](#):
>
> Tryton version 5.x where I would prefer to start with something more recent at least in the version 6.x range but ideally \>6.6

The problem is that debian packages are only maintaned for LTS versions.

You should consider installing Tryton in a virtual environment using pip. There are several topic on this forum that explain it.

> [@damies13](#):
>
> what other modules are used for the demo site?

All modues are available on the demo site. If you want to have them, there is a modules.txt file for each series on [downloads.tryton.org](http://downloads.tryton.org) Here is the [sample for 6.8 series](https://downloads-cdn.tryton.org/6.8/modules.txt)

Even you can use a simple bash script as follows:

```auto
#!/bin/bash                                                                    
pip3 install "trytond == ${SERIES}.*"                                                 
for module in `curl -L https://downloads.tryton.org/${SERIES}/modules.txt`; do 
    pip3 install "trytond_${module} == ${SERIES}.*";                           
done                                                                           
pip3 install "proteus == ${SERIES}.*" 

```

which read the series from the environment variable. Feel free to update it to match your needs.

> [@damies13](#):
>
> what pip module do I install for the webclient?

None, web client is just written in javascript and does not require any python dependency.

> [@damies13](#):
>
> if I don’t specify a database like Postgres Tryton will default to sqlite, is this correct?

Right.

---

<div class="post-metadata">

**Author:** ![damies13](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/edb3f5/32.png) [@damies13](https://discuss.tryton.org/u/damies13)\
**Post date:** [May 3, 2023, 1:30pm UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/5 "2023-05-03T13:30:19Z")

</div>

Hi Sergi,

Thanks for that, I realised why the Debian packages were so old, That’s why I wanted to try the pip install (It’s good learning experience too)

> [@pokoli](#):
>
> None, web client is just written in javascript and does not require any python dependency.

Ah ok,

- So do I just download the tar.gz file for the version I installed?
- Where do I put the extracted files? Is there a specific dir they need to go in or I can choose any dir and configure it in the config file?
- Did I really need nodejs at all? (If not i’ll wipe my VM and start clean)

Thanks,

Dave.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [May 3, 2023, 1:43pm UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/6 "2023-05-03T13:43:35Z")

</div>

The web client is named sao. You can download [sao from npm](https://www.npmjs.com/package/tryton-sao). In the [sao README](https://foss.heptapod.net/tryton/tryton/-/blob/b2e5a61dfc3d6dd08cdc9d49b8680421c5f34f3e/sao/README.md) you have all the relevant notes required to install it and setup it.

---

<div class="post-metadata">

**Author:** ![damies13](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/edb3f5/32.png) [@damies13](https://discuss.tryton.org/u/damies13)\
**Post date:** [May 3, 2023, 2:24pm UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/7 "2023-05-03T14:24:12Z")

</div>

I feel like I’m making progress…

I installed sao with `npm install tryton-sao --production --legacy-peer-deps`

Then I ran `trytond` and it was only listening on localhost, so I created a config file with

```auto
[web]
listen = 0.0.0.0:8000
root = /path/where/npm/installed/sao

```

Now I when I start `trytond -c /etc/tryond.conf` I get the web client but no database.

Then I found how to [Initialize a database](https://docs.tryton.org/projects/server/en/latest/topics/setup_database.html#initialize-a-database)

Initially running `trytond-admin -c /etc/trytond.conf -d demo --all` gave me an error:

```auto
  File "/usr/local/lib/python3.9/dist-packages/trytond/backend/sqlite/database.py", line 437, in _make_uri
    raise IOError("Database '%s' doesn't exist!" % db_path)
OSError: Database '/root/db/demo.sqlite' doesn't exist!

```

So I created the directory and file with

```auto
mkdir /root/db
touch /root/db/demo.sqlite

```

And then it worked, I was able to login to the web-client and finish the install.

Thanks for all the help,

Dave.

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [June 2, 2023, 2:24pm UTC](https://discuss.tryton.org/t/howto-install-tryton-on-a-vm/6115/8 "2023-06-02T14:24:29Z")

</div>

Closed on June 2, 2023, 2:24pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
