🐀 Building a federated link aggregator in rust

Overview

GitHub tag (latest SemVer) Build Status GitHub issues Docker Pulls Translation status License GitHub stars Awesome Humane Tech

English | Español | Русский

Lemmy

A link aggregator / Reddit clone for the fediverse.

Join Lemmy · Documentation · Report Bug · Request Feature · Releases · Code of Conduct

About The Project

Desktop Mobile
desktop mobile

Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the Fediverse.

For a link aggregator, this means a user registered on one server can subscribe to forums on any other server, and can have discussions with users registered elsewhere.

The overall goal is to create an easily self-hostable, decentralized alternative to Reddit and other link aggregators, outside of their corporate control and meddling.

Each Lemmy server can set its own moderation policy; appointing site-wide admins, and community moderators to keep out the trolls, and foster a healthy, non-toxic environment where all can feel comfortable contributing.

Note: The WebSocket and HTTP APIs are currently unstable

Why's it called Lemmy?

Built With

Features

  • Open source, AGPL License.
  • Self hostable, easy to deploy.
  • Clean, mobile-friendly interface.
    • Only a minimum of a username and password is required to sign up!
    • User avatar support.
    • Live-updating Comment threads.
    • Full vote scores (+/-) like old Reddit.
    • Themes, including light, dark, and solarized.
    • Emojis with autocomplete support. Start typing :
    • User tagging using @, Community tagging using !.
    • Integrated image uploading in both posts and comments.
    • A post can consist of a title and any combination of self text, a URL, or nothing else.
    • Notifications, on comment replies and when you're tagged.
      • Notifications can be sent via email.
      • Private messaging support.
    • i18n / internationalization support.
    • RSS / Atom feeds for All, Subscribed, Inbox, User, and Community.
  • Cross-posting support.
    • A similar post search when creating new posts. Great for question / answer communities.
  • Moderation abilities.
    • Public Moderation Logs.
    • Can sticky posts to the top of communities.
    • Both site admins, and community moderators, who can appoint other moderators.
    • Can lock, remove, and restore posts and comments.
    • Can ban and unban users from communities and the site.
    • Can transfer site and communities to others.
  • Can fully erase your data, replacing all posts and comments.
  • NSFW post / community support.
  • High performance.
    • Server is written in rust.
    • Front end is ~80kB gzipped.
    • Supports arm64 / Raspberry Pi.

Installation

Lemmy Projects

Apps

Libraries

Support / Donate

Lemmy is free, open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project.

Crypto

  • bitcoin: 1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK
  • ethereum: 0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01
  • monero: 41taVyY6e1xApqKyMVDRVxJ76sPkfZhALLTjRvVKpaAh2pBd4wv9RgYj1tSPrx8wc6iE1uWUfjtQdTmTy2FGMeChGVKPQuV
  • cardano: addr1q858t89l2ym6xmrugjs0af9cslfwvnvsh2xxp6x4dcez7pf5tushkp4wl7zxfhm2djp6gq60dk4cmc7seaza5p3slx0sakjutm

Contributing

Translations

If you want to help with translating, take a look at Weblate. You can also help by translating the documentation.

Contact

Code Mirrors

Credits

Logo made by Andy Cuccaro (@andycuccaro) under the CC-BY-SA 4.0 license.

Comments
  • Create an android app

    Create an android app

    Clients

    • Kotlin : https://github.com/eiknat/lemmy-client

    Apps

    • Typescript: https://github.com/koredefashokun/lemmy-mobile
    • Dart: https://github.com/krawieck/lemmur/
    enhancement help wanted 
    opened by dessalines 50
  • Make the slur filter editable from the site itself

    Make the slur filter editable from the site itself

    It's generally not a good idea to hard code something like the slur filter because the needs of every instance is different. Instances in another language would need their versions, and cases where the slur filter over blocks need to be addressed by the admins.

    A good idea would be to store the slur filter in the database and initialize it with a default when spinning up an instance, but make it editable by admins without changing source files.


    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

    enhancement moderation 
    opened by StaticallyTypedRice 46
  • Can't subscribe to items from Pleroma instance

    Can't subscribe to items from Pleroma instance

    Found a bug? Please fill out the sections below. 👍

    Issue Summary

    It appears we're having issues when trying to subscribe to Lemmy items from Pleroma. I've been testing from mycrowd.ca and getting errors.

    Steps to Reproduce

    On the Pleroma side, search for a user or community and try to follow it. Request will be sent, the UI shows "Request sent!" and doesn't complete.

    I have tried subscribing to items on both lemmy.ca and lemmy.ml with what appear to be the same results.

    Technical details

    On the lemmy.ca side of things, we see, when trying to follow /u/kinetix:

    Dec 09 08:40:58 [mycrowd] request_id=Fr8jtv8pKp1zof4BBtVB [error] Follower/Following counter update for https://lemmy.ca/u/kinetix failed._{:error, "id must be a string"}
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582411Z_[0m _[32m INFO_[0m _[1;32mtracing_actix_web::root_span_builder_[0m_[32m: _[32mnew_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582480Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mnew_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:165_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify digest_[0m _[2;3mwith_[0m , _[1mdigest.required_[0m: true
    Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582580Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mclose, _[1;32mtime.busy_[0m_[32m: 4.95µs, _[1;32mtime.idle_[0m_[32m: 94.7µs_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:165_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify digest_[0m _[2;3mwith_[0m , _[1mdigest.required_[0m: true
    Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582623Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mnew_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:207_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify Payload_[0m _[2;3mwith_[0m , _[1mvec_[0m: [DigestPart { algorithm: "SHA-256", digest: "nxzeYOwZbDClroXZsd0KqYCIOnKAZVj3S82ti9pKvJM=" }]
    Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582873Z_[0m _[34mDEBUG_[0m _[1;34mhttp_signature_normalization_actix::digest::sha2::server_[0m_[34m: _[34mVerifying digest type, SHA-256_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/sha2.rs:86_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.582950Z_[0m _[32m INFO_[0m _[1;32mhttp_signature_normalization_actix::digest::middleware_[0m_[32m: _[32mclose, _[1;32mtime.busy_[0m_[32m: 86.0µs, _[1;32mtime.idle_[0m_[32m: 239µs_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/http-signature-normalization-actix-0.5.0-beta.12/src/digest/middleware.rs:207_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m http_signature_normalization_actix::digest::middleware::_[1mVerify Payload_[0m _[2;3mwith_[0m , _[1mvec_[0m: [DigestPart { algorithm: "SHA-256", digest: "nxzeYOwZbDClroXZsd0KqYCIOnKAZVj3S82ti9pKvJM=" }]
    Dec 09 08:40:58 [lemmy] _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.583000Z_[0m _[32m INFO_[0m _[1;32mlemmy_apub::http::person_[0m_[32m: _[32mReceived person inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://mycrowd.ca/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://mycrowd.ca/users/kinetix","cc":[],"id":"https://mycrowd.ca/activities/dab6a4d3-0db0-41ee-8aab-7bfa4929b4fd","object":"https://lemmy.ca/u/kinetix","state":"pending","to":["https://lemmy.ca/u/kinetix"],"type":"Follow"}_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m crates/apub/src/http/person.rs:57_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.583534Z_[0m _[31mERROR_[0m _[1;31mtracing_actix_web::middleware_[0m_[31m: _[31mError encountered while processing the incoming HTTP request: LemmyError { inner: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind=\"server\" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4", file: "/home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/middleware.rs:258_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4, _[1mexception.message_[0m: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355   0: tracing_actix_web::root_span_builder::HTTP request
    Dec 09 08:40:58 [lemmy] with http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind="server" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] at /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40, _[1mexception.details_[0m: LemmyError { inner: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind=\"server\" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4", file: "/home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }, _[1mhttp.status_code_[0m: 500, _[1motel.status_code_[0m: "ERROR"
    Dec 09 08:40:58 [lemmy] _[2m2021-12-09T16:40:58.583598Z_[0m _[32m INFO_[0m _[1;32mtracing_actix_web::root_span_builder_[0m_[32m: _[32mclose, _[1;32mtime.busy_[0m_[32m: 931µs, _[1;32mtime.idle_[0m_[32m: 259µs_[0m
    Dec 09 08:40:58 [lemmy] _[2;3mat_[0m /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40_[2;3m
    Dec 09 08:40:58 [lemmy] _[0m    _[2;3min_[0m tracing_actix_web::root_span_builder::_[1mHTTP request_[0m _[2;3mwith_[0m , _[1mhttp.method_[0m: POST, _[1mhttp.route_[0m: /u/{user_name}/inbox, _[1mhttp.flavor_[0m: 1.0, _[1mhttp.scheme_[0m: http, _[1mhttp.host_[0m: lemmy.ca, _[1mhttp.client_ip_[0m: 208.87.97.51, _[1mhttp.user_agent_[0m: Pleroma 2.4.1; https://mycrowd.ca <[email protected]>, _[1mhttp.target_[0m: /u/kinetix/inbox, _[1motel.kind_[0m: "server", _[1mrequest_id_[0m: 240a608f-5f9b-491d-9dda-a3907060f1f4, _[1mexception.message_[0m: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355   0: tracing_actix_web::root_span_builder::HTTP request
    Dec 09 08:40:58 [lemmy] with http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind="server" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4
    Dec 09 08:40:58 [lemmy] at /home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs:40, _[1mexception.details_[0m: LemmyError { inner: data did not match any variant of untagged enum PersonInboxActivities at line 1 column 355, context: SpanTrace [{ target: "tracing_actix_web::root_span_builder", name: "HTTP request", fields: "http.method=POST http.route=/u/{user_name}/inbox http.flavor=1.0 http.scheme=http http.host=lemmy.ca http.client_ip=208.87.97.51 http.user_agent=Pleroma 2.4.1; https://mycrowd.ca <[email protected]> http.target=/u/kinetix/inbox otel.kind=\"server\" request_id=240a608f-5f9b-491d-9dda-a3907060f1f4", file: "/home/lemmy/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-actix-web-0.5.0-beta.2/src/root_span_builder.rs", line: 40 }] }, _[1mhttp.status_code_[0m: 500, _[1motel.status_code_[0m: "ERROR"
    
    bug federation 
    opened by realkinetix 29
  • [docs] federation block does not work

    [docs] federation block does not work

    I believe this might be more of an issue on clarifying Lemmy's documentation however the setup for federation does not download any files when running curl -H 'Accept: application/activity+json' <domain>.


    What I have tested:

    {
      # for more info about the config, check out the documentation
      # https://join-lemmy.org/docs/en/administration/configuration.html
    
    {
      hostname: <domain>
      federation: {
        enabled: true
      }
      slur_filter:
        '''
        (fag(g|got|tard)?\b|cock\s?sucker(s|ing)?|ni((g{2,}|q)+|[gq]{2,})[e3r]+(s|z)?|mudslime?s?|kikes?|\bspi(c|k)s?\b|\bchinks?|gooks?|bitch(es|ing|y)?|whor(es?|ing)|\btr(a|@)nn?(y|ies?)|\b(b|re|r)tard(ed)?s?)
        '''
    }
    
      setup: {
        # username for the admin user
        admin_username: "lemmy"
    
    [...]
    
    

    and

    {
      # for more info about the config, check out the documentation
      # https://join-lemmy.org/docs/en/administration/configuration.html
    
      hostname: <domain>
      federation: {
        enabled: true
      }
      slur_filter:
        '''
        (fag(g|got|tard)?\b|cock\s?sucker(s|ing)?|ni((g{2,}|q)+|[gq]{2,})[e3r]+(s|z)?|mudslime?s?|kikes?|\bspi(c|k)s?\b|\bchinks?|gooks?|bitch(es|ing|y)?|whor(es?|ing)|\btr(a|@)nn?(y|ies?)|\b(b|re|r)tard(ed)?s?)
        '''
    
      setup: {
        # username for the admin user
        admin_username: "lemmy"
    
    [...]
    
    

    after each change I ran docker-compose up -d and verified it was correct through the webgui.


    **Edit*t:

    sorry I ran url -H 'Accept: application/activity+json' https://<domain>/c/announcements and not the command listed above

    question 
    opened by ncorder 26
  • Connecting to database doesn't work

    Connecting to database doesn't work

    Issue Summary

    I'm trying to get Lemmy running on my server after reinstalling it with Ansible. Nginx is giving a 502 error message so I can't access my instance.

    The command docker-compose logs is giving the following error messages that are related to the Docker containers lemmy and lemmy-ui. The images seem to restart after a short amount of time because of the errors. The containers for postgres, pictrs and postfix-relay seem to run fine.

    lemmy-ui_1 | Inferno is in development mode. lemmy-ui_1 | Inferno is in development mode. lemmy-ui_1 | Inferno is in development mode. lemmy-ui_1 | httpbase: https://lemmy:8536 lemmy-ui_1 | wsUri: wss://lemmy:8536/api/v3/ws lemmy-ui_1 | isHttps: true lemmy-ui_1 | No JWT cookie found. lemmy-ui_1 | http://0.0.0.0:1234 lemmy-ui_1 | lemmy-ui_1 | /app/node_modules/node-fetch/lib/index.js:1461 lemmy-ui_1 | reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); lemmy-ui_1 | ^ lemmy-ui_1 | FetchError: request to http://lemmy:8536/api/v3/site?auth=AUTHKEY> lemmy-ui_1 | at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1461:11) lemmy-ui_1 | at ClientRequest.emit (node:events:390:28) lemmy-ui_1 | at Socket.socketErrorListener (node:_http_client:447:9) lemmy-ui_1 | at Socket.emit (node:events:390:28) lemmy-ui_1 | at emitErrorNT (node:internal/streams/destroy:157:8) lemmy-ui_1 | at emitErrorCloseNT (node:internal/streams/destroy:122:3) lemmy-ui_1 | at processTicksAndRejections (node:internal/process/task_queues:83:21) { lemmy-ui_1 | type: 'system', lemmy-ui_1 | errno: 'ECONNREFUSED', lemmy-ui_1 | code: 'ECONNREFUSED' lemmy-ui_1 | }

    lemmy-ui_1 | Inferno is in development mode. lemmy-ui_1 | Inferno is in development mode. lemmy-ui_1 | Inferno is in development mode. lemmy-ui_1 | httpbase: https://lemmy:8536 lemmy-ui_1 | wsUri: wss://lemmy:8536/api/v3/ws lemmy-ui_1 | isHttps: true lemmy-ui_1 | No JWT cookie found. lemmy-ui_1 | http://0.0.0.0:1234 lemmy-ui_1 | lemmy-ui_1 | /app/node_modules/node-fetch/lib/index.js:1461 lemmy-ui_1 | reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); lemmy-ui_1 | ^ lemmy-ui_1 | FetchError: request to http://lemmy:8536/api/v3/site? failed, reason: connect ECONNREFUSED 172.19.0.5:8536 lemmy-ui_1 | at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1461:11) lemmy-ui_1 | at ClientRequest.emit (node:events:390:28) lemmy-ui_1 | at Socket.socketErrorListener (node:_http_client:447:9) lemmy-ui_1 | at Socket.emit (node:events:390:28) lemmy-ui_1 | at emitErrorNT (node:internal/streams/destroy:157:8) lemmy-ui_1 | at emitErrorCloseNT (node:internal/streams/destroy:122:3) lemmy-ui_1 | at processTicksAndRejections (node:internal/process/task_queues:83:21) { lemmy-ui_1 | type: 'system', lemmy-ui_1 | errno: 'ECONNREFUSED', lemmy-ui_1 | code: 'ECONNREFUSED' lemmy-ui_1 | }

    lemmy_1 | warning: invalid logging spec 'info"', ignoring it lemmy_1 | thread 'main' panicked at 'Error connecting to postgres://lemmy:DB_PASSWORD@localhost:5432/lemmy', src/main.rs:45:25 lemmy_1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

    Even though I added the new generated database password to config.json from docker-compose.yml, connecting to the database doesn't work. When database connection doesn't work, Inferno seems to crash too.

    Technical details

    • Please post your log: sudo docker-compose logs > lemmy_log.out.
    • What OS are you trying to install lemmy on? Ubuntu 20.04.2 LTS
    • Any browser console errors? None
    bug 
    opened by Rynach 26
  • Picture preview on main page

    Picture preview on main page

    Hi, I've set up an instance of the latest stable (0.9.9 at the moment) lemmy with docker (hosted on Ubuntu 20.04). Everything went smoothly. Basically, everything works save for picture preview on the main page - all I can see is a small icon of picture with label 'expand picture' (see attached picture). screenshot

    In 'Create post' dialog, picture is displayed (preview works there) irrespective of address or picture type. Strange is that for example mp4 files work fine. Once a post is created, files are present in docker 'pictrs' container.

    Logs don't say anything like error, warning or so. What can I do more?

    Here is my docker-compose.yml - pretty much the same as prod-example at lemmy github page.

    version: '2.2'
    
    services:
      postgres:
        image: postgres:12-alpine
        environment:
          - POSTGRES_USER=lemmy
          - POSTGRES_PASSWORD=SecretPassword
          - POSTGRES_DB=lemmy
        volumes:
          - ./volumes/postgres:/var/lib/postgresql/data
        restart: always
    
      lemmy:
        image: dessalines/lemmy:0.9.9
        ports:
          - "127.0.0.1:8536:8536"
        restart: always
        environment:
          - RUST_LOG=error
        volumes:
          - ./lemmy.hjson:/config/config.hjson
        depends_on:
          - postgres
          - pictrs
          - iframely
    
      lemmy-ui:
        image: dessalines/lemmy-ui:0.9.9
        ports:
          - "127.0.0.1:1235:1234"
        restart: always
        environment:
          - LEMMY_INTERNAL_HOST=lemmy:8536
          - LEMMY_EXTERNAL_HOST=localhost:8536
          - LEMMY_HTTPS=false
        depends_on:
          - lemmy
    
      pictrs:
        image: asonix/pictrs:v0.2.6-r1
        ports:
          - "127.0.0.1:8537:8080"
        user: 991:991
        volumes:
          - ./volumes/pictrs:/mnt
        restart: always
    
      iframely:
        image: dogbin/iframely:latest
        ports:
          - "127.0.0.1:8061:80"
        volumes:
          - ./iframely.config.local.js:/iframely/config.local.js:ro
        restart: always
        mem_limit: 200m
    

    and nginx.conf config file

    proxy_cache_path /var/cache/lemmy_frontend levels=1:2 keys_zone=lemmy_frontend_cache:10m max_size=100m                 use_temp_path=off;
    
    server {
        listen 80;
        listen [::]:80;
    
        server_name xxxx.dev;
        location /.well-known/acme-challenge/ {
            root /var/www/certbot;
        }
        location / {
            return 301 https://$host$request_uri;
        }
    }
    
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    
        server_name xxxx.dev;
    
        ssl_certificate /etc/letsencrypt/live/xxxx.dev/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/xxxx.dev/privkey.pem;
    
        # Various TLS hardening settings
        # https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers on;
        ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
        ssl_session_timeout  10m;
        ssl_session_cache shared:SSL:10m;
        ssl_session_tickets off;
        ssl_stapling on;
        ssl_stapling_verify on;
    
        # Hide nginx version
        server_tokens off;
    
        # Enable compression for JS/CSS/HTML bundle, for improved client load times.
        # It might be nice to compress JSON, but leaving that out to protect against potential
        # compression+encryption information leak attacks like BREACH.
        gzip on;
        gzip_types text/css application/javascript image/svg+xml;
        gzip_vary on;
    
        # Various content security headers
        add_header Referrer-Policy "same-origin";
        add_header X-Content-Type-Options "nosniff";
        add_header X-Frame-Options "DENY";
        add_header X-XSS-Protection "1; mode=block";
    
        # Upload limit for pictrs
        client_max_body_size 50M;
    
        location / {
          set $proxpass "http://0.0.0.0:1235";
          if ($http_accept = "application/activity+json") {
            set $proxpass "http://0.0.0.0:8536";
          }
          if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
            set $proxpass "http://0.0.0.0:8536";
          }
          if ($request_method = POST) {
            set $proxpass "http://0.0.0.0:8536";
          }
          proxy_pass $proxpass;
    
          rewrite ^(.+)/+$ $1 permanent;
    
          # Send actual client IP upstream
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header Host $host;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto $scheme;
    
          # Proxy Cache
          proxy_cache             lemmy_frontend_cache;
          proxy_cache_use_stale   error timeout http_500 http_502 http_503 http_504;
          proxy_cache_revalidate  on;
          proxy_cache_lock        on;
          proxy_cache_min_uses    5;
    
          # WebSocket support
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
        }
    
        location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
          proxy_pass http://0.0.0.0:8536;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
    
          # Add IP forwarding headers
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header Host $host;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    
        location ~ /pictshare/(.*)$ {
          return 301 /pictrs/image/$1;
        }
    
        location /iframely/ {
          proxy_pass http://0.0.0.0:8061/;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header Host $host;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
    

    Could this be wrong?

    location ~ /pictshare/(.*)$ {
          return 301 /pictrs/image/$1;
        }
    
    question 
    opened by bruteForceAttack 26
  • Allow resize to be set in config to reduce max image size, pictrs does support this

    Allow resize to be set in config to reduce max image size, pictrs does support this

    Describe the solution you'd like

    The goal is to reduce the image sizes to a reasonable size to avoid gigabytes of image sizes.

    • pictrs supports the resize= argument when uploading images
    • make a default value configurable in lemmy.hjson e.g. to 2048

    from pitcrs API: resize={int}: produce a thumbnail of the image fitting inside an {int} by {int} square using a Lanczos2 filter. This is slower than sampling but looks a bit better in some cases

    (Describe your proposed solution here.)

    Describe alternatives you've considered

    • can't see any

    Additional context

    Maybe related: https://github.com/LemmyNet/lemmy/issues/766

    enhancement good first issue 
    opened by sam365724 25
  • Allow post creation from Friendica

    Allow post creation from Friendica

    Found a bug? Please fill out the sections below. 👍

    For front end issues, use lemmy-ui

    Issue Summary

    Posting a NEW posting from friendica in a lemmy-community fails

    I think, it's similar to the friendica-federation bug a few weeks ago for commenting. The error-message seems the same.

    Steps to Reproduce

    1. Join to a community on lemmy from friendica
    2. Create a new posting

    Technical details

    lemmy_1     | 2022-03-22T10:21:37.202728Z  INFO HTTP request{http.method=POST http.scheme="http" http.host=lemmy.schuerz.at http.target=/inbox otel.kind="server" request_id=492c3682-a6f0-4911-b86c-a93380c31f45}:shared_inbox: lemmy_apub::http: Received shared inbox activity {"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"vcard":"http://www.w3.org/2006/vcard/ns#","dfrn":"http://purl.org/macgirvin/dfrn/1.0/","diaspora":"https://diasporafoundation.org/ns/","litepub":"http://litepub.social/ns#","toot":"http://joinmastodon.org/ns#","schema":"http://schema.org#","manuallyApprovesFollowers":"as:manuallyApprovesFollowers","sensitive":"as:sensitive","Hashtag":"as:Hashtag","directMessage":"litepub:directMessage","discoverable":"toot:discoverable","PropertyValue":"schema:PropertyValue","value":"schema:value"}],"id":"https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827/Create","type":"Create","actor":"https://soc.schuerz.at/profile/jakob","published":"2022-03-22T10:21:36Z","instrument":{"type":"Service","name":"Friendica 'Siberian Iris' 2022.05-dev-1452","url":"https://soc.schuerz.at"},"to":["https://lemmy.schuerz.at/c/test"],"cc":["https://www.w3.org/ns/activitystreams#Public","https://lemmy.schuerz.at/c/test/followers"],"object":{"id":"https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827","type":"Article","summary":"","inReplyTo":null,"diaspora:guid":"4edd2508-2662-39a3-305d-8ca330868827","published":"2022-03-22T10:21:36Z","url":"https://soc.schuerz.at/display/4edd2508-2662-39a3-305d-8ca330868827","attributedTo":"https://soc.schuerz.at/profile/jakob","sensitive":false,"context":"https://soc.schuerz.at/objects/4edd2508-2662-39a3-305d-8ca330868827#context","name":"Test from friendica","content":"<span class=\"h-card\"><a href=\"https://lemmy.schuerz.at/c/test\" class=\"u-url mention\">!<span>test</span></a></span><br><br>Test from friendica","contentMap":{"de":"<bdi>!<a href=\"https://lemmy.schuerz.at/c/test\" class=\"userinfo mention\" title=\"test\">test</a></bdi><br><br>Test from friendica"},"source":{"content":"![url=https://lemmy.schuerz.at/c/test]This is a Testcommunity[/url]\n\nTest from friendica","mediaType":"text/bbcode"},"attachment":[],"tag":[{"type":"Mention","href":"https://lemmy.schuerz.at/c/test","name":"@[email protected]"}],"to":["https://lemmy.schuerz.at/c/test"],"cc":["https://www.w3.org/ns/activitystreams#Public","https://lemmy.schuerz.at/c/test/followers"]},"signature":{"type":"RsaSignature2017","nonce":"b2cffb52849d97fa34217eec0ad18dee67e4725a7864d9cff408026672cb8636","creator":"https://soc.schuerz.at/profile/jakob#main-key","created":"2022-03-22T10:21:37Z","signatureValue":"CJaHnbhQGby60BEwB40+1R3lknAz6LtUTMiEXs+T8DTPHElKr0FkAW3KmfqQlhge5Q2eQb0n55cZUjFs+pR4RyOpvGvZelz2MXCidZUbrKLKuA5qrIP+134f6qZT2YlcLxxpvvesHCtMfzk7bt3sOqWllN2YgS2aCGYiz2oEvseeRVEod4wtrlYCSg/lPZIHLd3CFCglVAuM7OvV8gI0w+JyMsQ9x9z8OdNyPJ0r4FmktW1jbNv4U+9rWMrO3fi3wXTMuenhe2QaO5d0AJGdugXuLP1IE8ln2HEWlGeK6EVlxZvMwuaFPLNKf0vQEtB9RGvjpAa2C+GD6xaevQsG0P0Ui3Evdzvp4OHzuJ/y3Z/Wl64Y5wfYgsRu4AqcmRgtWLzP30G0DjZl+1lfxcUNARX265HtlD+CLFvJk3tu3YJJ4OaAdDQ8BV2HQuaXhf+VcV/HsjM7c32eTGlEbgfO+PNNdr4JF1GLIl518UnJNv8GearKJWhNLfCDmB5SBbq8TNm41Glc6dgIfBdCo94XrGdh8nM+n0H/qU9oMF+ru/lsO8NlzPzct3LbqUKxANhLaGaDKu7346D14/ipROH7VEckL6bOE8fFNQOIhDaDN8uik7zHrIkeo71qmGjCqujC9MpizyEtnHCsvtxTNUsqZylSGzdoRH8X7MaSWOyp+t8="}}
    lemmy_1     | 2022-03-22T10:21:37.204832Z  WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: data did not match any variant of untagged enum SharedInboxActivities at line 1 column 3117
    lemmy_1     |    0: lemmy_apub::http::shared_inbox
    lemmy_1     |              at crates/apub/src/http/mod.rs:41
    lemmy_1     |    1: lemmy_server::root_span_builder::HTTP request
    lemmy_1     |            with http.method=POST http.scheme="http" http.host=lemmy.schuerz.at http.target=/inbox otel.kind="server" request_id=492c3682-a6f0-4911-b86c-a93380c31f45 http.status_code=400 otel.status_code="OK"
    lemmy_1     |              at src/root_span_builder.rs:16
    lemmy_1     |    2: tokio::task::runtime.spawn
    lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
    lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
    lemmy_1     |    3: tokio::task::runtime.spawn
    lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
    lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
    lemmy_1     |    4: tokio::task::runtime.spawn
    lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
    lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
    lemmy_1     |    5: tokio::task::runtime.spawn
    lemmy_1     |            with kind=local task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22
    lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
    lemmy_1     |    6: tokio::task::runtime.spawn
    lemmy_1     |            with kind=block_on task.name= loc.file="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/task/local.rs" loc.line=466 loc.col=12
    lemmy_1     |              at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/util/trace.rs:16
    lemmy_1     | LemmyError { message: None, inner: data did not match any variant of untagged enum SharedInboxActivities at line 1 column 3117, context: "SpanTrace" }
    
    enhancement federation 
    opened by xundeenergie 25
  • Featured posts

    Featured posts

    Not a problem so ignoring the template. This will require changes to both the frontend and the backend.

    Description

    Featured posts are threads that are pinned site-wide above the rest of the feed.

    This allows instance admins to highlight particular threads they deem important and worthy of extra visbility. On Hexbear, one slot is usually taken up by a megathread, and the other can be anything from a significant event (i.e., a memorial, the death of a ghoul, etc), to social clubs organised by members of the community.

    It's unclear to me how/if this would federate.

    Example

    The following is how the feature is implemented in Hexbear. Of course the UI can be different if required (e.g., it could be off on the side rather than in the centre above the main feed).


    The featured posts tab expanded, rest of the main feed below it:

    An example of two featured posts on Hexbear

    The featured posts tab collapsed, rest of the main feed below it:

    An example of the featured posts tab minimised on Hexbear

    enhancement hexbear 
    opened by not-layla 25
  • Unable to login on Firefox for iOS

    Unable to login on Firefox for iOS

    Issue Summary

    After pressing "Login", it loads forever but doesn't log in. I've tried turning off tracking protection etc. but it doesn't help. Works with iOS Safari though.

    Steps to Reproduce

    1. I clicked login, and an endless spinner shows up.

    Technical details

    iOS 13.5

    Firefox version 27.0

    bug 
    opened by sseneca 24
  • background_jobs crashes makes other instances not receive federation updates

    background_jobs crashes makes other instances not receive federation updates

    This seems to happen on lemmy intemittently, sometimes after a week or so of running fine. background_jobs will stop showing up in the logs.

    cc @asonix @Nutomic

    This issue happened again, twice in one day. A restart seemed to fix it again.

    edit: I'm tailing the log right now:

    sudo docker-compose logs -f --tail=1000 lemmy | grep activity_queue
    lemmy_1     | [2021-10-06T23:13:25Z INFO  lemmy_apub::activity_queue] Sending activity https://lemmy.ml/activities/dislike/d1dbd77f-8e84-4367-ac94-92c3057f6681
    lemmy_1     | [2021-10-06T23:13:29Z INFO  lemmy_apub::activity_queue] Sending activity https://lemmy.ml/activities/undo/8f646974-c257-4f01-aac7-24c3fdb765f2
    lemmy_1     | [2021-10-06T23:14:52Z INFO  lemmy_apub::activity_queue] Sending activity https://lemmy.ml/activities/dislike/b6e8b8af-a6e0-484b-aac3-4496b8fe02bb
    lemmy_1     | [2021-10-06T23:15:13Z INFO  lemmy_apub::activity_queue] Sending activity https://lemmy.ml/activities/undo/2846bd5c-a041-4b23-92a6-e7dcc93416be
    
    bug 
    opened by dessalines 22
  • Unsubscribe from own posts

    Unsubscribe from own posts

    Is your proposal related to a problem?

    If a post blows up and gets like 50+ replies, I don't have time to read all 50 replies that fill up my inbox. But i have another active posts that gets like 2 replies. If i mark all as read in my inbox, i miss the 2 replies to my small post.

    Describe the solution you'd like

    A good solution would be unsubscribing to individual posts. Currently, afaik, for OP to subscribe to their own posts, they have to delete their own post. But some people might want to read all 50 replies.

    Describe alternatives you've considered

    Using reddit since it has an unsubscribe button

    Additional context

    enhancement 
    opened by PrincessMiki 0
  • config

    config "database: pool_size: 2" causes "LemmyError { message: None, inner: timed out waiting for connection, context: "SpanTrace" }"

    Issue Summary

    When setting in config/config.hjson:

      database: {
        pool_size: 2
      }
    

    running cargo run failed with the errors below:

    2023-01-04T05:59:59.727481Z  INFO blocking operation: lemmy_server::code_migrations: Running regenerate_public_keys_(...)
    2023-01-04T05:59:59.735090Z  INFO lemmy_server::scheduled_tasks: Updating active site and community aggregates ...
    Starting http server at 127.0.0.1:8536
    2023-01-04T05:59:59.792476Z  INFO lemmy_server::scheduled_tasks: Done.
    2023-01-04T05:59:59.792544Z  INFO lemmy_server::scheduled_tasks: Updating banned column if it expires ...
    2023-01-04T05:59:59.794944Z  INFO lemmy_server::scheduled_tasks: Reindexing table concurrently post_aggregates ...
    2023-01-04T05:59:59.885395Z  INFO lemmy_server::scheduled_tasks: Done.
    2023-01-04T05:59:59.885455Z  INFO lemmy_server::scheduled_tasks: Reindexing table concurrently comment_aggregates ...
    2023-01-04T05:59:59.909051Z  INFO lemmy_server::scheduled_tasks: Done.
    2023-01-04T05:59:59.909102Z  INFO lemmy_server::scheduled_tasks: Reindexing table concurrently community_aggregates ...
    2023-01-04T05:59:59.932895Z  INFO lemmy_server::scheduled_tasks: Done.
    2023-01-04T06:00:29.793209Z  WARN background_jobs_actix::server: Not restarting ticker, arbiter is dead
    2023-01-04T06:00:29.793376Z  INFO Worker{worker.id=(...) worker.queue=default worker.operation.id=(...) worker.operation.name=closing}: background_jobs_actix::worker: Worker closing
    2023-01-04T06:00:29.793430Z  WARN background_jobs_actix::worker: Not restarting worker, Arbiter is dead
    2023-01-04T06:00:29.793473Z  INFO Worker{worker.id=(...) worker.queue=default worker.operation.id=(...) worker.operation.name=closing}: background_jobs_actix::worker: Worker closing
    (...)
    2023-01-04T06:00:29.796137Z  INFO Worker{worker.id=(...) worker.queue=default worker.operation.id=(...) worker.operation.name=closing}: background_jobs_actix::worker: Worker closing
    2023-01-04T06:00:29.796152Z  WARN background_jobs_actix::worker: Not restarting worker, Arbiter is dead
    Error: LemmyError { message: None, inner: timed out waiting for connection, context: "SpanTrace" }
    

    Environment

    • OS: OpenBSD 7.2 (latest)
    • Rust: 1.63.0
    • Lemmy: 0.16.7

    Steps to Reproduce

    1. Edit config to set "2" at database.pool_size.
    2. cargo run

    Technical details

    • When "3" was set instead of "2", it was fixed.
    bug 
    opened by nabbisen 5
  • Logging broken when using opentelemetry setting

    Logging broken when using opentelemetry setting

    I'm developing locally, and when I have the open-telemetry setting in the lemmy.hjson (as is the default for our docker dev setup), for some reason, only the server startup lines get written to the console log, and everything else gets ignored.

    Removing the opentelemetry_url line from the config fixes the issue, and everything correctly gets written to the console.

    https://github.com/LemmyNet/lemmy/blob/main/src/lib.rs#L184

    asonix, I'm not familiar with otel, or how it works, maybe this is intended, I just don't know how to use it.

    cc @asonix

    bug 
    opened by dessalines 1
  • Activity table not being indexed

    Activity table not being indexed

    Found a bug? Please fill out the sections below. 👍

    Issue Summary

    A summary of the bug. SELECT statements are taking a long time (> 5000ms) to complete at times. Appears that Activity table isn't being indexed.

    Technical details

    Logs: postgres_1 | 2022-12-16 17:27:52.887 UTC [11973] LOG: duration: 5010.355 ms execute __diesel_stmt_31: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:27:52.887 UTC [11973] DETAIL: parameters: $1 = 'https://midwest.social/activities/create/c922b6e1-1e00-4d85-8a8f-374bdfcf76c9', $2 = '1' postgres_1 | 2022-12-16 17:29:00.533 UTC [11973] LOG: duration: 5360.124 ms execute __diesel_stmt_31: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:29:00.533 UTC [11973] DETAIL: parameters: $1 = 'https://midwest.social/activities/create/c922b6e1-1e00-4d85-8a8f-374bdfcf76c9', $2 = '1' postgres_1 | 2022-12-16 17:29:26.750 UTC [13649] LOG: duration: 5268.068 ms execute __diesel_stmt_17: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:29:26.750 UTC [13649] DETAIL: parameters: $1 = 'https://midwest.social/activities/create/c922b6e1-1e00-4d85-8a8f-374bdfcf76c9', $2 = '1' postgres_1 | 2022-12-16 17:29:26.911 UTC [11973] LOG: duration: 5080.917 ms execute __diesel_stmt_31: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:29:26.911 UTC [11973] DETAIL: parameters: $1 = 'https://midwest.social/activities/create/c922b6e1-1e00-4d85-8a8f-374bdfcf76c9', $2 = '1' postgres_1 | 2022-12-16 17:30:06.950 UTC [11973] LOG: duration: 5306.031 ms execute __diesel_stmt_31: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:30:06.950 UTC [11973] DETAIL: parameters: $1 = 'https://midwest.social/activities/like/e169df97-63a0-4eee-ab8c-045b70c6195d', $2 = '1' postgres_1 | 2022-12-16 17:30:08.674 UTC [13649] LOG: duration: 5065.262 ms execute __diesel_stmt_17: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:30:08.674 UTC [13649] DETAIL: parameters: $1 = 'https://midwest.social/activities/like/e169df97-63a0-4eee-ab8c-045b70c6195d', $2 = '1' postgres_1 | 2022-12-16 17:30:41.894 UTC [13649] LOG: duration: 5249.674 ms execute __diesel_stmt_17: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:30:41.894 UTC [13649] DETAIL: parameters: $1 = 'https://midwest.social/activities/like/e169df97-63a0-4eee-ab8c-045b70c6195d', $2 = '1' postgres_1 | 2022-12-16 17:30:44.768 UTC [11973] LOG: duration: 5025.025 ms execute __diesel_stmt_31: SELECT "activity"."id", "activity"."data", "activity"."local", "activity"."published", "activity"."updated", "activity"."ap_id", "activity"."sensitive" FROM "activity" WHERE "activity"."ap_id" = $1 LIMIT $2 postgres_1 | 2022-12-16 17:30:44.768 UTC [11973] DETAIL: parameters: $1 = 'https://midwest.social/activities/like/e169df97-63a0-4eee-ab8c-045b70c6195d', $2 = '1'

    bug 
    opened by HorseJump 6
  • Add feature to embed pictrs in lemmy binary (fixes #2627)

    Add feature to embed pictrs in lemmy binary (fixes #2627)

    To try this, start lemmy with cargo run --features embed-pictrs and then start lemmy-ui. For now image uploads are failing with thread 'actix-rt|system:0|arbiter:0' panicked at 'No auth header for picture upload', crates/routes/src/images.rs:97:6, but that seems like a problem with lemmy-ui (using latest main branch).

    opened by Nutomic 2
  • Set up unified push messaging using the ntfy docker.

    Set up unified push messaging using the ntfy docker.

    This would be trivial to do, since we already send live messages over websockets.

    Then mobile clients like Jerboa could subscribe to them.

    https://docs.ntfy.sh/install/

    https://f-droid.org/2022/12/18/unifiedpush.html

    enhancement 
    opened by dessalines 2
Releases(0.16.7)
Owner
LemmyNet
Lemmy and related projects
LemmyNet
Federated blogging application, thanks to ActivityPub (now on https://git.joinplu.me/ — this is just a mirror)

Plume Website — Documentation — Contribute — Instances list Plume is a federated blogging engine, based on ActivityPub. It is written in Rust, with th

Plume 1.9k Jan 8, 2023
Federated Mint Prototype

MiniMint is tested and developed using rust stable, you can get it through your package manager or from rustup.rs.

FediMint 293 Jan 5, 2023
A boiler plate code to create dynamic link library in rust.

?? rust-dll-bp This is a boiler plate code that will be generated as a dll binary. I personally cache this here for me but if you're intend to create

s3pt3mb3r 9 Nov 7, 2022
Very simple Rust binary that can turn on/off a TP-Link L920 led light strip in your local network

TP-Link L920 on/off script This is a (very) simple Rust binary that can turn on/off a TP-Link L920 led light strip in your local network. Installation

Luciano Mammino 3 Aug 21, 2023
osu-link is a program which links osu!stable beatmaps to osu!lazer's new store format, saving you disk space.

osu-link is a program which links osu!stable beatmaps to osu!lazer's new store format, saving you disk space.

LavaDesu 2 Nov 8, 2021
The missing link to modern server controlling for TrackMania Forever.

xrd (XASeCo Replacing Daemon) xrd is a next-gen server controller for TrackMania Forever and Nations ESWC that is designed to be hassle-free and easil

Autumn Leaf 6 Mar 26, 2022
A Rust framework for building context-sensitive type conversion.

Xylem is a stateful type conversion framework for Rust.

Jonathan Chan Kwan Yin 4 May 11, 2022
Cassette A simple, single-future, non-blocking executor intended for building state machines.

Cassette A simple, single-future, non-blocking executor intended for building state machines. Designed to be no-std and embedded friendly. This execut

James Munns 50 Jan 2, 2023
Nimbus is a framework for building parachain consensus systems on cumulus-based parachains.

Cumulo -- Nimbus ⛈️ Nimbus is a framework for building parachain consensus systems on cumulus-based parachains. Given the regular six-second pulse-lik

null 36 Dec 14, 2022
An aimless attempt at building a PC from scratch, in a vaguely eurorack/modular synth style.

An aimless attempt at building a PC from scratch, in a vaguely eurorack/modular synth style.

James Munns 66 Nov 30, 2022
Building a better screen reader for the Linux desktop, one step at a time.

Building a better screen reader for the Linux desktop, one step at a time.

Odilia 44 Dec 31, 2022
First Git on Rust is reimplementation with rust in order to learn about rust, c and git.

First Git on Rust First Git on Rust is reimplementation with rust in order to learn about rust, c and git. Reference project This project refer to the

Nobkz 1 Jan 28, 2022
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
Learn-rust - An in-depth resource to learn Rust 🦀

Learning Rust ?? Hello friend! ?? Welcome to my "Learning Rust" repo, a home for my notes as I'm learning Rust. I'm structuring everything into lesson

Lazar Nikolov 7 Jan 28, 2022
A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

Rust-Lightning is a Bitcoin Lightning library written in Rust. The main crate, lightning, does not handle networking, persistence, or any other I/O. Thus, it is runtime-agnostic, but users must implement basic networking logic, chain interactions, and disk storage. More information is available in the About section.

Lightning Dev Kit 850 Jan 3, 2023
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

TheAwiteb 8 Dec 6, 2022
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

Conrad Ludgate 12 Dec 22, 2022
Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

Playing with web dev in Rust. This is a sample Rust microservice that can be deployed on Kubernetes.

André Gomes 10 Nov 17, 2022
Applied offensive security with Rust

Black Hat Rust - Early Access Deep dive into offensive security with the Rust programming language Buy the book now! Summary Whether in movies or main

Sylvain Kerkour 2.2k Jan 2, 2023