t-rex

Create and serve your own vector tiles

Setup

Installation

Ubuntu Focal

Install GDAL library:

sudo apt install libgdal26

Download and install DEB package from github.com:

curl -O -L https://github.com/t-rex-tileserver/t-rex/releases/download/v0.14.3/t-rex_0.14.3-1.focal_amd64.deb && sudo dpkg -i t-rex_0.14.3-1.focal_amd64.deb

Debian Bullseye

Install GDAL library:

sudo apt install libgdal28

Download and install DEB package from github.com:

curl -O -L https://github.com/t-rex-tileserver/t-rex/releases/download/v0.14.3/t-rex_0.14.3-1.bullseye_amd64.deb && sudo dpkg -i t-rex_0.14.3-1.bullseye_amd64.deb

CentOS / RHEL 8

Download and install RPM package (without GDAL driver) from github.com:

curl -O -L https://github.com/t-rex-tileserver/t-rex/releases/download/v0.14.3/t-rex-0.14.3-1.el8.x86_64.rpm && sudo yum install t-rex-0.14.3-1.el8.x86_64.rpm

Linux

Download Binary with minimal dependencies (no GDAL driver) from github.com:

curl -O -L https://github.com/t-rex-tileserver/t-rex/releases/download/v0.14.3/t-rex-v0.14.3-x86_64-linux-gnu.tar.gz && sudo tar xf t-rex-v0.14.3-x86_64-linux-gnu.tar.gz -C /usr/local/bin

Windows

Download MSI installer from github.com:

t-rex-v0.14.3.msi

Double click to install (needs Administrator permissions).

Run in Command Prompt window:

set PROJ_LIB=%programfiles%\t-rex\proj7\share

"%programfiles%\t-rex\t_rex"

Docker

Install Docker on your platform.

Download and run the t-rex Docker image:

docker pull sourcepole/t-rex:v0.14.3
docker run sourcepole/t-rex:v0.14.3 --version
docker run -p 6767:6767 sourcepole/t-rex:v0.14.3 serve --bind=0.0.0.0 --openbrowser=false --config=myconfig.toml

The process is running as user www-data with the working directory /var/data/in. For output, a volume /var/data/out is available.

Example using input and output volumes (Unix):

docker run -p 6767:6767 -v $PWD:/var/data/in:ro -v /tmp:/var/data/out sourcepole/t-rex:v0.14.3 serve --bind=0.0.0.0 --openbrowser=false --config=myconfig.toml

Current directory on Windows:

docker run -p 6767:6767 -v %CD%:/var/data/in:ro sourcepole/t-rex:v0.14.3 serve --bind=0.0.0.0 --openbrowser=false --config=myconfig.toml

Upgrading

See the Changelog for breaking changes in new versions.

0.7.x -> 0.8.0

Conversion to new datasource syntax:

sed -e 's/\[datasource\]/[[datasource]]/g' \
    -e '/type = "postgis"/d' \
    -e 's/url =/dbconn =/g' \
    infile.toml