Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)MC
Posts
14
Comments
22
Joined
2 yr. ago
  • This is the nginx.conf file for my external proxy:

     undefined
        
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
    
        server_name ;
    
        include /config/nginx/ssl.conf;
    
        location / {
            include /config/nginx/proxy.conf;
            include /config/nginx/resolver.conf;
    #        set $upstream_app lemmy;
            set $upstream_app proxy;
            set $upstream_port 8536;
            set $upstream_proto http;
            proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    #        proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Real-IP $remote_addr;
    #        proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 50M;            
        }
    }
    
    access_log /var/log/nginx/access.log combined;
    
    You’ll need to change  to the appropriate value. I’m forwarding requests to the proxy container referenced by the compose file
     
      
  • My nginx.conf for lemmy-nginx is below, sorry if it’s a bit messy. I prefer to comment than remove working config. You’ll have to change

     undefined
        
    worker_processes 1;
    events {
        worker_connections 1024;
    }
    http {
    #Beginning of kbin fix
    # We construct a string consistent of the "request method" and "http accept header"
        # and then apply soem ~simply regexp matches to that combination to decide on the
        # HTTP upstream we should proxy the request to.
        #
        # Example strings:
        #
        #   "GET:application/activity+json"
        #   "GET:text/html"
        #   "POST:application/activity+json"
        #
        # You can see some basic match tests in this regex101 matching this configuration
        # https://regex101.com/r/vwMJNc/1
        #
        # Learn more about nginx maps here http://nginx.org/en/docs/http/ngx_http_map_module.html
        map "$request_method:$http_accept" $proxpass {
            # If no explicit matches exists below, send traffic to lemmy-ui
            default "http://lemmy-ui";
    
            # GET/HEAD requests that accepts ActivityPub or Linked Data JSON should go to lemmy.
            #
            # These requests are used by Mastodon and other fediverse instances to look up profile information,
            # discover site information and so on.
            "~^(?:GET|HEAD):.*?application\/(?:activity|ld)\+json" "http://lemmy";
    
            # All non-GET/HEAD requests should go to lemmy
            #
            # Rather than calling out POST, PUT, DELETE, PATCH, CONNECT and all the verbs manually
            # we simply negate the GET|HEAD pattern from above and accept all possibly $http_accept values
            "~^(?!(GET|HEAD)).*:" "http://lemmy";
        }
    ### end of kbin fix
        upstream lemmy {
            # this needs to map to the lemmy (server) docker service hostname
            server "lemmy:8536";
        }
        upstream lemmy-ui {
            # this needs to map to the lemmy-ui docker service hostname
            server "lemmy-ui:1234";
        }
    
        server {
            # this is the port inside docker, not the public one yet
            listen 1236;
            listen 8536;
            # change if needed, this is facing the public web
            #server_name localhost;
        server_name ;
            server_tokens off;
    
            gzip on;
            gzip_types text/css application/javascript image/svg+xml;
            gzip_vary on;
    
            # Upload limit, relevant for pictrs
            client_max_body_size 100M;
    
            add_header X-Frame-Options SAMEORIGIN;
            add_header X-Content-Type-Options nosniff;
            add_header X-XSS-Protection "1; mode=block";
    
            # frontend general requests
            location / {
                # distinguish between ui requests and backend
                # don't change lemmy-ui or lemmy here, they refer to the upstream definitions on top
    #            set $proxpass "http://lemmy-ui";
    
    #            if ($http_accept = "application/activity+json") {
    #              set $proxpass "http://lemmy";
    #            }
    #            if ($http_accept = "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") {
    #              set $proxpass "http://lemmy";
    #            }
    #            if ($request_method = POST) {
    #              set $proxpass "http://lemmy";
    #            }
                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;
            }
    
            # backend
            location ~ ^/(api|pictrs|feeds|nodeinfo|.well-known) {
                proxy_pass "http://lemmy";
                # proxy common stuff
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
    
                # 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;
            }
        }
    }
    #error_log /var/log/nginx/error.log debug;
    
      
  • Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    cross-posted from: https://lemmy.ninja/post/83545

    I found this blog post useful for explaining how to interact with Lemmy via Mastodon.

    Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    YSK there are options for backing up / migrating your Lemmy subscriptions, blocks, etc.

    cross-posted from: https://lemmy.world/post/1298317

    (Full disclosure: I made one of the tools)

    cross-posted from: https://lemmy.ca/post/1292268

    lemmy.world cross-post link: https://lemmy.world/post/1251192

    With the vlemmy situation ongoing, i feel like it would be useful to put this here (i did not make either of these tools)

    Lemmy Account Settings Instance Migrator (LASIM) copies all your subscribed communities and blocks and lets you upload them to another account, in just a few clicks

    lemmy-migrate does the same thing but without a GUI and support for uploading your backup to multiple accounts at once

    Small Form Factor PCs @sh.itjust.works
    mcmxci @mimiclem.me

    Experience with SFFtime?

    cross-posted from: https://mimiclem.me/post/76799

    I'm looking to rebuild an old midtower into a smaller enclosure. Does anyone have any experience or thoughts regarding sfftime p-atx or n-atx?

    memes @mimiclem.me
    mcmxci @mimiclem.me

    Reposting something I saw on r/linuxmasterrace a while ago. Which one are you? I'm somewhere between the Tech Conservative and Newborn Paranoid.

    networking @sh.itjust.works
    mcmxci @mimiclem.me

    Firewall Alignment Chart

    Sorry if memes aren't appropriate

    Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    The best Lemmy app so far is "Wefwef" hands down. If you loved Apollo you'd love this.

    cross-posted from: https://lemmy.world/post/785131

    The app has an amazing experience so far, because it feels like I'm just using Apollo, heaps of baked in features that no other app has so far. It's a web app so installation is pretty forward. Much love to the Devs!

    (Side note: please change the name to something better. I recommend the name Voyager to keep up with the theme)

    Installation:

    https://wefwef.app/settings/install

    WefWef's community page: c/wefwef

    https://lemmy.world/c/wefwef

    Courtesy of [email protected] for telling us about it.

    Update:

    Having issues? It's to do with rate limitations, this should be resolved soon but right now you can Use:

    https://w.opnxng.com/settings/install

    Here's the Dev's notes on that:

    w.opnxng.com - wefwef hosted by Opnxng in Singapore.

    Contact/privacy

    Note: Community deployments are NOT maintained by the wefwef team. They may not be synced with wefwef's source

    Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    Introducing awesome-lemmy: a community driven list of useful apps & tools for Lemmy!

    Cool stuff to try! cross-posted from: https://lemmy.ml/post/1560729

    I just created awesome-lemmy based on the well-known awesome lists.

    There is already a awesome-lemmy-instances which is specialized in Lemmy instances but no general list that's why I created one.

    It's forked from awesome-scala which has a very neat python script to easily add new projects so it should be quite easy to contribute, feel free to add tools, apps and websites linked to lemmy!

    Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    Another .18 issue

    cross-posted from: https://lemmy.ml/post/1505193

    Every now and then I check on the communities, to see if a new one is created that might be of my interest.

    Currently it's impossible for me to subscribe to anyone, once you get into the community, the button doesn't show up, just the legend saying subscribe, but it's useless.

    I'm logged in, and it seems I can post...

    Edit: It seems I can subscribe from the list of communities, out of the communities themselves... It's from withing that I can't subscribe.

    Edit 2: A bug was filed already, 0.18 seems to have broken the "Subscribe" button. And a workaround of clicking on any conversation on the community makes the button show up again, within the conversation.

    Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    No outbound federation to non-Lemmy instances since 0.18.0

    Fun times! Potentially explains any kbin federation issues.

    cross-posted from: https://sh.itjust.works/post/459318

    Apparently, since the 0.18.0 upgrade, Lemmy doesn't have any outbound federation with non-Lemmy instances anymore.

    Searching for communities, subscribing to communities and reading posts from communities on Lemmy 0.18.0 instances from at least Mastodon 4.1.0 and Hubzilla 8.4.2 no longer works. Doing the same with communities on the same instances running Lemmy 0.17.x from the same Mastodon or Hubzilla instances running the same versions still used to work.

    Affected Lemmy instances include sh.itjust.works and lemmy.ca.

    See also my bug report.

    Meta - Talk about Mimic! @mimiclem.me
    mcmxci @mimiclem.me

    Welcome to Mimic!

    What is Lemmy? Lemmy is link aggregator software that exists in the fediverse, meaning it connects with other “ActivityPub” software like Mastodon and other Lemmy instances. Basically, you can follow and interact with communities here on Mimic, on any other Lemmy instance, or even from your Mastodon account!

    What is Mimiclem.me? Mimic is a general-purpose instance of Lemmy—a self-hostable, decentralized alternative to Reddit and other link aggregators—hosted by myself.

    What are the rules here? No racism, sexism, homophobia, transphobia, xenophobia, or casteism No incitement of violence or promotion of violent ideologies No harassment, dogpiling or doxxing of other users No content illegal in the United States, Germany, or Finland Do not share intentionally false or misleading information Do not spam or abuse network features. As a general-purpose instance, we do not have heavy moderation in terms of what topics people are allowed to post about, however all users are expected to fol

    Request a subreddit @lemmit.online
    mcmxci @mimiclem.me

    Thanks!

    Selfhosted @lemmy.world
    mcmxci @mimiclem.me

    Lemmy Community Seeder (LCS) - For pre-populating the "All" feed - nowsci

    cross-posted from: https://mimiclem.me/post/7601

    Crossposting this from @[email protected], seems almost essential for small instances: When launching a new Lemmy instance, your All feed will have very little populated. Also as a small instance, new communities that crop up may never make their way to you. LCS is a tool to seed communities, so your users have something in their All feed, right from the start. It tells your instance to pull the top communities and the communities with the top posts from your favorite instances.

    How to run manually and in docker is included in the repo.

    Let me know if there’s anything anyone needs it to do and I’ll see if I can fit it in. I’m going to work on a “purge old posts that are unsaved and not commented on by local users” first, since small instances are sure to run out of disk space

    Lemmy Plugins and Userscripts @sh.itjust.works
    mcmxci @mimiclem.me

    Lemmy Community Seeder (LCS) - For pre-populating the "All" feed - nowsci

    cross-posted from: https://mimiclem.me/post/7601

    Crossposting this from @fmstrat@[email protected], seems almost essential for small instances: When launching a new Lemmy instance, your All feed will have very little populated. Also as a small instance, new communities that crop up may never make their way to you. LCS is a tool to seed communities, so your users have something in their All feed, right from the start. It tells your instance to pull the top communities and the communities with the top posts from your favorite instances.

    How to run manually and in docker is included in the repo.

    Let me know if there’s anything anyone needs it to do and I’ll see if I can fit it in. I’m going to work on a “purge old posts that are unsaved and not commented on by local users” first, since small instances are sure to run out of disk space

    Self Hosted - Self-hosting your services. @lemmy.ml
    mcmxci @mimiclem.me

    Lemmy Community Seeder (LCS) - For pre-populating the "All" feed - nowsci

    Crossposting this from @[email protected], seems almost essential for small instances: When launching a new Lemmy instance, your All feed will have very little populated. Also as a small instance, new communities that crop up may never make their way to you. LCS is a tool to seed communities, so your users have something in their All feed, right from the start. It tells your instance to pull the top communities and the communities with the top posts from your favorite instances.

    How to run manually and in docker is included in the repo.

    Let me know if there’s anything anyone needs it to do and I’ll see if I can fit it in. I’m going to work on a “purge old posts that are unsaved and not commented on by local users” first, since small instances are sure to run out of disk space