Installation
Currently, there are no solutions to automatically install Rehike. Rehike is still in active development, and should be considered "use at your own risk" at the moment.
Manual installation entails installing of the prerequisites in order to set up your own Rehike development environment.
Although Rehike has tried hard to maintain minimal dependencies, this may change in the future as the scope of the project broadens. For example, we may introduce additional technologies in order to compile certain source code.
Although Rehike may look intimidating to install, it actually just requires a few programs and some lightweight editing. Most of the work could be automated, but we have been too lazy to develop the tooling for an automatic installation :P
In addition to the current development resources, here are some community resources for speakers of other languages or those who would prefer to watch a video tutorial:
- macOS-focused installation instructions by carsuki.
- [Japanese/日本語] YouTubeを昔のUIにしよう! by Aoi_Tomoe
- [Russian/русский] КАК ВЕРНУТЬ СТАРЫЙ ДИЗАЙН YOUTUBE #2 by Leyti
- [Croatian/Hrvatski] Kako dobiti nazad stari 2013 YouTube layout-ReHike by Foxy
- [Portuguese/Português] Como restaurar o layout antigo do YouTube by lucas8913
The current prerequisites in order to install Rehike are:
- Windows 7 (64-bit) or later, or equivalences for other operating systems.
- As nice as it would be to support a 21 year old operating system, unfortunately the PHP runtime itself has imposed this limit upon us.
- That being said, you can use Rehike on older operating systems by hosting the server on a newer operating system, either on another computer or within a virtual machine.
- Windows Vista with the Extended Kernel will work too.
- For macOS, Mac OS X 10.7 or greater is required.
- As nice as it would be to support a 21 year old operating system, unfortunately the PHP runtime itself has imposed this limit upon us.
- PHP 8.0 or greater
- For the layman, XAMPP is the preferred easy solution for Windows environments.
- If you're using Linux, the default PHP distribution in your package manager may not come with all of the required extensions.
- A method to proxy Rehike to
www.youtube.com
.- The recommended method is to use the operating system's hosts file. This does not have external prerequisites other the the certificate files, and is detailed under here.
- If you have difficulties with that, some alternative methods are detailed here
Other recommended software that aren't required to run Rehike:
- For Windows and macOS users, the recommended way of managing versions is via Git. Unlike Linux, you will have to manually install it manually.
The first application you will want to install is XAMPP. This is an Apache Webserver distribution (along with a few other components), which will run the Rehike server. Rehike is currently not tested with other webservers.
For Rehike, only the following XAMPP components are required. You may install all of them, especially if you wish to use the development environment for anything else, but otherwise you can disable everything else:
After, you have installed XAMPP, open the program called "XAMPP Control Panel" and you should see the following interface:
Click the buttons in the order presented in the image in order to set up the Apache Webserver component.
Do NOT install Apache as a service by clicking the checkbox in XAMPP Control Panel. Although this may seem tempting as it makes Apache run at startup, it also introduces a security risk as this runs as NT AUTHORITY\SYSTEM
, which gives Rehike the permission to do whatever it wants. This also means that malware can rely on Apache being a service and any possible bugs in Rehike (or other PHP scripts that can be accessed) to take complete control of your system.
Instead, follow the the next section for the right way to make Apache run at startup.
The correct way to do this is to make it run under your own user account. Windows provides an easy way to make programs run at startup.
Simply open Run (Windows+R) and type shell:startup
.
In this folder, download OpenApache.vbs and move it into here.
And now Rehike should work at startup just as you'd hope.
You may encounter issues with the Apache server not starting.
This is most likely caused by another program somewhere taking up ports 80 or 443, which are the standard HTTP ports.
The most infamous culprits are:
-
Skype
- Sorry, but you are shit out of luck. Complain to Microsoft, uninstall Skype, or change the Apache port. Skype used to allow changing this on older versions, but the option is removed as of Skype 8.
-
VMware Workstation
- This may also occur on other VMware products, such as VMware Player.
- If you are using VMware Workstation 16.0 specifically, you will not be able to change the port. They readded the option in 16.1, although I'm not sure the update policy or if you would need to relicense it.
- Otherwise, the port can be trivially changed in the VMware options by going to
Edit -> Preferences -> Shared VMs
, where you need to change the port to something other than 443.
The other way to fix this is changing the Apache ports to something other than 80 and 443. If you do this, you will be unable to forward Rehike via hostsfile, and you will have to manually specify the port in the URL.
Within the XAMPP installation (default: C:\xampp
), there should be a folder inside called htdocs
. This contains all the PHP code to be executed when you request the server.
For a simple installation, you can simply replace the contents of this folder with the contents of a Rehike download. This is highly discouraged. Use Git if possible.
To install with the command prompt:
cd C:\xampp
rmdir htdocs
git clone https://github.com/Rehike/Rehike htdocs
Now you should be able to go to localhost
and see Rehike.
On macOS and Linux, Rehike may crash at startup, and you will see the Rehike Fatal Error screen. This is because Rehike cannot write the configuration or cache files into its install directory.
If you get any error relating to files, run chmod -R 777 <dir>
where <dir>
is your XAMPP htdocs directory. This is /Applications/XAMPP/xamppfiles/htdocs
and /opt/lampp/htdocs
on macOS and Linux by default, respectively.
As Rehike is in active development, certain features are only being worked on in a single dedicated branch, which will then be merged with the main one once the feature is determined to be complete enough.
The currently recommended branch is master
.
You can take a look at the branches on the GitHub website, on the left side of the main repository page. On Git CLI, you can list all branches by simply typing git branch
.
Switching to another branch on the GitHub website just means downloading the ZIP after clicking its link. With Git CLI, you can type git switch <branch name>
.
If you downloaded Git, you also get the fun of being able to play Frankenstein with them! (Though you may to go in and change code conflicts if they arise...)
git merge <other branch name>
Once you've gotten to this point, you can test out if Rehike works by visiting 127.0.0.1
in your web browser. If you get a YouTube page, then Rehike is working.
The hosts file is the recommended way to proxy Rehike, and alternative methods should be avoided if possible. In particular, proxy servers like Fiddler and mitmproxy will cause problems unrelated to YouTube browsing across your entire computer for as long as you are connected to the proxy server.
You will need to download these self-signed certificates. These are used to sign the traffic Rehike produces so that your browser recognises it as regular YouTube traffic.
This download contains a zipped folder with three subdirectories. You can extract them anywhere, but it's good to put them with your Apache install. The recommended destinations are:
-
C:\xampp\apache\conf
(Windows); replace the existing files. -
/opt/lampp/etc
(Linux); replace the existing files. -
/Applications/XAMPP/xamppfiles/etc
(macOS with XAMPP); replace the existing files.
But any destination will work as long as Apache can read them.
Go to the following file:
-
C:\xampp\apache\conf\extra\httpd-vhosts.conf
(Windows) -
/opt/lampp/etc/extra/httpd-vhosts.conf
(Linux) -
/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
(macOS with XAMPP)
...and add the following definition to the end of it:
<VirtualHost 127.0.0.1:443>
ServerName www.youtube.com
DocumentRoot "C:/xampp/htdocs"
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
<Directory "C:/xampp/htdocs">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Obviously, repoint file paths as needed. Linux users will probably have /opt/lampp/htdocs
as their document root instead.
After editing your hosts file, you must restart Apache for the changes to take place. Open XAMPP Control Panel and click the stop button for Apache, and then click start after it shuts down.
The final step is getting the operating system to redirect Rehike on its own.
Go to the following file:
-
C:\Windows\System32\drivers\etc\hosts
(you must open notepad as administrator) -
/etc/hosts
(sudo nano
, etc.)
This file is responsible for manually defining DNS resolutions, but you don't really need to know the technicalities. Just add the following line:
127.0.0.1 www.youtube.com
After doing so, you may have to clear DNS cache or restart your computer (this is the case on Windows versions prior to 7 and probably some Linux versions).
While importing the Rehike certificate into your browser should work fine mostly, certain other applications which use Electron or similar frameworks and embed YouTube content (Discord, Steam, etc.) will not pick up this certificate. For this reason, we recommend installing the certificate system-wide (or in the case of Windows, for your current user).
Run certmgr.msc
, and open the context menu of Trusted Root Certification Authorities
. Hover over All Tasks
, and select Import...
.
Click Next
once, and then click Browse...
to the right of the File name
text box. Change the file type filter on the bottom right to All Files (*.*)
. This is because while Windows supports .pem
certificates, it is missing from this dialog box for an unknown reason. Locate rehike_master_cert.pem
and choose it.
If you haven't downloaded this file, download it from the Browser certificate
link here.
Now, click through the rest of the wizard, and accept any warnings that pop up along the way. If you get a message box that says "The import was successful.", you've successfully installed the certificate.
Sometimes, a system-wide certificate install won't apply to your browser (especially in the case of older Firefox). This is a general guide on how to install an SSL certificate into your browser. For this section, both screenshots from Chrome and Firefox will be demonstrated, although this should generally work for other browsers too.
On Firefox, the certificate manager can be opened by a button near the bottom of the "Privacy & Security" tab at about:preferences#privacy
.
On Chrome, it appears behind two pages. First, go to the "Privacy and security" tab and find the "Security" link. Then scroll to the bottom of that and click "Manage certificates".
After that, you want to go to the "authorities" tab and import the SSL certificate file into there. If it asks you what you're using it for, tick all boxes and continue.
Following these steps, you should successfully load Rehike without the use of any proxy/middleware.
If you wish to disable Rehike for a period of time, a convenient way is to go to /rehike/config and click the button to disable Rehike. Alternatively, you can use the URL parameter: ?enable_polymer=1
.
Although it's advised to host Rehike on ports 80 and 443, some programs (particularly on Windows) hijack these ports for their own bullshit and will prevent Apache from starting. However, using a proxy allows you to change the Apache ports and forward YouTube to a non-standard port. This will not work with this approach using hosts file, since it just manages name to IP address resolution.
The simple solution is to stop using Skype, since it has no excuse to hijack :80 and :443 anyway.
I tried to write these instructions in the friendliest manner that came to me, however you can't always be perfect.
Recheck your steps - you probably forgot something. Here are some examples of issues:
This is always YouTube's cache hiding another issue. Because the Polymer loader document remains pretty much the same, they store it with a pretty long cache policy, so you don't download it a billion times whenever you visit YouTube from a bookmark or anything like that.
Press Ctrl+Shift+R or Ctrl+F5 to refresh the page without loading from cache. This will reveal the true error.
This may be an alternate symptom of any of the mistakes you could make. Verify that Apache is running, that SSL is set up properly, that the definition is in hosts file, that the OS isn't caching DNS resolves, and that the browser isn't loading from cache (Ctrl+Shift+R or Ctrl+F5).
To refresh your DNS cache, run the following command:
-
ipconfig /flushdns
(Windows) -
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
(macOS) - Linux instructions are case-specific; look up instructions for your distribution and configuration.
This is caused by an improper SSL configuration. Verify that the browser has the Rehike master certificate installed in your browser as an authority (it should be called "www.youtube.com" and be issued by "Taniko Yamamoto"), and that Apache is configured to use the corresponding SSL certificates.
Sometimes, Firefox can have a level of security that is greater enforced than anything else.
I have no idea what ungodly combination of configuration options there are that could cause Rehike to break on Firefox, but the most notable one is security.cert_pinning.enforcement_level
. If you are having any difficulty at all, set this to 0 in about:config.
I noticed that this is required for Waterfox. I am not sure if it will override the properties of certain autoconfig scripts, so you may need to modify the source code of those in the case that they are present.
Legacy browsers had a feature called HTTP Public Key Pinning (HPKP). This is a technology that is no-longer used, and modern browsers usually do not have it because it was ironically very useful for holding hijacked sites hostage. If you ever visited YouTube before in your browser installation, you may have to do some additional work to get YouTube loaded.
The most likely cause of YouTube not responding at all, as if the website doesn't exist, is Apache not running. Try starting Apache and trying again.
Sometimes it can be our fault. This is certainly the case if Rehike loads in other cases. If this is the case, then an infinite loop has occurred in our code and should be reported to us.
Pass the --no-check-certificates
argument. This is because yt-dlp has its own certificate validation process that ignores the OS-wide one.
You can enable this for every single time you use yt-dlp by adding this parameter into the config file. That is, create a file at the following location:
-
%appdata%\yt-dlp\config.txt
(Windows) -
~/.yt-dlp/config
(Linux, macOS)
and add the following contents to the file:
--no-check-certificates