tkr - Debian-based systems installation

These instructions are for VPS and self-hosted installation on debian-based servers. Use these instructions if:

  • Your server runs a debian-based distribution, like debian or ubuntu
  • You are able to install packages (i.e. you have root access to the server)

Assumptions

  • Your website is https://my-site.com
  • Your web server root is /var/www
  • Your site is hosted at /var/www/my-site
  • The web server user is www-data

Substitute your actual values wherever they differ in the instructions that follow.

Install Prerequisites

You'll need a web server with PHP support. You'll also need PHP SQLite support. The instructions vary by web server. Instructions for Apache and nginx follow.

Apache

sudo apt update
sudo apt install apache2 php libapache2-mod-php php-sqlite3

nginx

sudo apt update
sudo apt install nginx php-fpm php-sqlite3

Install tkr

  1. ssh to your server
  2. Download the current release of tkr.
    • zip
      curl -OJ https://gitea.subcultureofone.org/api/packages/greg/generic/tkr/v1.0.6/tkr.v1.0.6.zip
    • tgz
      curl -OJ https://gitea.subcultureofone.org/api/packages/greg/generic/tkr/v1.0.6/tkr.v1.0.6.tgz
  3. Extract the contents of the file.
    Info

    The file contents will be extracted to a directory called tkr.

    • zip
      unzip tkr.v1.0.6.zip
    • tgz
      tar -xvzf tkr.v1.0.6.tgz
  4. Move the tkr directory to your web server root and set the permissions. These steps depend on whether you want to serve tkr as a subdirectory of your main website or as a subdomain.
    • To serve it as a subdirectory (e.g. https://my-site.com/tkr)
      # move the directory to `/var/www/my-site/tkr`
      sudo mv tkr /var/www/my-site/
      # set the owner of the tkr directory to root
      sudo chown -R root:root /var/www/my-site/tkr
      # set the owner of the tkr/storage directory to www-data
      # NOTE: substitute your web server user here if necessary
      sudo chown www-data:www-data /var/www/my-site/tkr/storage
    • To serve it as a subdomain (e.g. https://tkr.my-site.com)
      # move the directory to `/var/www/tkr`
      sudo mv tkr /var/www/
      # set the owner of the tkr directory to root
      sudo chown -R root:root /var/www/tkr
      # set the owner of the tkr/storage directory to www-data
      # NOTE: substitute your web server user here if necessary
      sudo chown www-data:www-data /var/www/tkr/storage

tkr is ready to go. Now you're ready to configure it.