Skip to content

Instantly share code, notes, and snippets.

@khia khia/.bash_profile
Created May 18, 2018

What would you like to do?
How to run TW5 on andriod
cat data/data/com.termux/files/home/.bash_profile
if [ -d "$HOME/bin" ] ; then
export SVDIR="$HOME/etc/sv"
mkdir -p $PREFIX/var/run
mkdir -p ~/.log
daemonize -c $PREFIX -l $PREFIX/var/run/runsvdir.lock -p $PREFIX/var/run/ $PREFIX/bin/applets/runsvdir $SVDIR 2>/dev/null||:

Install dependencies

  1. Install termux via android market
  2. Install packages
    apt install sv golang daemonize git termux-api termux-tools nodejs
  3. Compile caddy and place binary to bin/caddy

Configure wiki

Update $:/config/tiddlyweb/hosttiddler


Note:There shouldn’t be colon between $protocol$and $host$. Because the values are:

$protocol$ - “https:”
$host$ - “”


cat /data/data/com.termux/files/home/data/data/com.termux/files/home/etc/Caddyfile, {
tls /data/data/com.termux/files/home/etc/ssl.crt /data/data/com.termux/files/home/etc/ssl.key
proxy /wiki {
without /wiki
cat data/data/com.termux/files/home/etc/sv/wiki/run
exec node /data/data/com.termux/files/home/storage/shared/TiddlyWiki5/tiddlywiki.js /data/data/com.termux/files/home/storage/shared/wiki/ --server 8090 $:/core/save/all text/plane
text/html "user" "password"
cat /data/data/com.termux/files/home/etc/sv/wiki/log/run
# taken from
# Get the name of the service from the PWD, this assumes the name of the
# service is one level above the log directory.
pwd=${PWD%/*} # $SVDIR/service/foo/log
service=${pwd##*/} # foo
mkdir -p "$HOME/.log/sv/$service"
exec svlogd -tt "$HOME/.log/sv/$service"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.