Skip to main content

TWWeb is Taskwarrior’s web interface.

It’s aimed to be run on a internet-facing web server by a single user (it currently supports only a single registered user and a single taskrc). It includes mobile-first responsive design and PWA.

Screenshots

Login screen List of tasks Alternate view for task list New task screen

Quick test

You can quickly check if TWWeb suits your needs by running a development server locally on your computer.

$ tox -e dev

After running this command TWWeb will be accessible on localhost:5000. You can change the port on which development server listens this way:

$ tox -e dev -- --port=3333

Installation with Docker

TWWeb provides a Docker image. You can quickly build a container and run an image like that:

# docker build . -t twweb
# docker run -p 5456:5456 twweb

After that you should be able to open TWWeb in your browser on address localhost:5456. Image preserves all data and configuration inside /data directory, so it’s preferable to mount it as a volume:

# docker run -v data:/data -p 5456:5456 twweb

Docker image will pre-populate /data with TWWeb’s settings as long as configuration file is not found. Other settings (uwsgi configuration and taskrc) won’t be pre-populated when /data is mounted as a host directory.

You can change settings before the first run with the following environment variables (listed together with their default values):

  • TWWEB_SETTINGS [/data/twweb.cfg]: path to TWWeb’s configuration file.

  • TWW_CFG_SECRET [empty]: TWWeb’s secret key used for encryption. If this is empty, image will generate a random secret on first run. Leave it empty in most cases.

  • TWW_CFG_PIN [twweb]: PIN used for registration of the first user. You probably should change it

  • TWW_CFG_DB_ENGINE [sqlite]

  • TWW_CFG_DB_HOST [/data/twweb.db]

  • TWW_CFG_TW_TASKRC [/data/taskrc]

Example:

# docker run -v data:/data -p 5456:5456 \
            -e TWW_CFG_SECRET=extraSecret1122 \
            -e TWW_CFG_PIN=supersecret \
            twweb

You can also build and run the image via a docker-compose.

Manual Installation

To install TWWeb you’ll need a web server able to run Python applications. You’ll also need a database, but sqlite should be fine as TWWeb doesn’t store a lot. Obviously you’ll also need a working Taskwarrior.

We’ll install all required components inside a virtualenv. Before you start, you should select and create a directory in which TWWeb will be placed. For now we’ll assume /var/www/example.com/twweb, where “example.com” part is typically replaced with a name of your domain.

$ sudo mkdir -p /var/www/example.com/twweb
$ sudo chown $USER:www-data /var/www/example.com/twweb
$ chmod 775 /var/www/example.com/twweb
$ cd /var/www/example.com/twweb

Above commands create and set appropriate permissions for TWWeb’s directory. When following this installation method, TWWeb itself will need write permissions in this directory so that’s why we change the group permission to rwx.

Taskwarrior configuration

For Taskwarrior, choose the most appropriate installation method for your server. Keep in mind that you’ll need a task executable which will be available in $PATH of a user which will run TWWeb (typically www-data).

For example, for Debian-based distributions the following command should do the trick:

$ sudo apt install task

Now create a separate taskrc and task directory in which Taskwarrior will store its data:

$ mkdir -m 775 task && chown $USER:www-data task
$ echo "data.location=`pwd`/task" > taskrc

If you want to use synchronization with Task Server, you can place your certificates in this directory and configure it inside a newly created taskrc file.

Installation with uWSGI

Now we’ll install TWWeb and uWSGI inside a new virtualenv:

$ virtualenv -p python3 venv
$ venv/bin/pip install twweb uwsgi
$ inst=`find venv -name twweb -type d`

The last command saves the path to the directory in which TWWeb package is located. It’s not strictly required, but will become handy later. Typically it will be found in a directory like venv/lib/python3.5/site-packages/twweb.

Inside utils directory in Git repository there are various example configuration files. One of them is twweb-uwsgi.ini which is a configuration for uwsgi. You can edit it to your likings, but the original one should work fine as well. Copy it to your current directory.

Now we’ll create TWWeb’s configuration file, named twweb.cfg. We’ll add a custom SECRET_KEY and PIN to it (VERY IMPORTANT). We’ll also point sqlite database to our directory and taskrc to the previously created one:

SECRET_KEY = 'this should be secret and complex'
PIN = 'additional password used for first register'

DB_ENGINE = 'sqlite'
DB_HOST = '/var/www/example.com/twweb/twweb.db'

TW_TASKRC = '/var/www/example.com/twweb/taskrc'

You have to point to it via TWWEB_SETTINGS environment variable, for example this way:

$ export TWWEB_SETTINGS=`pwd`/twweb.cfg

And that’s it! You can run TWWeb with venv/bin/uwsgi --ini twweb-uwsgi.ini. Logs are stored inside /var/log/uwsgi/twweb.log.

Now you’ll have to configure your web server (e.g. Apache or Nginx) to forward all requests to your uwsgi app. For example for Nginx you can add something like that:

location /update {
  include uwsgi_params;
  uwsgi_pass unix:/run/uwsgi/twweb.socket
}

Metadata

Release files for twweb 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twweb 0.6.1
File Size Uploaded
twweb-0.6.1.tar.gz 164.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for twweb 0.6.1
File Interpreter ABI Platform
twweb-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 212.0 kB

Release files / twweb-0.6.1.tar.gz

Download URL twweb-0.6.1.tar.gz
Size 164.3 kB
Tags Source
SHA-256 checksum
How to use checksums
756e00739c681aff1092cf910732e8c0e4a278958b8dc53af91bd2a8a6311d81
BLAKE2b-256 checksum
How to use checksums
b96b91966a92a7256a870331e3e1b3e06a2bf8f3f28a7056511985b7e82ca265
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

Release files / twweb-0.6.1-py3-none-any.whl

Download URL twweb-0.6.1-py3-none-any.whl
Size 47.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7823cb80390e03414387d4004ea6cb85498ff8d7d9cf20ae59c566e49282f00
BLAKE2b-256 checksum
How to use checksums
081a391a521b6c042b7d94c7d6930564f633822dce37a21c37987730fe2e729d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page