diff --git a/INSTALLATION.md b/INSTALLATION.md index 582401b..11f624a 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -4,19 +4,16 @@ You will need a Twitter API key to make BirdsiteLIVE working. First create an **Standalone App** in the [Twitter developer portal](https://developer.twitter.com/en/portal/projects-and-apps) and retrieve the API Key and API Secret Key. -Please make sure you are using a **Standalone App** API Key and not a **Project App** API Key (that will NOT work with BirdsiteLIVE), if you don't see the **Standalone App** section, you might need to [apply for Elevated Access](https://developer.twitter.com/en/portal/products/elevated) as described in the [API documentation](https://developer.twitter.com/en/support/twitter-api/developer-account). - - ## Server prerequisites Your instance will need [docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) installed and working. ## Setup -Download the [docker-compose file](https://git.gamers.exposed/pasture/BirdsiteLIVE/raw/branch/master/docker-compose.yml): +Download the [docker-compose file](https://git.froth.zone/sam/BirdsiteLIVE/raw/branch/master/docker-compose.yml): ``` -sudo curl -L https://git.gamers.exposed/pasture/BirdsiteLIVE/raw/branch/master/docker-compose.yml -o docker-compose.yml +sudo curl -L https://git.froth.zone/sam/BirdsiteLIVE/raw/branch/master/docker-compose.yml -o docker-compose.yml ``` Then edit file: @@ -29,7 +26,7 @@ sudo nano docker-compose.yml #### Personal info -* `Instance:Domain` the domain name you'll be using, for example use `birdsite.live` for the URL `https://birdsite.live` +* `Instance:Domain` the domain name you'll be using, for example use `birdsite.example.com` for the URL `https://birdsite.example.com` * `Instance:AdminEmail` the admin's email, will be displayed in the instance /.well-known/nodeinfo endpoint * `Twitter:ConsumerKey` the Twitter API key * `Twitter:ConsumerSecret` the Twitter API secret key @@ -58,35 +55,14 @@ docker-compose up -d By default the app will be available on the port 5000 -## Nginx +## Nginx configuration -On a Debian based distrib: - -``` -sudo apt update -sudo apt install nginx -``` - -Check nginx status: - -``` -sudo systemctl status nginx -``` - -### Create nginx configuration - -Create your nginx configuration - -``` -sudo nano /etc/nginx/sites-enabled/{your-domain-name.com} -``` - -And fill your service block as follow: +Fill your service block as follow: ``` server { listen 80; - server_name {your-domain-name.com}; + server_name birdsite.example.com; location / { proxy_pass http://localhost:5000; proxy_http_version 1.1; @@ -114,16 +90,31 @@ After having a domain name pointing to your instance, install and setup certbot: ``` sudo apt install certbot python3-certbot-nginx -sudo certbot --nginx -d {your-domain-name.com} +sudo certbot --nginx -d birdsite.example.com ``` Make sure you're redirecting all traffic to https when asked. -Finally check that the auto-renewal will work as espected: +Finally check that the auto-renewal will work as expected: ``` sudo certbot renew --dry-run ``` +## Caddy + + +Or, you can use [caddy](https://caddyserver.com) + +```caddyfile +birdsite.example.com { + encode gzip + header ?Cache-Control "max-age=3600" + reverse_proxy http://localhost:5000 { + header_down -Server + } +} +``` +Everything ### Set the firewall diff --git a/README.md b/README.md index d450653..3a55c6f 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,15 @@ -This project is a *fork* of [the original BirdsiteLIVE from NicolasConstant](https://github.com/NicolasConstant/BirdsiteLive). This fork runs in production on [a large BirdsiteLIVE instance](https://twtr.plus). Changes made in this fork include: +# BirdsiteLIVE: Twitter -> ActivityPub -* Rework About page entirely - also disclose unlisted accounts and federation restrictions -* Cache Tweets so that, for example, Announces do not hit rate limits -* Allow replacing and redirecting to twitter.com in Tweets to other domains (i.e. Nitter instances) -* Verified checkmarks on [verified](https://twitter.com/verified) Twitter users -* Proper remote follow form on user pages -* Mark individual Tweets as potentially sensitive -* Define and enforce a maximum follow count limit -* Define and enforce a maximum Tweet fetch age using snowflakes -* (Optional) send quote-RTs as Soapbox-style quote posts +[![Build Status](https://ci.git.froth.zone/api/badges/sam/BirdsiteLIVE/status.svg)](https://ci.git.froth.zone/sam/BirdsiteLIVE) -This fork is also available as a Docker image as `pasture/birdsitelive`. +This project is a _fork_ of [Pasture's fork](https://git.gamers.exposed/pasture/BirdsiteLIVE) of [the original BirdsiteLIVE from NicolasConstant](https://github.com/NicolasConstant/BirdsiteLive). This fork runs in production on [bird.froth.zone](https://bird.froth.zone). Changes made in this fork include: -The project's original README is as follows: +- Rebasing the forks together. +- (this space intentionally left blank) -![Test](https://github.com/NicolasConstant/BirdsiteLive/workflows/.NET%20Core/badge.svg?branch=master&event=push) +This fork is also available as a Docker image as `git.froth.zone/sam/birdsitelive`. -# BirdsiteLIVE +The project's original README is below: ## About @@ -24,24 +17,22 @@ BirdsiteLIVE is an ActivityPub bridge from Twitter, it's mostly a pet project/pl ## State of development -The code is pretty messy and far from a good state, since it's a playground for me the aim was to understand some AP concepts, not to provide a good state-of-the-art codebase. But I might refactor it to make it cleaner. +The code is pretty messy and far from a good state, since it's a playground for me the aim was to understand some AP concepts, not to provide a good state-of-the-art codebase. But I might refactor it to make it cleaner. -## Official instance +## Official instance There's none! Please read [here why I've stopped it](https://write.as/nicolas-constant/closing-the-official-bsl-instance). ## Installation -I'm providing a [docker build](https://hub.docker.com/r/nicolasconstant/birdsitelive) (linux/amd64 only). To install it on your own server, please follow [those instructions](https://github.com/NicolasConstant/BirdsiteLive/blob/master/INSTALLATION.md). More [options](https://github.com/NicolasConstant/BirdsiteLive/blob/master/VARIABLES.md) are also available. +I'm providing a [docker build](https://git.froth.zone/sam/-/packages/container/birdsitelive/latest). To install it on your own server, please follow [those instructions](./INSTALLATION.md). More [options](./VARIABLES.md) are also available. -Also a [CLI](https://github.com/NicolasConstant/BirdsiteLive/blob/master/BSLManager.md) is available for adminitrative tasks. +Also a (likely broken) [CLI](./BSLManager.md) is available for administrative tasks. ## License -This project is licensed under the AGPLv3 License - see [LICENSE](https://github.com/NicolasConstant/BirdsiteLive/blob/master/LICENSE) for details. +This project is licensed under the AGPLv3 License - see [LICENSE](./LICENSE) for details. ## Contact You can contact me via ActivityPub here. - - diff --git a/src/BirdsiteLive/Program.cs b/src/BirdsiteLive/Program.cs index 04c704f..736f0c6 100644 --- a/src/BirdsiteLive/Program.cs +++ b/src/BirdsiteLive/Program.cs @@ -14,7 +14,7 @@ namespace BirdsiteLive { public class Program { - public static string VERSION = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString(3) + "+pasture"; + public static string VERSION = System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString(3) + "+fishe"; public static void Main(string[] args) { diff --git a/src/BirdsiteLive/Views/About/Index.cshtml b/src/BirdsiteLive/Views/About/Index.cshtml index 1390b05..f771010 100644 --- a/src/BirdsiteLive/Views/About/Index.cshtml +++ b/src/BirdsiteLive/Views/About/Index.cshtml @@ -56,7 +56,7 @@ As this instance's saturation level approaches and exceeds 100%, it will no longer update accounts every 15 minutes and reduce how often it fetches Tweets to stay under Twitter's limits. Essentially, the more saturated a node is, the less efficient it will be.

- When possible, you should start your own BirdsiteLIVE instance. If you cannot, please be courteous and follow a limited number of accounts to keep the service available for everyone. + When possible, you should start your own BirdsiteLIVE instance. If you cannot, please be courteous and follow a limited number of accounts to keep the service available for everyone.

@if (Model.Settings.DiscloseInstanceRestrictions && (Model.ModerationStatus.Followers != BirdsiteLive.Domain.Repository.ModerationTypeEnum.None || Model.ModerationStatus.TwitterAccounts != BirdsiteLive.Domain.Repository.ModerationTypeEnum.None)) diff --git a/src/BirdsiteLive/Views/Shared/_Layout.cshtml b/src/BirdsiteLive/Views/Shared/_Layout.cshtml index bfcdc77..b2513cb 100644 --- a/src/BirdsiteLive/Views/Shared/_Layout.cshtml +++ b/src/BirdsiteLive/Views/Shared/_Layout.cshtml @@ -47,7 +47,7 @@
- Source code (AGPLv3) @*Privacy*@ + Source code (AGPLv3) @*Privacy*@ BirdsiteLIVE @Program.VERSION