The other day, I wrote an articleshown below, and I was thinking about whether I could prepare or have a machine that can run the server continuously.
NostrP2P: Pure P2P Distributed Microblogging System - ryo_grid's tech articles
Then, I remembered that there is an app called Termux that creates a unique Linux environment within an Android device. So, I thought it would be a good idea to use an old Android smartphone to run the server, and when I tried it, it worked perfectly!
(The idea behind Termux is that since Android is a type of Linux, by changing the root location of the file system in the shell shown to the user with chroot and placing the necessary files, you can create a unique Linux userland.)
First, referring to the sites below, install Termux via the Fdroid app.
Installing from F-Droid - Termux Wiki
Once Termux is installed, you can follow the commands below to get the server running.
$ apt update
$ apt upgrade
$ apt install -y golang git
$ git clone https://github.com/ryogrid/nostrp2p
$ cd nostrp2p
$ go build -o nostrp2p main.go
$ ./nostrp2p server -l 0.0.0.0:20000 -p <npub format public key> -b ryogrid.net:8888
After that, find the IP address of the smartphone and specify it in the client. (If connected via WiFi, you can check the assigned IP address by following the network settings. If the IP address changes frequently, you can use a VPN app like Tailscale to use a fixed address on the VPN.)
The connection to the bootstrap server was successful.
To stop the server, terminate the server process with Ctrl + c, exit the shell with the exit command, and then close Termux like a regular app. If the environment built in Termux is no longer needed, uninstalling Termux will delete the environment and the files created within it.
Below are some screenshots.
Server address settings in the client (using a native client for Windows this time)
Tried posting
The data posted to the bootstrap server (also a trial server) was successfully transferred and displayed on the web client connected to the trial server.
Wow, Termux is amazing.