# Setup web client with Debian 10

**URL:** <https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125>\
**Category:** System Administrator\
**Created:** [December 31, 2019, 7:29pm UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125 "2019-12-31T19:29:59Z")\
**Posts on this page:** 8\
**Page:** 4

<div class="post-metadata">

**Author:** ![bala4901](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/fbc32d/32.png) [@bala4901](https://discuss.tryton.org/u/bala4901)\
**Post date:** [February 8, 2020, 4:24am UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/61 "2020-02-08T04:24:37Z")

</div>

please go inside your sao folder and type:  
bash$ pwd

then overwrite:  
to the the full path

> [@trytfan](#):
>
> root = ~/trytond/sao

---

<div class="post-metadata">

**Author:** ![trytfan](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/t/f19dbf/32.png) [@trytfan](https://discuss.tryton.org/u/trytfan)\
**Post date:** [February 8, 2020, 8:27am UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/62 "2020-02-08T08:27:05Z")

</div>

> please go inside your sao folder and type:  
> bash$ pwd
> 
> then overwrite:  
> to the the full path[quote=“trytfan, post:57, topic:2125”]  
> root = ~/trytond/sao  
> [/quote]

Hello, what did you mean?  
How can i find post:57, topic:2125? At the rigth side i have find post 57 with scrolling.

> [@Setup web client with Debian 10](https://discuss.tryton.org/t/tryton-sao-with-debian-10-tryton-5-0-4-2-package-webinterface/2125/57):
>
> My /etc/tryton/trytond.conf # /etc/tryton/trytond.conf - Configuration file for Tryton Server # (trytond, trytond-admin, trytond-cron) # # This file contains the most common settings for trytond (Defaults # are commented). # For more information install the tryton-server-doc package and read # /usr/share/doc/tryton-server-doc/html/index.html # and accordingly # /usr/share/doc/tryton-server-doc/html/topics/configuration.html [web] # Settings for the web interface # The IP/host a…

Can you the full /etc/tryton/trytond.conf?

Only for better reading:

> <https://pastebin.com/TwJbyf1H>

@ced is it so ok? In post 57 we have the full /etc/tryton/trytond.conf without link.

---

<div class="post-metadata">

**Author:** ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)\
**Post date:** [February 8, 2020, 11:31am UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/63 "2020-02-08T11:31:03Z")

</div>

I didn’t have read the whole discussion, but make things extremely simple. I’m assuming you are using version 5.0.x and you installed the .deb package

1. setup a database user / password, create a new empty database. Username and password are filled in the tryton.conf file.
2. just create the most simple /etc/tryton/trytond.conf with only the necessary parts

```auto
[database]
uri = postgresql://<username>:<password>@localhost:5432/

[web]
listen = 0.0.0.0:8000
root = /usr/share/tryton-sao/www

```

1. from the commandline initialize the database. You will be asked for a admin username and password.

```auto
trytond-admin -d <database name> -c /etc/tryton/trytond.conf --all -v

```

1. start de trytond-server with `systemctl start trytond`
2. check with the (GTK) tryton-client if you can connect to trytond-server (localhost:8000)

Congratulation! you have Tryton running. Please get this all working properly before installing Sao.

The next step will be installing Sao.

1. download the precompiled version from [https://downloads.tryton.org/5.0/](https://downloads.tryton.org/5.0/) (tryton-sao-5.0.X.tar.gz)
2. unpack it in `/usr/share/tryton-sao/www`. Sao will be in a sub directory called `package`
3. move **all** the data from the `package` a level higher, so all the data resides in `/usr/share/tryton-sao/www`
4. get the script [ports/productivity/tryton/5.0/sao/files/sao-dependencies.sh - view - 1.1](https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/productivity/tryton/5.0/sao/files/Attic/sao-dependencies.sh?rev=1.1&content-type=text/x-cvsweb-markup) and save it in `/usr/share/tryton-sao/www`. Call it what you want.
5. modify the script a bit:
  - change `FETCHCMD='ftp'` to `FETCHCMD='curl -L'`
  - change `UNZIP='/usr/local/bin/7z x'` to `UNZIP='7z x'` (be sure you have 7z installed)
  - change `xargs -0 sha256 -b` to `xargs -0 sha256sum -b` (end of the file)

6. run the script from `/usr/share/tryton-sao/www` so,  
`cd /usr/share/tryton-sao/www & sh <your script>`. You will end up with a directory called `sao-dependencies-5.0`. In this directory you have another directory called `bower_components`
7. symlink the bower\_components `ln -s /usr/share/tryton-sao/www/sao-dependencies-5.0/bower_components/ /usr/share/tryton-sao/www/`
8. make sure the read / write rights for the trytond-server user (systemctl) are correct! `chown -R tryton:tryton /usr/share/tryton-sao/www/`
9. make sure trytond-server is running, start your webbrowser and open the url (localhost:8000). You will see Sao coming up.

---

<div class="post-metadata">

**Author:** ![semarie](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/semarie/32/112_2.png) [@semarie](https://discuss.tryton.org/u/semarie)\
**Post date:** [February 8, 2020, 12:45pm UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/64 "2020-02-08T12:45:21Z")

</div>

instead of running the script to generate sao-dependencies, you could directly download the latest generated archive at [http://kapouay.odns.fr/pub/tryton/sao-dependencies-5.0-12.tar.gz](http://kapouay.odns.fr/pub/tryton/sao-dependencies-5.0-12.tar.gz) , unpack it and move the `bower_components` directory inside the sao root.

---

<div class="post-metadata">

**Author:** ![trytfan](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/t/f19dbf/32.png) [@trytfan](https://discuss.tryton.org/u/trytfan)\
**Post date:** [February 8, 2020, 1:02pm UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/65 "2020-02-08T13:02:24Z")

</div>

edbo, Post 63, Script:

sao-dependencies.sh

```
#!/bin/sh
# little tool to grab all js-dependencies and generate a bower_components/
# directory suitable for tryton-sao

PATH='/usr/bin:/bin:/usr/sbin:/sbin'
set -eu

FETCHCMD='ftp'
UNZIP='/usr/local/bin/7z x'

TRYTON_VERSION='5.0'

umask 022

if [$# -ne 0]; then
	echo "usage: $0" >&2
	exit 1
fi

OUTDIR="${PWD}/sao-dependencies-${TRYTON_VERSION}"

if [-d "${OUTDIR}"]; then
	echo "error: output directory already exists: ${OUTDIR}" >&2
	exit 1
fi

EXTRACTDIR=$(mktemp -dt sao-dependencies.XXXXXXXX) || {
	echo "error: unable to create temporary directory" >&2
	exit 1
}

# https://getbootstrap.com/docs/3.3/getting-started/#download
bootstrap() {
	local V="$1"
	local U="https://github.com/twbs/bootstrap/releases/download/v${V}/bootstrap-${V}-dist.zip"
	local O="${OUTDIR}/bower_components/bootstrap/dist"

	${FETCHCMD} -o "${EXTRACTDIR}/bootstrap-${V}-dist.zip" -- "${U}"
	( cd "${EXTRACTDIR}" && ${UNZIP} "bootstrap-${V}-dist.zip" )
	rm "${EXTRACTDIR}/bootstrap-${V}-dist.zip"

	mkdir -p -- "${O}"
	cp -R "${EXTRACTDIR}/bootstrap-${V}-dist"/{css,fonts,js} "${O}"
	rm -rf "${EXTRACTDIR}/bootstrap-${V}-dist"
}

# https://github.com/Eonasdan/bootstrap-datetimepicker/releases
bootstrap_datetimepicker() {
	local V="$1"
	local U="https://github.com/Eonasdan/bootstrap-datetimepicker/archive/${V}.tar.gz"
	local O="${OUTDIR}/bower_components/eonasdan-bootstrap-datetimepicker"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p "${O}"
	cp -R "${EXTRACTDIR}/bootstrap-datetimepicker-${V}/build" "${O}"
	rm -rf "${EXTRACTDIR}/bootstrap-datetimepicker-${V}"
}

# https://github.com/bright/bootstrap-rtl/releases
bootstrap_rtl_ondemand() {
	local V="$1"
	local U="https://github.com/bright/bootstrap-rtl/archive/v${V}-ondemand.tar.gz"
	local O="${OUTDIR}/bower_components/bootstrap-rtl-ondemand"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p "${O}"
	cp -R "${EXTRACTDIR}/bootstrap-rtl-${V}-ondemand/dist" "${O}"
	rm -rf "${EXTRACTDIR}/bootstrap-rtl-${V}-ondemand"
}

# https://github.com/c3js/c3/releases
c3() {
	local V="$1"
	local U="https://github.com/c3js/c3/archive/v${V}.tar.gz"
	local O="${OUTDIR}/bower_components/c3"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p "${O}"
	cp -R "${EXTRACTDIR}/c3-${V}"/c3{.min,}.css \
		"${EXTRACTDIR}/c3-${V}"/c3{.min,}.js \
		"${EXTRACTDIR}/c3-${V}/extensions" \
		"${O}"
	rm "${O}/extensions/chart-bubble/c3.css" \
		"${O}/extensions/chart-bubble/c3.min.js"
	cp "${EXTRACTDIR}/c3-${V}/bower.json" "${O}"	# for dependencies
	rm -rf "${EXTRACTDIR}/c3-${V}"
}

# https://github.com/d3/d3/releases
d3() {
	local V="$1"
	local U="https://github.com/d3/d3/releases/download/v${V}/d3.zip"
	local O="${OUTDIR}/bower_components/d3"

	${FETCHCMD} -o "${EXTRACTDIR}/d3.zip" -- "${U}"
	mkdir "${EXTRACTDIR}/d3"
	( cd "${EXTRACTDIR}/d3" && ${UNZIP} "../d3.zip" )
	rm "${EXTRACTDIR}/d3.zip"

	mkdir -p -- "${O}"
	cp "${EXTRACTDIR}/d3/"d3{.min,}.js "${O}"
	rm -rf "${EXTRACTDIR}/d3"
}

# https://github.com/fullcalendar/fullcalendar/releases
fullcalendar() {
	local V="$1"
	local U="https://github.com/fullcalendar/fullcalendar/releases/download/v${V}/fullcalendar-${V}.zip"
	local O="${OUTDIR}/bower_components/fullcalendar/dist"

	${FETCHCMD} -o "${EXTRACTDIR}/fullcalendar-${V}.zip" -- "${U}"
	( cd "${EXTRACTDIR}" && ${UNZIP} "fullcalendar-${V}.zip" )
	rm "${EXTRACTDIR}/fullcalendar-${V}.zip"

	mkdir -p -- "${O}"
	cp -R "${EXTRACTDIR}/fullcalendar-${V}"/fullcalendar{,.min}.js \
		"${EXTRACTDIR}/fullcalendar-${V}"/fullcalendar{,.min}.css \
		"${EXTRACTDIR}/fullcalendar-${V}"/fullcalendar.print{,.min}.css \
		"${EXTRACTDIR}/fullcalendar-${V}"/gcal{.min,}.js \
		"${EXTRACTDIR}/fullcalendar-${V}"/locale{-all.js,} \
		"${O}"
	rm -rf "${EXTRACTDIR}/fullcalendar-${V}"
}

# https://github.com/guillaumepotier/gettext.js/releases
gettext_js() {
	local V="$1"
	local U="https://github.com/guillaumepotier/gettext.js/archive/${V}.tar.gz"
	local O="${OUTDIR}/bower_components/gettext.js"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p -- "${O}"
	cp -R "${EXTRACTDIR}/gettext.js-${V}/dist" "${O}"
	rm -rf "${EXTRACTDIR}/gettext.js-${V}"
}

# https://jquery.com/download/
jquery() {
	local V="$1"
	local U="https://code.jquery.com"
	local O="${OUTDIR}/bower_components/jquery/dist"

	mkdir -p "${O}"
	${FETCHCMD} -o "${O}/jquery.js" "${U}/jquery-${V}.js"
	${FETCHCMD} -o "${O}/jquery.min.js"	"${U}/jquery-${V}.min.js"
	${FETCHCMD} -o "${O}/jquery.min.map"	"${U}/jquery-${V}.min.map"
}

# https://github.com/moment/moment/releases
moment() {
	local V="$1"
	local U="https://github.com/moment/moment/archive/${V}.tar.gz"
	local O="${OUTDIR}/bower_components/moment"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p -- "${O}"
	cp -R "${EXTRACTDIR}/moment-${V}/moment.js" \
		"${EXTRACTDIR}/moment-${V}/min" \
		"${O}"
	rm "${O}/min/tests.js"
	rm -rf "${EXTRACTDIR}/moment-${V}"
}

# https://github.com/ccampbell/mousetrap/releases
mousetrap() {
	local V="$1"
	local U="https://github.com/ccampbell/mousetrap/archive/${V}.tar.gz"
	local O="${OUTDIR}/bower_components/mousetrap"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p -- "${O}"
	cp -R "${EXTRACTDIR}/mousetrap-${V}/"mousetrap{.min,}.js \
		"${EXTRACTDIR}/mousetrap-${V}/plugins" \
		"${O}"
	rm -rf "${EXTRACTDIR}/mousetrap-${V}"
}

# https://github.com/mholt/papaparse/releases
papaparse() {
	local V="$1"
	local U="https://github.com/mholt/papaparse/archive/${V}.tar.gz"
	local O="${OUTDIR}/bower_components/papaparse"

	${FETCHCMD} -o- -- "${U}" | tar zxf - -C "${EXTRACTDIR}"

	mkdir -p -- "${O}"
	cp "${EXTRACTDIR}/PapaParse-${V}/"papaparse{.min,}.js "${O}"
	rm -rf "${EXTRACTDIR}/PapaParse-${V}"
}

# download and extract files
bootstrap '3.3.7' # ^3.3.7
bootstrap_datetimepicker	'4.17.47'	# ^4.17
bootstrap_rtl_ondemand '3.3.4' # ^3.3.4-ondemand
c3 '0.6.11'	# ^0.6
d3 '5.7.0' # ^5.0.0 (c3 dependency)
fullcalendar '3.9.0' # ^3.0
gettext_js '0.5.5' # ^0.5
jquery '3.3.1' # ^3
moment '2.23.0'	# ^2.10
mousetrap '1.6.2' # ^1.6
papaparse '4.6.2' # ^4.1

# cleanup (ensure it is empty)
rmdir "${EXTRACTDIR}"

# generate sha256
( cd "${OUTDIR}" && find "bower_components" -type f -print0 \
	| xargs -0 sha256 -b ) \
	> "${OUTDIR}/SHA256"

```

---

<div class="post-metadata">

**Author:** ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)\
**Post date:** [February 8, 2020, 1:28pm UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/66 "2020-02-08T13:28:27Z")

</div>

> [@semarie](#):
>
> instead of running the script to generate sao-dependencies, you could directly download the latest generated archive at [http://kapouay.odns.fr/pub/tryton/sao-dependencies-5.0-12.tar.gz](http://kapouay.odns.fr/pub/tryton/sao-dependencies-5.0-12.tar.gz) , unpack it and move the `bower_components` directory inside the sao root.

Ah, didn’t know that, but that makes things even easier 😄

---

<div class="post-metadata">

**Author:** ![trytfan](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/t/f19dbf/32.png) [@trytfan](https://discuss.tryton.org/u/trytfan)\
**Post date:** [February 8, 2020, 2:31pm UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/67 "2020-02-08T14:31:43Z")

</div>

Hello edbo,

can you edit your with for the new solution (sao-dependencies-5.0-12.tar.gz) how to? Or create a new how to?

The how to reads very nice.

Thank you

trytfan

---

<div class="post-metadata">

**Author:** ![edbo](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/e/f14d63/32.png) [@edbo](https://discuss.tryton.org/u/edbo)\
**Post date:** [February 8, 2020, 4:03pm UTC](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125/68 "2020-02-08T16:03:27Z")

</div>

I can modify the post, but more important is if you got up-and-running 😄 I can make howto’s which reads nice (thanks for the kind words) but it’s main purpose is to get you (and others) up-and-running. So please let us know if you got everything running.

[Previous page](https://discuss.tryton.org/t/setup-web-client-with-debian-10/2125.md?page=3)
