Skip to content

Installation

Tract Stack is a full stack application. It includes an astro frontend to serve the web experience, a basic PHP backend “concierge” of sorts with a sprinkling of server config. This guide is based on Debian Linux. If you’re up to the challenge we’ll provide you with everything required to install and self-host your own Tract Stack!

It is available under the source-available Functional Source License

Commercial use is encouraged. If you are an agency looking to build with Tract Stack, let’s chat.

Prerequisites

Tract Stack can be self-hosted on Debian Linux.

  • Debian 12 server with sudo access and python-pip3 installed
  • everything else can be installed via ansible playbooks and bash scripts! This includes CSF,Nginx,PHP-fpm,MariaDB,docker,nodejs,composer
  • Cloudflare API credentials; note: this is for certbot to generate SSL certs and could be overridden / done manually

Before Installation

Tract Stack should run on any VPS with 1-2GB ram. This guide and its scripts are based on Debian 12. No reason it couldn’t be ported to other systems.

Prepare the server

In tractstack-installer you’ll find two ansible playbooks. You’ll need to run both.

Be sure to review the README, esp. about /templates/* where you’ll set your API keys, SSH keys, MySQL pwd, etc.

If you are running these playbooks remotely, be sure to consult the README on how to ‘first run’ before your SSH keys are installed.

build_server.yml initializes the server:

build_server_t8k.yml prepares the server for Tract Stack:

Ensure that you’ve run both playbooks.

Create the t8k user

Tract Stack installs itself in the t8k user /home/t8k folder.

There are two steps involved. First, create the user. remember your password!

Terminal window
sudo adduser t8k
sudo usermod -aG sudo t8k

Next, become the t8k user and get the Tract Stack installer:

Terminal window
su - t8k
git clone https://github.com/AtRiskMedia/tractstack-installer

Installation

Log-in or become the t8k user.

Run the install script

Use the tractstack-install.sh script to get a new instance of Tract Stack (e.g. 1 website). A new user account and /home/user folder will be generated through this process. (If you are running multiple websites, simply repeat the process with a different user name.)

Carefully decide upon a subdomain for this Tract Stack. It will also be used as username on Debian. It must be short and text only, no spaces. We’ll use hello as a default.

Once your website is live, you can set-up the subdomains a CNAME records pointing to the primary domain.

Terminal window
cd ~/tractstack-installer/scripts
sudo ./tractstack-install.sh hello

Complete the installation

The install script will take 1-2 minutes. A lot happens. When it’s finished you’re ready to go!

All the instructions (and credentials) will be in the terminal. You will need to copy and paste these! Be sure to store them in a secure place afterwards.

Enter your Story Keep

Visit https://hello.yourdomain.com/storykeep/login?force=true (update with your domain; use the link provided in the terminal) and log-in with the account you made in the prior step.