This is the opensource version of torrentsmd that comes with an autoinstaller.
Library.md is a trackerless knowledge sharing site. It's integrated with dht-client-daemon to fetch the number of peers of torrents from DHT. Automated import and export of torrents via rest endpoints.
Mysql, php 5.6. Sphinx for search. Mongodb for torrent tags. dht-client-daemon for dht peer retrieval.
Auto-installer is based on ansible. It was tested on Ubuntu 16.x and 17.x. A user the name "ubuntu" with must exist, some cron jobs will be added to it. You need to run one command to install and configure everything. Run it as root or a sudo enabled user.
./install-all.sh
If you want to test locally this version, you can install the app in a VM using virtualbox & vagrant.
Install vagrant and Virtualbox. Familiarize yourself with ansible/Vagrantfile to see the ports that are redirected.
cd ansible
vagrant up
ssh-add ansible/.vagrant/machines/default/virtualbox/private_key
ansible-playbook -i ansible/hosts ansible/play_main.yml
If you want to use the latest webapp version after a previous version was installed.
./update-code.sh to copy files from local webapp to /www folder.
NOTE: The evolution of schema is currently not supported.
Information about the torrents can be replicated across the trackers using scripts inside periodic/import/ folder.
- torrents_export.php will export torrents information in JSON format.
- torrents_import.php and torrents_import_poll_last.php importing the latest torrents.
- torrents_import_images.php import the images.
By default, torrents_import_poll_last.php and torrents_import_images.php run every minute.
As one off operation, you'll have to run torrents_export.php that will synchronize all the torrents.
Simply register an account and ssh to machine and execute the following query:
- mysql "UPDATE webapp.users SET class=10 WHERE id=$your_user_id"
This setup will create an onion service.
You can find the config here /etc/onionbalance/config.yaml, if the key is [something].key then your address gonna be [something].onion.
This setup is using onionbalance with 3 tor workers, the default tor process is used by onionbalance itself.
-
systemctl status onionbalance
-
systemctl status tor_worker_srv1
-
systemctl status tor_worker_srv2
-
systemctl status tor_worker_srv3
-
journalctl -u onionbalance.service -n 100
-
journalctl -u tor_worker_srv1 -n 100
- systemctl restart tor_worker_srv1
- systemctl restart tor_worker_srv2
- systemctl restart tor_worker_srv3
- systemctl restart onionbalance