Installing and running SillyTavern locally on Android using Termux

SillyTavern is a single unified interface for many LLM APIs (KoboldAI/CPP, Horde, NovelAI, Ooba, Tabby, OpenAI, OpenRouter, Claude, Mistral and more), a mobile-friendly layout, Visual Novel Mode, Automatic1111 & ComfyUI API image generation integration, TTS, WorldInfo (lorebooks), customizable UI, auto-translate, more prompt options than you'd ever want or need, and endless growth potential via third-party extensions.

More info here:
https://github.com/SillyTavern/SillyTavern

Old names in screenshots

Screenshots might show outdated terms, like SillyTavern labeled as TavernAI. Don't mind.

Without further ado, let's start with the guide:

tldr

(shortcuts for anons knowing what to do)

1️⃣ install Termux
2️⃣ update packages

pkg update && pkg upgrade -y

if failed then

apt update && apt full-upgrade -y

3️⃣ install esbuild, git and node

pkg install esbuild && pkg install git && pkg install node

4️⃣ clone SillyTavern

git clone https://github.com/SillyTavern/SillyTavern

5️⃣ go inside SillyTavern, and install depends

cd SillyTavern && npm install

SillyTavern is installed!

6️⃣ start SillyTavern

cd SillyTavern && node server.js

7️⃣ update SillyTavern

cd SillyTavern && git pull

8️⃣ switch to beta version

cd SillyTavern && git switch staging

9️⃣ ...and back to stable version

cd SillyTavern && git switch release

Install Termux

To run SillyTavern locally, you'll need a Linux environment. Termux is a Linux emulator.

1️⃣ Go to https://f-droid.org/en/packages/com.termux/


2️⃣ Scroll down and tap Download APK. Install it.

Tavern


3️⃣ Launch the app. You should see this:

Termux


4️⃣ Update repositories and packages. Run the following commands one by one in Termux:

apt update
apt upgrade

If prompted to confirm an update, type:

y

update

Install dependencies

Now let's install dependencies, which are necessary for SillyTavern to run.

1️⃣ First, install esbuild and Git. Copy-paste these commands into Termux:

pkg install esbuild
pkg install git

git


2️⃣ Then, install Node.JS. Use the command:

pkg install nodejs

node


Install SillyTavern

1️⃣ The next step is download the SillyTavern repository. Use command:

git clone https://github.com/SillyTavern/SillyTavern

tai


2️⃣ Next, move inside SillyTavern folder (which you just created/cloned):

cd SillyTavern

3️⃣ Finally, install all remaining dependencies:

npm install

Wait until it finishes. You're done!
npm


Running SillyTavern

Last and final step weebs! Oh wait sorry. Ahem!

1️⃣ To run SillyTavern simply use this command:

cd SillyTavern && node server.js

Alternative if above command failed for some reasons:

cd SillyTavern && ./start.sh
cd SillyTavern && bash start.sh

2️⃣ You should see confirmation in Termux that SillyTavern is running. Open this link in your browser: http://127.0.0.1:8000

not https!

pay attention, the correct link is http://127.0.0.1:8000 and NOT httpS://127.0.0.1:8000

...and that's it!

server


Updating SillyTavern to the latest version

To update SillyTavern:

1️⃣ First go to SillyTavern directory:

cd SillyTavern

2️⃣ Then download (pull) new updates::

git pull

If you're up to date, it'll inform you.
gitpull

Otherwise, it updates automatically.
git


Switching to Staging version

If you want to use the dev branch ( staging ), which has more features and is more constantly updated, use this command:

cd SillyTavern && git switch staging

Keep in mind that this is the development version, so it might break at any time!

To switch back to non-dev branch ( release ) use this:

cd SillyTavern && git switch release

Misc

Termux Error: Address Already in use

A common Termux issue: if a node process wasn't stopped properly, it keeps running.

1️⃣ Move to the main folder:

cd

2️⃣ Launch Node.JS:

node

3️⃣ Clean all stuck nodes:

.clear

Don't forget the dot at the start!


4️⃣ Quit Node.JS:

.exit

5️⃣ Relaunch SillyTavern:

cd SillyTavern && node server.js

boom


Disabling Phantom Process Killing

Android may kill background apps to save battery. That's bad for Termux.

1️⃣ Follow this guide to disable this feature. Credits to the owner:
https://www.youtube.com/embed/IhK55QfWdYc


2️⃣ Alternatively, set Termux to high background power usage in battery settings.


Accessing Termux files

If you want to access the Termux directory (to edit or copy-paste files) then you need to install external file manager (eg, Material Files)

Read this article - it covers everything, just follow it.


Using Aliases

Aliases simplify long commands using a single word. For example you can run and update SillyTavern with a simple three-letter command.

You'll need a file editor (eg, QuickEdit) and access to Termux files (see above).

1️⃣ Find .bashrc (enable hidden files)

if file doesn't exist then create it yourself, mind dot at the start

bash1


2️⃣ Open with QuickEdit

quick


3️⃣ Add this line:

alias Tav="cd SillyTavern && git pull && node server.js"

Change Tav keyword to whatever you want

Alternative alias format if the above one doesn't work:

alias Tav="cd /data/data/com.termux/files/home/SillyTavern && git pull && node server.js"

Save it:
12


4️⃣ Now just type Tav in Termux and it'll update + launch SillyTavern automatically.

ter
ter1


Need help?

SillyTavern's Discord server [ invite link ] has a channel dedicated to Android help and Termux. Just type Termux in any help channel, and the bot will link you to the respective channel


Credits

Original author:

You can just hit me up on Discord, ArroganceComplex#arrochi, you can see me lurking on the Pygmalion Server as Arro, mostly in #help-and-questions though. Thats all, Bye!

Author of 2025 revamp:

rarestMeow in any AI-related cord. or mail rarestMeow at gmail dot com

Key differences from original STAI-Termux guide:

  • restored image links. imgur killed them
  • added tldr for anons who know git and just need commands
  • simplified the commands with && and grouped them better
  • fixed broken links (.../packages/com.Termux/ is 404, correct link was .../packages/com.termux/ )
  • removed outdated info
  • rewrote for clarity
  • removed 2023-ish feeling and lingo (for example, SillyTavern was occasionally named TAI in guide)
  • added link to ST cord
  • improved layout

Obsolete info

this section is no longer relevant. it is left as-is for preservation purpose and completion

Downloading and running TAI-Extras

WARNING: INSTALLING ST EXTRAS ON YOUR WIMPY LITTLE PHONE IS NOT SUPPORTED AND COULD NOT WORK AT ALL, OR EVEN BRICK IT! DO THIS AT YOUR OWN RISK, ANY DAMAGES DONE OR NUCLEAR REACTION WILL BE YOUR OWN RESPONSIBILITY!

UPDATE: Considering pytorch isn't the only problem you'll face even when you're already using proot, you will have to do some digging up or seearching, a lot of editing the requirements.txt files like deleting specific modules or programs that just don't work.

NOTE: I won't post any more fixes or recommendations on what modules would work or not, you need to do it by yourself since it's officially unsupported now by the devs, and you've probably already read my WARNING anyway.

Pytorch doesn't work on native android, and as such won't work on the default Termux command line. The only way you can run it is through a proot, a proot is basically let's you use another Distro or Distributions in Linux's CLI or command line interface. Basically you will get a VM Terminal or CMD if you're on Windows. So for this one, we'll use a Ubuntu Distro Proot. To install it, go to Termux, and write this command. pkg update -y && pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Installer/Ubuntu22/ubuntu22.sh -O ubuntu22.sh && chmod +x ubuntu22.sh && bash ubuntu22.sh

After that it should prompt you to install, if it doesn't it will automatically install for you. Just wait. NOTE: This thing whole thing will definitely take some patience, learn to wait, you can just simply browse other apps as it downloads to so do that.

After it finishes downloading, you should be greeted with a empty UI, with only one line at the top, something with a @localhost in it, this means that it successfully downloaded.

After that it's time to install some needed dependencies on running the Tai Extra's. Write this command on the terminal , apt update && apt upgrade -y && apt install software-properties-common && add-apt-repository ppa:deadsnakes/ppa && apt install python3 && apt update && apt install python3-pip && pip3 install torch==1.12.0 after that is should now install python and it's dependencies, now it's back to waiting time, take note, patience!

After it's done, now you need to git clone the repository. First you need to have git installed, so run, apt install git and it should install git now. Once that's done clone the repo with, git clone https://github.com/Cohee1207/SillyTavern-extras and it should clone it now.

After cloning it, cd to it, cd SillyTavern-extras and then now you need to make some changes to the files, specifically the requirements.txt or requirements-complete.txt, by default it will just download the one without complete so let's just go with that.

I'm assuming you already have access to your files directory, if you havent check out my guide below with the material files thingy and come back. Once you can access it now, go to the Termux directory - ubuntu22-fs - root - SillyTavern-extras and lastly requirements.txt, go open that in a text editor or something and remove the torch=2.0.0+cu=1.17.0 or something along that line. then click save.

After that go back to Termux and run this command, pip install -r requirements.txt, again WAIT!

After it install you can run any module that you want, if you want to run the module for expressions, specifically the 28 expressions, you can run it by running this command, python3 server.py --enable-module=classify --classification-model=joeddav/distilbert-base-uncased-go-emotions-student after that it should install pytorch_bin or something at first, which will take a long time ngl, but after that it should run properly. After it runs, btw once it shows that it's done, don't touch a thing or the program will end, it should give you a link, but by default that link is already in SillyTavern so just go to it, then click the 3box thingy, 4th icon from the top, then click connect and done.

By the way, I suggest you also disable phantom process killing as it might kill off the process, if you received something along the lines of completed with signal 9 it means it was cut off or stopped by android, to avoid that disable phantom process killing, it's included in the guide, the bottom-most one.

Now if ever it ended, and you want to run it again, simply run ./start-ubuntu22.sh && cd SillyTavern-extras && git pull && python3 server.py --enable-module=classify --classification-model=joeddav/distilbert-base-uncased-go-emotions-student and done. If you wanna run other modules, it's the same commands as on the pc, go check out https://github.com/Cohee1207/SillyTavern-extras for that.

Also if you want to have multiple sessions of Termux, so you can run the extensions and tavern at the same time, go hover your fingers to the left edge of your phone and swipe to the right, it should open something, click the new session and you should have another session running, swipe left to right again if you wanna switch sessions and so.

Edit
Pub: 30 May 2025 23:06 UTC
Edit: 02 Jun 2025 12:52 UTC
Views: 225