diff --git a/README.md b/README.md index 659ce83..e57b4b7 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,12 @@ I always recommend self-hosting, as you will be the only person with access to t # Self hosting +If you want to set up a public server you should follow the instructions [HERE](#hosting-on-a-server). The following instructions are for personal use only. + ## Local +You can run Yotter locally on your machine for personal use. You should use a VPN in order to cloak your IP. + ##### IMPORTANT: Connections from the server to googlevideo will be made to stream the videos. It is recommended to use a VPN to preserve your privacy. Understand that the best way of using Yotter is [running on a remote server](#hosting-on-a-server). 1. Install `python3`, `pip3`, `python3-venv` (optional) and `git`. @@ -119,6 +123,9 @@ I always recommend self-hosting, as you will be the only person with access to t 9. Go to "http://localhost:5000/" and enjoy. ## Using Docker: + +Note: Not for a production server. + ##### Building using the Dockerfile > (May not work on Windows) @@ -148,8 +155,9 @@ I always recommend self-hosting, as you will be the only person with access to t 3. Go to "http://localhost:5000/" and enjoy. -## Hosting on a server: +# Hosting on a server: +If you want to set up a Yotter public instance, follow this instructions. #### [VISIT THIS FILE FOR INSTRUCTIONS](https://github.com/pluja/Yotter/blob/dev-indep/SELF-HOSTING.md) ## Updating to newer versions: diff --git a/SELF-HOSTING.md b/SELF-HOSTING.md index 818a38c..d3147ed 100644 --- a/SELF-HOSTING.md +++ b/SELF-HOSTING.md @@ -165,3 +165,18 @@ Updating the server should always be pretty easy: (venv) $ pip install -r requirements.txt (venv) $ sudo supervisorctl start yotter ``` + +## Other configurations + +### Removing log-in restrictions +> (NOT TESTED - COULD CRASH THE APP) Note that some routes make usage of the `current_user` variable to look if the current user is following some user or not, if you remove the restriction for such routes the app will crash. This will be solved on future releases. + +For the example, let's allow for anyone to watch a video on our instance. Even if they aren't registered users. First we need to find the route that we want to allow, you can do it by navigating to the page and taking a look at the URL. Anything after the first `/` is the app route. When we're watching a video, the route is `/watch?v=`. + +Now on the file `routes.py` we will search for the code that the server runs when we navigate to that route. You can use the Find function on your text editor and search for `/watch`. Now, you will see that right below the definition of the route, `@app.route('/watch')`, there is a `@login_required` line. If you delete that line, no restriction will now be applied to that route. + +But you must know that videos and images are proxied through the instance. So we will need to allow another route. For video streaming, the route is `/stream` and for images it is `/img`. So you just need to delete the `login_required` from those two other routes. + +You can now reload the server and you will see that, without logging in, you can now watch videos. + +