Spin Up a Kiwi TCMS Dev Environment on Ubuntu 24.04 Server (Headless) and Access It via SSH Port Forwarding

On this page9 sections

Goal: Build Kiwi TCMS from source on a GUI-less Ubuntu 24.04 Server and run it in development mode (Django runserver + Webpack watch). Since the server is headless, you’ll reach it from your workstation via SSH local port forwarding and browse at http://127.0.0.1:8000/.

This is for development only. For production, use a real WSGI/ASGI server, reverse proxy, TLS, and a managed database.

1. Clone the source

git clone https://github.com/kiwitcms/Kiwi.git

2. Install system packages

sudo apt update
sudo apt install -y python3.12-venv pkg-config libmariadb-dev build-essential python3.12-dev

3. Create and activate a Python virtualenv

python3 -m venv kiwi-env
source kiwi-env/bin/activate

4. Install backend dependencies (MariaDB flavor + dev tools)

cd Kiwi
pip install -r requirements/mariadb.txt
pip install -r requirements/devel.txt

5. Install Node.js (via nvm) and frontend deps

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
nvm install node
cd tcms
npm install

6. Initialize database and create a superuser

cd ..
./manage.py migrate
./manage.py createsuperuser

7. Start the two dev processes (use two terminals)

Terminal A — Webpack (watch mode)

cd ~/Kiwi/tcms
./node_modules/.bin/webpack watch

Terminal B — Django dev server

source ~/kiwi-env/bin/activate
cd ~/Kiwi
./manage.py runserver

8. No browser on the server? Use SSH local port forwarding

From your workstation (not the server), forward local port 8000 to the server’s localhost:8000:

ssh -N -L 8000:127.0.0.1:8000 administrator@client.maksonlee.com

What this does

  • -L 8000:127.0.0.1:8000 maps your 127.0.0.1:8000server’s 127.0.0.1:8000
  • -N tells SSH not to run a remote command; it just keeps the tunnel open

Now open on your workstation:

http://127.0.0.1:8000/

Verify

  • You see the Kiwi TCMS homepage and can log in with the superuser you created.
  • Terminal A shows Webpack compilations when frontend files change.
  • Terminal B shows Django access logs and tracebacks if any errors occur.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top