diff --git a/README.md b/README.md index 34b5c21..3300a1b 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,32 @@ -### Checklist - -1. Replace IP addressses in `docker-compose.yml` and `reset.sh` -2. Make sure `reset.sh` works -3. Set companion secret key in `config.toml` -3. In `nginx`: - - `openssl dhparam -out dhparam.pem 3072` (takes up to a few minutes, you can do the two below steps in the meantime) +1. `git clone --recursive` +2. Replace IP addresses in `docker-compose.yml`: + - Search and replace `203.0.113.1` with the IPv4 address you want nginx to listen on + - Search and replace `2001:db8::1` with the IPv6 address you want nginx to listen on + - You can remove lines with either if you don't want to listen on IPv4 or IPv6 +3. How do you want to connect to YouTube? + - If you want to rotate IPv6, replace the subnet in `reset.sh` + - This rotates your ipv6 to bypass ratelimits. It's only effective with subnets larger than /64, the larger the better. + - Replace `2001:db8::/32` with your subnet. + - Uncomment the two lines of course + - You must also install `pyroute2`. It's on pypi or `apt install python3-pyroute2` on debian + - If you want to use gluetun, uncomment everything below `gluetun:` and the two lines `network_mode` and `depends_on` + - By default uses WireGuard config in `wg0.conf` in base directory + - If something else, you should know what you're doing +4. Set the companion secret key in `config.toml` +5. cd to `nginx/` and: + - `openssl dhparam -out dhparam.pem 3072` (takes up to a few minutes, you can do other steps in the meantime) - `openssl req -new -x509 -days 365 -noenc -out snakeoil.pem -keyout snakeoil.key` (keep pressing Enter) - - Replace hostname in `conf.d/companion.conf` also replace proxy target to `gluetun` if using gluetun -4. If using gluetun: Create `wg0.conf` and comment the rotation in `reset.sh` -4. `docker compose up -d` and [issue a certificate](https://git.m724.eu/Minecon724/dream-setup/src/branch/master/CERTIFICATE.md) -5. **Schedule `reset.sh`**. This is very very important. Restart it every at most 24 hours. + - If opted in to gluetun, search and replace `companion` with `gluetun` in `conf.d/companion.conf` +6. `./reset.sh` +7. [Issue a certificate, steps here](/Minecon724/dream-setup/src/branch/master/CERTIFICATE.md) +8. **Schedule `reset.sh`**. This rotates your IP, updates containers, and it's generally a good practice to auto restart. \ + If you have multiple companions, you should make them restart at different minutes. Like if you have `0` here you should have `30` elsewhere. \ + This restarts every 3 hours (`*/3`). If you have a dirtier IP, it'll probably too infrequently for you. ``` @reboot sleep 30s && cd /opt/invidious-companion && ./reset.sh - 25 */3 * * * cd /opt/invidious-companion && ./reset.sh + 0 */3 * * * cd /opt/invidious-companion && ./reset.sh ``` **TODOs**: -- automate all above -- `reset.sh` only when companion up +- Automate all (well, almost) above +- `reset.sh` only when companion up, currently it brings up no matter what