Getting ready to release 0.3.0, changing to new documentation system

This commit is contained in:
2018-02-20 22:11:11 -05:00
parent 840a965877
commit 4015a48454
12 changed files with 15619 additions and 14488 deletions

118
README.md
View File

@@ -45,6 +45,8 @@ Image of the frontend UI
- [X] Mostly generated client config from toml.config on first run
- [X] Ability to view TOML settings from WebUI (and perhaps change a few as well)
- [ ] Unit testing completed for a large portion of the package
- [ ] Stability/bug fixing/Optimization rewrite of some of the core structures of the WebUI and base server
@@ -53,7 +55,7 @@ Image of the frontend UI
- [ ] Ability to set priority for individual files (just added to anacrolix/torrent so coming soon, already added to my UI)
- [ ] Ability to view TOML settings from WebUI (and perhaps change a few as well)
- Late 2018
@@ -62,119 +64,9 @@ Image of the frontend UI
- [ ] React-native Android app (I don't own any Mac products so there will be no iPhone version)
# Installation:
# Documentation
## Linux (tested on Debian)
You can watch a YouTube video of me setting it up:
<a href="http://www.youtube.com/watch?feature=player_embedded&v=G0gO_cm_Oks
" target="_blank"><img src="http://img.youtube.com/vi/G0gO_cm_Oks/0.jpg"
alt="goTorrent Alpha Setup Video" width="240" height="180" border="10" /></a>
### Configuring the backend
Download the latest release from the releases tab, it will be in a tar.gz format.
Create a directory where goTorrent will run from
sudo mkdir /opt/goTorrent
Put the tar.gz release into the folder, and extract it.
tar -zxvf goTorrent_release_64-git.tar.gz
You can then remove the tar.gz if you wish. You should have something similar to the following files:
drwxr-xr-x 5 root root 9 Jan 21 14:56 .
drwxr-xr-x 5 root root 5 Jan 21 14:54 ..
-rw-rw-rw- 1 root root 1086 Dec 1 01:42 LICENSE
-rw-rw-rw- 1 root root 69 Dec 1 01:01 README.md
-rw-rw-rw- 1 root root 4466 Jan 21 03:48 config.toml
drwxr-xr-x 3 root root 3 Jan 21 14:55 dist-specific-files
-rw-rw-rw- 1 root root 12503552 Jan 21 03:53 goTorrent
drwxr-xr-x 3 root root 3 Jan 21 14:55 public
drwxr-xr-x 2 root root 3 Jan 21 14:55 templates
The `config.toml` file contains all of the settings for the server part of the application. Most of the important settings are at the top of the file, so open it with your prefered text editor.
[serverConfig]
ServerPort = ":8000" #leave format as is it expects a string with colon
ServerAddr = "" #blank will bind to default IP address, usually fine to leave be
LogLevel = "Warn" # Options = Debug, Info, Warn, Error, Fatal, Panic
LogOutput = "file" #Options = file, stdout #file will print it to logs/server.log
SeedRatioStop = 1.50 #automatically stops the torrent after it reaches this seeding ratio
#Relative or absolute path accepted, the server will convert any relative path to an absolute path.
DefaultMoveFolder = 'downloaded' #default path that a finished torrent is symlinked to after completion. Torrents added via RSS will default here
TorrentWatchFolder = 'torrentUpload' #folder path that is watched for .torrent files and adds them automatically every 5 minutes
#Limits your upload and download speed globally, all are averages and not burst protected (usually burst on start).
#Low = ~.05MB/s, Medium = ~.5MB/s, High = ~1.5MB/s
UploadRateLimit = "Unlimited" #Options are "Low", "Medium", "High", "Unlimited" #Unlimited is default
DownloadRateLimit = "Unlimited"
[notifications]
PushBulletToken = "" #add your pushbullet api token here to notify of torrent completion to pushbullet
Usually you don't need to change anything in this file, goTorrent will use your default IP address and bind to it. You can change the port if you wish.
Next, we need to make sure that the executable runs, so run the following:
chmod +x goTorrent
This will make the program executable.
###Connecting the Frontend to the Backend
We need to connect our react frontend to our Golang backend, for this we only need to edit one JS file.
nano public/static/js/kickwebsocket.js
var ws = new WebSocket("ws://192.168.1.141:8000/websocket"); //creating websocket
Just change the IP address after ws:// to your server IP address, and change the port if you changed the port in the `config.toml` file.
Then save that file and return to `/opt/goTorrent`.
Now we can test the server. For testing I recommend going into the `config.toml` file and changing the `LogOutput` to `stdout`, and the `LogLevel` to `Info`.
Then start the server:
./goTorrent
If you have `LogLevel` set to `Info`, you should see the confirmation that the client config has been generated.
You can then open your browser and connect to IP:Port (http) and you should see the main page. You will see an error for retrieving RSS feeds in stdout, but this is expected for first load.
You can press `F12` if using Chrome to open the console and click around the UI to see the logging available for the frontend.
### Running goTorrent as a Service
If you are on a linux system that uses systemd, in the `dist-specific-files\Linux-systemd\` folder there is a `goTorrent.service` file that can be used to setup systemd for goTorrent. A quick overview of what is needed.
1. Edit the systemd file to specify your specific implementation
2. Copy the file to your systemd folder, i.e. `/etc/systemd/system`
3. Enable the service `systemctl enable goTorrent.service`
4. If using a new user, create that user and assign permissions:
a. `useradd goTorrent`
b. `sudo chown -R goTorrent:goTorrent /opt/goTorrent`
c. If you want to test server: `su goTorrent` then run the executable
5. Set your `config.toml` file to the values you want.
6. Start your server: `systemctl start goTorrent`
7. Check for errors: `systemctl status goTorrent`. You can also check `logs\server.log`.
### Windows
Please see the linux instructions as they are similar, for running it as a service I havn't tried out any of the programs that claim to do that, but perhaps try [NSSM](http://nssm.cc/download)
All the documentation is available [here](https://deranjer.github.io/)
# Special Thanks