Running a private extension server

If you have several computers running TC in your network, it might be convenient to run a private extension server there. By pointing all instances of TC to your private server, you can get fast downloads from LAN when needed. We also create the list for appbrowser, so graphical extension downloading works.

You need to have either a ftp or http server running; this howto is not about setting one up. It should have anonymous access; if you need additional security, set it up to only allow IP's from your LAN, for example.

Preparing

Set up a directory somewhere in the server area as the base dir. It doesn't matter if it's in the server root or somewhere deep. For this howto we'll pick a typical apache setup, where users have web space in their home directories: in our example, the base directory shall be http://myserver.local/~username/tc.

Directory structure

You'll need to mirror our directory structure under that base directory. This means the directory tcz (and tce, if you use a legacy version). They can be for TC 1.x, 2.x or 3.x, but if you wish to have more than one major version as clients, just create a subdirectory for each (2.x, 3.x..).

In the example, TC 1.x TCZ repo would now be at http://myserver.local/~username/tc/tcz. For TC 2.x the base address is http://myserver.local/~username/tc/2.x, and the 2.x TCZ repo would reside at http://myserver.local/~username/tc/2.x/tcz.

~pp~.:
total 12
drwxrwxr-x 4 1000 1000 4096 May 12 16:28 2.x
drwxrwxr-x 2 1000 1000 4096 May 12 16:28 tce
drwxrwxr-x 2 1000 1000 4096 May 12 16:28 tcz

./2.x:
total 4
drwxrwxr-x 2 1000 1000 4096 May 12 16:28 tcz~/pp~

Copy extensions

Now you can copy desired extensions to their places, depending on extension type and on the version of TC targeted. Also copy their .info and .md5.txt files, .dep, .zsync and .list files are optional (dependency resolution, delta updates or file lists might not be desired).

Creating info.lst for appbrowser

Now we'll create a list file that appbrowser uses to list available extensions fast. One should reside in each repo, for example 2.x/tce and 2.x/tcz have their own. This list needs to be updated whenever you add or remove extensions.

Here's a script by Robert Shingledecker that creates info.lst from the current directory:

~pp~#!/bin/sh
rm info.lst
for i in `ls -1 *.info|sort -f`; do
   basename "$i" .info >> info.lst
done
 
gzip -c9 info.lst > info.lst.gz
~/pp~

Client-side configuration

Clients may change the mirror from the Control panel, but to make permanent changes, you might wish to remaster the base image to use this mirror by default. The file in control of this is /opt/.tcrc. (/opt/tcemirror in later 2.x and 3.x) Here are the contents of those files for TC 1.x, 2.x, and 3.x, using our example server:

TC 1.x:
~pp~Mirror: myserver.local/~username/tc
Protocol: http
Repository: tce~/pp~

TC 2.x:
~pp~Mirror: myserver.local/~username/tc/2.x
Protocol: http
Repository: tcz~/pp~

TC 3.x or later 2.x:
http://myserver.local/~username/tc/

Note that in the last case it's expected the subdirectories 2.x or 3.x exist and are named as such.

Print/export
QR Code
QR Code wiki:local_appbrowser_server (generated for current page)