webapps:nitter
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| webapps:nitter [2021/03/05 20:20] – lucid | webapps:nitter [2021/06/18 16:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| **Ubuntu 20.04** | **Ubuntu 20.04** | ||
| - | This project, while good, required a decent amount of manual work just to get it up and running. There is next to zero documentation and uses some random language that has it's own issues getting installed properly. | + | This project, while good, required a decent amount of manual work just to get it up and running. There is next to zero documentation and uses some random language that has it's own issues getting installed properly. This guide assumes you know how to setup a DNS record. |
| + | =====Install===== | ||
| Update and install nginx, redis (a caching server), and certbot. Redis will automatically start itself and create a service, which is nice. | Update and install nginx, redis (a caching server), and certbot. Redis will automatically start itself and create a service, which is nice. | ||
| sudo apt update;sudo apt upgrade -y | sudo apt update;sudo apt upgrade -y | ||
| Line 10: | Line 11: | ||
| sudo apt install python3-certbot-nginx | sudo apt install python3-certbot-nginx | ||
| sudo apt install libsass-dev # Required to run nimble scss | sudo apt install libsass-dev # Required to run nimble scss | ||
| - | certbot --nginx certonly | + | |
| + | |||
| + | ====Configure Nginx==== | ||
| + | This configuration will obtain an A+ on Qualy' | ||
| - | Configure Nginx | ||
| sudo vim / | sudo vim / | ||
| < | < | ||
| Line 31: | Line 34: | ||
| ssl_ecdh_curve secp384r1; | ssl_ecdh_curve secp384r1; | ||
| ssl_session_tickets off; | ssl_session_tickets off; | ||
| - | ssl_ciphers ' | + | ssl_ciphers ' |
| ssl_prefer_server_ciphers on; | ssl_prefer_server_ciphers on; | ||
| ssl_protocols TLSv1.3 TLSv1.2; | ssl_protocols TLSv1.3 TLSv1.2; | ||
| Line 38: | Line 41: | ||
| ssl_stapling_verify on; | ssl_stapling_verify on; | ||
| - | # Add headers to serve security related headers | ||
| - | # Before enabling Strict-Transport-Security headers please read into this | ||
| - | # topic first. | ||
| add_header Strict-Transport-Security " | add_header Strict-Transport-Security " | ||
| - | # | ||
| - | # WARNING: Only add the preload option once you read about | ||
| - | # the consequences in https:// | ||
| - | # will add the domain to a hardcoded list that is shipped | ||
| - | # in all major browsers and getting removed from this list | ||
| - | # could take several months. | ||
| add_header Referrer-Policy " | add_header Referrer-Policy " | ||
| add_header X-Content-Type-Options " | add_header X-Content-Type-Options " | ||
| Line 55: | Line 49: | ||
| add_header X-Robots-Tag " | add_header X-Robots-Tag " | ||
| add_header X-XSS-Protection "1; mode=block" | add_header X-XSS-Protection "1; mode=block" | ||
| + | add_header Content-Security-Policy " | ||
| location / { | location / { | ||
| Line 62: | Line 57: | ||
| </ | </ | ||
| + | ====Install and Configure nim==== | ||
| Install nim, just wget the latest package from their website. https:// | Install nim, just wget the latest package from their website. https:// | ||
| - | Their install script is improperly written/completely undocumented | + | Their install script is improperly written so you will need to manually copy the executable binary '' |
| wget https:// | wget https:// | ||
| tar xvf nim-1.4.4-linux_x64.tar.xz | tar xvf nim-1.4.4-linux_x64.tar.xz | ||
| Line 70: | Line 66: | ||
| sudo cp bin/nimble /usr/bin/ | sudo cp bin/nimble /usr/bin/ | ||
| - | Add a nitter user | + | Add a user named nitter and login as that user. The following commands are under the nitter user only. |
| sudo useradd -d / | sudo useradd -d / | ||
| sudo su nitter | sudo su nitter | ||
| Line 83: | Line 79: | ||
| Configure nitter | Configure nitter | ||
| - | ''/ | + | ''/ |
| - | Just make sure to fill out the hostname and hmacKey, I gave my key and randomly generated 64 character string, seems to work. | + | Just make sure to fill out the hostname and hmacKey, I gave my key a randomly generated 64 character string, seems to work. |
| - | Make it run on startup | + | |
| - | Systemd Service | + | ====Configure and enable UFW==== |
| + | sudo ufw allow ssh | ||
| + | sudo ufw allow http | ||
| + | sudo ufw allow https | ||
| + | sudo ufw enable | ||
| + | |||
| + | =====Make it run on startup===== | ||
| + | Run this command as your standard log in user, not the nitter user as that should still not have a password. | ||
| + | |||
| + | sudo vim / | ||
| + | |||
| + | **Systemd Service** | ||
| < | < | ||
| [Unit] | [Unit] | ||
| Line 111: | Line 118: | ||
| WantedBy=multi-user.target | WantedBy=multi-user.target | ||
| </ | </ | ||
| + | |||
| + | |||
webapps/nitter.1614975644.txt.gz · Last modified: 2021/06/18 16:36 (external edit)