Tutorial to Run Trilium Server in Termux on Android #4542
Replies: 3 comments 3 replies
-
Start the server in termux Access the server in your browser |
Beta Was this translation helpful? Give feedback.
-
I have a problem! Listening on port 8080 |
Beta Was this translation helpful? Give feedback.
-
大佬,执行proot被提示了Error: proot-distro should not be executed under PRoot. 我是已经root的手机,这是不能root的用吗? |
Beta Was this translation helpful? Give feedback.
-
Tutorial to Run Trilium Server in Termux on Android
Install Termux on your Android device.
Open Termux and install PRoot Distro. PRoot is not a virtual machine; you can find more about PRoot Distro here.
Install a base system; here, I use Manjaro. You can find all distros by running
proot-distro list
. I also renamed it for easy typing.Log in to Manjaro
Install Node.js. You can only get the latest version of Node.js by default. So, we need
nvm
to install the specific version of Node.js that can run Trilium; here, I use 18.18.2. (Note:n
does not work; onlynvm
works.)Get trilium-server from the release page
wget https://github.com/zadam/trilium/releases/download/v0.62.4/trilium-linux-x64-server-0.62.4.tar.xz tar -xf trilium-linux-x64-server-0.62.4.tar.xz mv trilium-linux-x64-server trilium cd trilium
Remove the old dependency folder. As the executables are for
x86
, we do not need them.This is the tricky part; take your time. Reinstall the dependency for
arm
. You may get an error here; you may need to retry the command several times or use a proxy.Start Trilium server
You can access it on your phone's browser with
http://127.0.0.1:8080
.Or, you can access it on your computer with
http://your_phone_ip:8080
.For a quick startup of the service, create a
.sh
file in ManjaroThen you can quickly start Trilium in Termux with this single command
Notes
How to use a proxy
If you fail to execute
wget
,npm install
, orgit clone
due to an internet issue, you can use a proxy withproxychains
. For example:How to clear the cache
If
npm install
keeps failing, you can remove the cache and reinstall it.bash rm -rf node_modules rm -rf ~/.npm/_cacache
Why is it slow?
If you find Trilium is slow, please try to disable power-saving mode on your phone. And give Termux privileges to run in the background or something like that.
Beta Was this translation helpful? Give feedback.
All reactions