From 2e8025a2418db27c019d9109777a536f7ea7eea7 Mon Sep 17 00:00:00 2001 From: Jelle van Snik Date: Tue, 27 Dec 2022 15:56:28 +0100 Subject: [PATCH] selfhosting guide --- README.md | 10 ++++++++-- SELFHOSTING.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 SELFHOSTING.md diff --git a/README.md b/README.md index 5b3e7d01..0f70d1b5 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,13 @@ Features include: - No BS: just a search bar and a video player - No responsibility on the hoster, no databases or api's hosted by us, just a static site -## Self-hosting / running locally +## Self-hosting + +A simple guide has been written to assist in hosting your own instance of movie-web. + +Check it out here: [https://github.com/movie-web/movie-web/blob/dev/SELFHOSTING.md](https://github.com/movie-web/movie-web/blob/dev/SELFHOSTING.md) + +## Running locally for development To run this project locally for contributing or testing, run the following commands:
note: must use yarn to install packages and run NodeJS 16
@@ -39,7 +45,7 @@ yarn start To build production files, simply run `yarn build`. -You can also deploy the Cloudflare Worker (in worker.js) and update the proxy URL constant in `/src/mw-constants.ts`. +You'll need to deploy a cloudflare service worker as well. Check the [selfhosting guide](https://github.com/movie-web/movie-web/blob/dev/SELFHOSTING.md) on how to run the service worker. Afterwards update the proxy URL constant in `/src/mw-constants.ts` with your service worker.

Contributing - GitHub issues GitHub pull requests

diff --git a/SELFHOSTING.md b/SELFHOSTING.md new file mode 100644 index 00000000..21547b9f --- /dev/null +++ b/SELFHOSTING.md @@ -0,0 +1,33 @@ +# Selfhosting tutorial + +> **Note:** We do not provide support on how to selfhost, if you cant figure it out then tough luck. Please do not make Github issues or ask in our Discord server for support on how to selfhost. + +So you wanna selfhost. This app is made of two parts: + - The proxy + - The client + +## Hosting the proxy + +The proxy is made as a cloudflare worker, cloudflare has a generous free plan, so you don't need to pay anything unless you get hundreds of users. + +1. Create a cloudflare account at [https://dash.cloudflare.com](https://dash.cloudflare.com) +2. Navigate to `Workers`. +3. If it asks you, choose a subdomain +4. If it asks for a workers plan, press "Continue with free" +5. Create a new service with a name of your choice. Must be type `HTTP handler` +6. On the service page, Click `Quick edit` +7. Download the `worker.js` file from the latest release of the proxy: [https://github.com/movie-web/simple-proxy/releases/latest](https://github.com/movie-web/simple-proxy/releases/latest) +8. Open the downloaded `worker.js` file in notepad, VScode or similar. +9. Copy the text contents of the `worker.js` file. +10. Paste the text contents into the edit screen of the cloudflare service worker. +11. Click `Save and deploy` and confirm. + +Your proxy is now hosted on cloudflare. Note the url of your worker. you will need it later. + +## Hosting the client + +1. Download the file `movie-web.zip` from the latest release: [https://github.com/movie-web/movie-web/releases/latest](https://github.com/movie-web/movie-web/releases/latest) +2. Extract the zip file so you can edit the files. + +> Whoops, the rest of this guide hasn't been written yet. +Check back soon.