Skip to content
TolkTak
RU EN
Download
On this page

Install from source

This runs the server from a checkout under systemd, without Docker. Use it when you want to run a specific commit or cannot use containers.

1. Install the server

The server is a Python application. It needs Python 3.14 and uv, which installs the dependencies and, if the system has no Python 3.14, Python itself.

curl -LsSf https://astral.sh/uv/install.sh | sh     # or see the uv documentation for other ways
sudo git clone --branch v0.2.0 https://github.com/D4eNst/tolktak.git /opt/tolktak
cd /opt/tolktak/server
sudo UV_PYTHON_INSTALL_DIR=/opt/tolktak/python "$(command -v uv)" sync --no-dev

v0.2.0 is a release tag; take the newest one from the releases. This creates a virtual environment in server/.venv with the tolktak-server command in server/.venv/bin/. UV_PYTHON_INSTALL_DIR keeps a Python downloaded by uv under /opt/tolktak, where the service user can read it, rather than in root's home directory. The website is part of the package. By default the server keeps its data in SQLite; to use PostgreSQL, see PostgreSQL.

A source install reports its version as 0.1.0-dev. To show the real one, write it into tolktak/_version.py before starting:

echo "__version__ = \"$(git describe --tags --always | sed 's/^v//')\"" | sudo tee tolktak/_version.py

2. Install LiveKit

Download livekit-server 1.13 for your architecture from the LiveKit releases and install it to /usr/local/bin/. The server starts it itself, with generated keys, as in the docker run image.

3. Configuration

sudo useradd --system --home /var/lib/tolktak --create-home tolktak
sudo mkdir -p /etc/tolktak
sudo install -m 640 -g tolktak /dev/null /etc/tolktak/.env

/etc/tolktak/.env:

TOLKTAK_EMBEDDED_LIVEKIT=1
TOLKTAK_DATA_DIR=/var/lib/tolktak
# 127.0.0.1:8080 behind a reverse proxy with HTTPS; 0.0.0.0:8080 to serve plain HTTP directly.
TOLKTAK_LISTEN=127.0.0.1:8080
# 1 behind a reverse proxy: rate limits then use X-Forwarded-For, and LiveKit is reached through /rtc.
TOLKTAK_TRUST_PROXY=1

Other settings are listed in the configuration reference. LiveKit listens on ports 7880, 7881 and 7882; see Firewall and ports.

4. Create the service

/etc/systemd/system/tolktak.service:

[Unit]
Description=TolkTak server
After=network-online.target
Wants=network-online.target

[Service]
User=tolktak
WorkingDirectory=/opt/tolktak/server
EnvironmentFile=/etc/tolktak/.env
ExecStart=/opt/tolktak/server/.venv/bin/tolktak-server
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now tolktak
journalctl -u tolktak -f

The journal holds both the server's and LiveKit's log. If LiveKit stops, the server stops too, and systemd restarts both.

5. Finish

With HTTPS, set up the reverse proxy. Then open the server's address and register: the first account becomes the administrator.

To upgrade:

cd /opt/tolktak/server
sudo git checkout tolktak/_version.py      # only if you wrote the version into it
sudo git fetch --tags
sudo git checkout v0.2.1                   # the new release tag
sudo UV_PYTHON_INSTALL_DIR=/opt/tolktak/python "$(command -v uv)" sync --no-dev
sudo systemctl restart tolktak

If you write the version into tolktak/_version.py, do it again before the restart. Database migrations run on start.

Page source