There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

igorlogius , to nostupidquestions in Where are all the videos and gifs?
@igorlogius@lemmy.world avatar

You can use a userscript manager like greasymonkey to inject a javascript snippet that will hide images in comments which have obvious urls to gifs and replace them with actual links or hide them

here an example snippet:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">(() => {
</span><span style="color:#323232;">  let timerID;
</span><span style="color:#323232;">  function onChange() {
</span><span style="color:#323232;">    Array.from(document.querySelectorAll('.comment-node img[src$=".gif"]')).forEach((e) => {
</span><span style="color:#323232;">      const src = e.getAttribute('src');
</span><span style="color:#323232;">      if (typeof src === 'string' && src.startsWith('http')) {
</span><span style="color:#323232;">        e.setAttribute('src', '');
</span><span style="color:#323232;">        const a = document.createElement('a');
</span><span style="color:#323232;">        a.innerText = 'link to gif';
</span><span style="color:#323232;">        a.href = src;
</span><span style="color:#323232;">        e.parentNode.appendChild(a);
</span><span style="color:#323232;">      }
</span><span style="color:#323232;">    });
</span><span style="color:#323232;">  }
</span><span style="color:#323232;">  // if we have many mution events, wait until the site has settled
</span><span style="color:#323232;">  function delayed_onChange() {
</span><span style="color:#323232;">	  clearTimeout(timerID);
</span><span style="color:#323232;">	  timerID = setTimeout(onChange, 500);
</span><span style="color:#323232;">  }
</span><span style="color:#323232;">  function init() {
</span><span style="color:#323232;">	  // start observer
</span><span style="color:#323232;">	  new MutationObserver(delayed_onChange).observe(document.body, {
</span><span style="color:#323232;">	    attributes: false,
</span><span style="color:#323232;">	    childList: true,
</span><span style="color:#323232;">	    subtree: true,
</span><span style="color:#323232;">	  });
</span><span style="color:#323232;">	  delayed_onChange();
</span><span style="color:#323232;">  }
</span><span style="color:#323232;">  setTimeout(init, 500);
</span><span style="color:#323232;">})();
</span>
nicerdicer , to technology in YouTube confirms 3-strike policy for blocking ads

Someone in the Fediverse (I don’t know where and who) posted that you have to add the following filters into U-Block Origin. When done you shouldn’t see any anti-adblock-warnings :

<pre style="background-color:#ffffff;">
<span style="color:#323232;">youtube.com##+js(set,yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel,false)
</span><span style="color:#323232;">
</span><span style="color:#323232;">youtube.com##+js(set,Object.prototype.adBlocksFound,O)
</span><span style="color:#323232;">
</span><span style="color:#323232;">youtube.com##+js(set,ytplayer.config.aras.raw_player_response.adPlacements,[])
</span><span style="color:#323232;">
</span><span style="color:#323232;">youtube.com##+js(set,Object.prototype.hasAllowedlnstreamAd,true)
</span>

I might add that I haven’t experienced any anti-adblock-warnings yet, but I added these filters in advance. I might be worth a shot!

UndulyUnruly , to fediverse in Lemmy active users grew by an astounding 1600% in June
@UndulyUnruly@lemmy.world avatar

From the lemmy.world front page:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Donations
</span><span style="color:#323232;">
</span><span style="color:#323232;">If you would like to make a donation to support the cost of running this platform, please do so at the mastodon.world donation URLs:
</span><span style="color:#323232;">
</span><span style="color:#323232;">    https://opencollective.com/mastodonworld
</span><span style="color:#323232;">    https://patreon.com/mastodonworld
</span>
vegetaaaaaaa , to selfhosted in Help understanding Reverse Proxies
@vegetaaaaaaa@lemmy.world avatar

This answer says it all. A reverse proxy dispatches HTTP requests to several “backend” services (your applications), depending on what domain name is requested in the HTTP request headers. For example using Apache as a reverse proxy, a config block such as

<pre style="background-color:#ffffff;">
<span style="color:#323232;"><VirtualHost *:443>
</span><span style="color:#323232;">  ServerName  media.example.org
</span><span style="color:#323232;">  ...
</span><span style="color:#323232;">  ProxyPass "/" "http://127.0.0.1:8096/"
</span><span style="color:#323232;"></VirtualHost>
</span>

will redirect requests made on port 443 with the HTTP header Host: media.example.org (for example a request to https://media.example.org/my/page) to the “backend” service listening on 127.0.0.1 (local machine), port 8096 (which may be a media server, a wiki, …). This way you only have to expose ports 80/443 to the outside network, and the reverse proxy will take care of dispatching requests to the correct “backend” service.

Most web servers can be used as reverse proxies.

In addition, since all requests go through the proxy, it is a good place to manage centralized logging, SSL/TLS certificates, access control such as IP whitelisting/blacklisting, automatic redirects…

ozoned , to linux in Is Systemd that bad afterall?
@ozoned@beehaw.org avatar

Ok, so I have a very unique background in systemd. I worked at Red Hat supporting it basically as the primary support and I’ve worked with the developers of systemd at Red Hat directly. I no longer work there.

So first off, it’s “systemd” all lower case. I don’t care, but for some reason Lennart Pottering (creator) does.

systemd was a MASSIVE change. And Red Hat did a TERRIBLE job relaying it. To the point where I’m still trying to get my company to understand that it can NOT be treated like the old init systems. You can NOT just drop an init script in place and walk away and hope it works. Because a LOT of times it doesn’t. Due to forks, switch users, etc.

systemd is NOT an init system. RHEL 5 and older had sysvinit as it’s init systemd. RHEL 6 had UpStart as it’s init system and looked exactly like sysvinit that no one even noticed. systemd again is NOT an init system. Init system is 1 part of systemd. systemd does a lot of cool things. It bundles applications together, it manages those applications and can restart them or kill children, it can do resource constraints, it separates out users from the system, and lots more.

Because it is not an init system there is a LOT LOT LOT of bad recommendations out on the internet where someone has X problem and person suggests Y and IT WORKS! … except it doesn’t REALLY work as far as systemd is concerned and you’ll hit other issues or your application takes longer to start or stop and people just blame systemd.

It is systemd’s fault that it has done an ATROCIOUS job of helping people adapt. It’s a great example of RTFM. systemd’s man pages are INCREDIBLE and extensive, but when you drop so much knowledge it becomes more difficult to find what you want/need. systemd.index and systemd.directives are your best bet.

So systemd does a lot of amazing things that sysvinit never attempted to do. It’s never attempted to explain anything it expects everyone just learn magically. it’s INCREDIBLY complex, but once you understand it’s basics you can more easily get an application running, but as soon as there’s a problem it’ll just break your brain.

To give you an example, sshd’s old init script is like 250 lines of bash. systemd’s unit file comparative is like 12. Because systemd handles a LOT of what you manually had to handle before. BUT to get to that 12 you literally have to learn EVERYTHING new.

There is no “is it good or bad” here really imo. It’s a completely different fundamental design. Red Hat made it for themselves. Other distros picked it up. It can be argued that lots of folks followed Debian and Debian had a few Red Hat board members that were pushing it. Whether they pushed it of their own accord or because they were with Red Hat I don’t have a clue.

What I can say is at my current company they’re suffering from a LOT of systemd issues and they don’t even realize it. I’ve been working with Red Hat to try to get Insights to alert people to the failures and we’re making progress.

To see if you have issues just to start run the two following commands:

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># systemctl list-units --failed
</span><span style="color:#323232;"># systemd-cgls
</span>

If you have any units that are failed, investigate those. If you don’t need them, disable them. As for the systemd-cgls this shows HOW systemd is grouping things. ANY application that runs as a service (or daemon or application or runs in the background or however you wanna say it) should be under system.slice. ONLY humans logging into the system (meat bags NOT applications switching to users) should be in user.slice. A LOT of times what happens is an old init script is dropped in place, they start it, it has a switch user and systemd assumes it’s a user and puts it into user.slice. systemd does NOT treat anything in user.slice the same as in system.slice and this WILL eventually cause problems.

So again, is it good or bad? Eh. It does a lot of cool things, but they did a MASSIVE disservice to ALL of us by just expecting to relearn absolutely EVERYTHING.

[Question] Best way to set up docker containers that depend on other container

Hi guys! I have several docker containers running on my home server set up with separated compose files for each of them, including a Pihole one that serves as my home DNS. I created a network for it and a fixed IP but I couldn’t find a way to set fixed IPs to the other containers that use the Pihole network. Well everything...

erre , to selfhost in [Question] Best way to set up docker containers that depend on other container
@erre@feddit.win avatar

I feel like I’m missing something here. I’ve never needed to worry about docker container IPs.

I wonder why you want them to have fixed IPs. I guess I want to understand the problem it would solve.

If all you want to do is have the other containers use the pihole as DNS… they’d already be doing so if the server is using it as the DNS server.

At worst you’d need to provide

<pre style="background-color:#ffffff;">
<span style="color:#323232;">dns:
</span><span style="color:#323232;">  - <server IP where pihole is>
</span>

property to the services.

Tiritibambix , to selfhosted in Alternative to CryptPad
@Tiritibambix@lemmy.ml avatar

Not sure how you tried to install it, but I managed to install it with docker a couple years back. Not sure it’s still up to date but here’s the docker-compose

<pre style="background-color:#ffffff;">
<span style="color:#323232;">version: '3.3'
</span><span style="color:#323232;">services:
</span><span style="color:#323232;">    cryptpad:
</span><span style="color:#323232;">        environment:
</span><span style="color:#323232;">            - CPAD_MAIN_DOMAIN=example.com
</span><span style="color:#323232;">            - CPAD_SANDBOX_DOMAIN=sandbox.example.com
</span><span style="color:#323232;">        volumes:
</span><span style="color:#323232;">            - '${PWD}/data/blob:/cryptpad/blob'
</span><span style="color:#323232;">            - '${PWD}/data/block:/cryptpad/block'
</span><span style="color:#323232;">            - '${PWD}/customize:/cryptpad/customize'
</span><span style="color:#323232;">            - '${PWD}/data/data:/cryptpad/data'
</span><span style="color:#323232;">            - '${PWD}/data/files:/cryptpad/datastore'
</span><span style="color:#323232;">            - '${PWD}/config.js:/cryptpad/config/config.js'
</span><span style="color:#323232;">        ports:
</span><span style="color:#323232;">            - '3000:3000'
</span><span style="color:#323232;">            - '3001:3001'
</span><span style="color:#323232;">        image: promasu/cryptpad
</span>

You can also try onlyoffice or collabora. Have also a look at this.

archy , to linux in magic-tape: YouTube TUI client (fzf, image support)
<pre style="background-color:#ffffff;">
<span style="color:#323232;">$ echo $0
</span><span style="color:#323232;">bash
</span>

Strange… It still displays the same zsh error and the preferences are not displayed. I even tried to execute the program using bash magic-tape.sh while in bash

I tried on a machine where only bash is installed, and the search window is blank, yt-dlp gives an error that flashes and I can’t read quickly, no preferences appear, again it flashes some text but I cannot read it. Also, the location for the folder is not relative, it has to be in ~/git/magic-tape otherwise it will give you multiple errors.

archy , to linux in magic-tape: YouTube TUI client (fzf, image support)

Yeah, I followed the instructions, created necessary folders. yt-dlp is not the latest version, but the latest from Debian bookworm repositories (2023.03.04). yt-dlp works perfectly to download and convert videos with ffmpeg.

When I try to browse trending yt-dlp says:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">yt-dlp: error: playlist end "0" must be must be greater than or equal to playlist start "1"
</span>

I don’t have zsh errors on Debian where only bash is installed, after searching for a video I got a blank screen with the only option:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Select video:
</span><span style="color:#323232;">search videos 1 to 0:
</span><span style="color:#323232;">> 1 Abort Selection
</span>
archy , to linux in magic-tape: YouTube TUI client (fzf, image support)

I finally got to my main workstation with GUI, pulled the latest code, installed rofi there and it works now, I sill could not to get previews to show because of the draw_preview: command not found error. But I don’t think rofi can run on a headless machine:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">rofi
</span><span style="color:#323232;">(process:1456958): X11Helper-WARNING **: 10:52:55.600: Failed to open display: (null)
</span><span style="color:#323232;">(process:1456958): Rofi-WARNING **: 10:52:55.600: Connection has error
</span>
vegivamp , to showerthoughts in It's not possible to be both Conservative and Radical
@vegivamp@feddit.nl avatar

radical răd′ĭ-kəl adjective

<pre style="background-color:#ffffff;">
<span style="color:#323232;">1. Arising from or going to a root or source; basic.
</span><span style="color:#323232;">2. Departing markedly from the usual or customary; extreme or drastic.
</span><span style="color:#323232;">3. Relating to or advocating fundamental or revolutionary changes in current practices, conditions, or institutions.
</span>

I believe 2. is the most common colloquial use. It is perfectly possible to be a radical conservative; and I would actually argue that conservativism is a radical ideology, given that the world at large wants to make progress.

nadir , to worldnews in The world’s largest democracy is collapsing before our eyes
<pre style="background-color:#ffffff;">
<span style="color:#323232;">http://www.chinatoday.com/org/cpc/
</span><span style="color:#323232;">https://news.cgtn.com/event/2021/who-runs-the-cpc/index.html
</span><span style="color:#323232;">https://news.cgtn.com/event/2019/whorunschina/index.html
</span>

Do you think those are sources? Pointing at the National Congress or the Central Committee as if those actually held any power is ludicrous.

ChaosAD OP , to selfhosted in Docker-compose help (lemmy selfhosted)

Thanks! I just tried the docker-compose.yml you shared and I am getting the follwoing error:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">ERROR: The Compose file </span><span style="color:#183691;">'./docker-compose.yml'</span><span style="color:#323232;"> is invalid because:
</span><span style="color:#323232;">Unsupported config option for networks: </span><span style="color:#183691;">'lemmyinternal'
</span><span style="color:#323232;">Unsupported config option for services: </span><span style="color:#183691;">'pictrs'
</span>
lich_hegemon , to maliciouscompliance in Reddit: open /r/pics or else. Mods: OK but you didn't say how

Let’s assume that everyone who upvoted their option also downvoted the alternative.

The group A, has |A| number of individuals. Group B has |B| number.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">Option A: |A| - |B|
</span><span style="color:#323232;">Option B: |B| - |A|
</span><span style="color:#323232;">
</span><span style="color:#323232;">Option A = |A| - |B| 
</span><span style="color:#323232;">         = -(-(|A| - |B|))
</span><span style="color:#323232;">         = -(|B| - |A|)
</span><span style="color:#323232;">         = -Option B
</span>

The results would be opposites of each other and would highlight the opinion of the majority anyway.

I can't seem to SSH into my server over VPN and can't figure out why. (kbin.social)

Using JuiceSSH on my phone, I'm able to connect to my device without any problems when I'm on my home Wi-Fi. However, when off WiFi and connected to my VPN, the server doesn't connect. I'm still able to access the services it's running, but can't SSH into the server itself....

LachlanUnchained , to selfhosted in I can't seem to SSH into my server over VPN and can't figure out why.

Really strange. What von client are you using on android? Im iOS, so not overly familiar. Probably done all this, but just run through it again make sure you haven’t got a typo somewhere or something.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">1.	Check Connection Settings: Ensure the IP, port, and authentication details are correct in JuiceSSH.
</span><span style="color:#323232;">2.	Firewall Rules: Confirm the SSH port (usually 22) isn’t blocked by any firewalls on your network or server.
</span><span style="color:#323232;">3.	Try another SSH App: To see if it’s a JuiceSSH-specific issue, download another SSH client like Termius and test the connection.
</span>

(I’d probably start with 3, might narrow it down to a juice config problem, I’m not very familiar with juice)

fraichu OP , to selfhost in [Question] How to setup L2 switch on host for containers?

Chat GPT @ chat.openai.com’s answer

Thank you for providing the details. Based on your requirements, you can achieve your goal by utilizing the Linux bridge functionality to create a software-level Layer 2 switch. Here’s an outline of the steps involved:

  1. Install the necessary software: Ensure that the bridge-utils package is installed on your Linux machine. You can typically install it using the package manager specific to your distribution. For example, on Ubuntu or Debian, you can run sudo apt-get install bridge-utils.

  2. Identify your physical network interface: Determine the name of your WiFi network interface that is connected to the ISP router. You can use the ip link command to list the available network interfaces. Look for the interface name associated with your WiFi connection (e.g., wlan0).

  3. Disable network management on the physical interface: To prevent network managers from managing the physical interface directly, you’ll want to disable their control. This step may vary depending on your specific network manager. For example, if you’re using NetworkManager, you can edit the configuration file associated with your WiFi connection (usually located in /etc/NetworkManager/system-connections/) and set managed=false. Alternatively, you can stop or disable the network manager service temporarily.

  4. Create a bridge interface: Create a Linux bridge interface using the brctl command. For example, you can run sudo brctl addbr br0 to create a bridge named br0.

  5. Add the physical interface to the bridge: Add your WiFi interface to the bridge using the brctl addif command. For example, run sudo brctl addif br0 wlan0 to add wlan0 to the bridge.

  6. Configure the bridge interface: Assign an IP address to the bridge interface (br0) by configuring it in the network configuration files. The specific file to edit depends on your Linux distribution. For example, on Ubuntu or Debian, you can edit /etc/network/interfaces and add the following lines:

    <pre style="background-color:#ffffff;">
    <span style="color:#323232;">auto br0
    </span><span style="color:#323232;">iface br0 inet dhcp
    </span>
    

    Alternatively, you can use network management tools like NetworkManager or systemd-networkd to configure the bridge interface.

  7. Configure the virtual machines and containers: Configure your virtual machines, Docker containers, and systemd-containers to use the bridge interface (br0) as their network interface. This configuration varies depending on the specific technology you are using. For example:

    • For Docker: Create a new Docker network of type “bridge” and specify the bridge name as br0. Then, when creating or running Docker containers, connect them to this network.
    • For systemd-containers: Configure the [email protected] and [email protected] units to attach the container to the bridge interface (br0). This can be done using the systemctl command and systemd network configuration files.

With these steps, your virtual machines, Docker containers, and systemd-containers should be able to obtain IP addresses directly from your ISP router via the software-level Layer 2 switch created using the Linux bridge interface.

Please note that the specific commands and configuration files may vary depending on your Linux distribution and network management setup. Make sure to adapt the instructions accordingly. Additionally, be cautious when modifying network configurations as it can potentially impact your network connectivity.

gabe565 , to selfhosted in Anyone else running Lemmy with Kubernetes?
@gabe565@lemmy.cook.gg avatar

Yep I’m still working on a helm chart. Currently, each service is deployed with the bjw-s app-template helm chart, but I’d like to combine it all into a single chart.

The hardest part was getting ingress-nginx to pass ActivityPub requests to the backend, but we settled on a hack that seems to work well. We had to add the following configuration snippet to the frontend’s ingress annotations:

<pre style="background-color:#ffffff;">
<span style="color:#63a35c;">nginx.ingress.kubernetes.io/configuration-snippet</span><span style="color:#323232;">: </span><span style="font-weight:bold;color:#a71d5d;">|
</span><span style="color:#183691;">  if ($http_accept = "application/activity+json") {
</span><span style="color:#183691;">    set $proxy_upstream_name "lemmy-lemmy-8536";
</span><span style="color:#183691;">  }
</span><span style="color:#183691;">  if ($http_accept = "application/ld+json; profile="https://www.w3.org/ns/activitystreams"") {
</span><span style="color:#183691;">    set $proxy_upstream_name "lemmy-lemmy-8536";
</span><span style="color:#183691;">  }
</span><span style="color:#183691;">  if ($request_method = POST) {
</span><span style="color:#183691;">    set $proxy_upstream_name "lemmy-lemmy-8536";
</span><span style="color:#183691;">  }
</span>

The value of the variable is $NAMESPACE-$SERVICE-$PORT.
I tested this pretty thoroughly and haven’t been able to break it so far, but please let me know if anybody has a better solution!

neoney , to selfhosted in NixOS and Lemmy
@neoney@lemmy.neoney.dev avatar

Okay, I’ve actually figured simplifying it out, it’s not that bad. Let me share my config:

First, since the PR isn’t in nixos-unstable yet, I’m adding the fork as a flake input

<pre style="background-color:#ffffff;">
<span style="color:#323232;">inputs = {
</span><span style="color:#323232;">  nixpkgs-lemmy.url = "github:CobaltCause/nixpkgs/lemmy-module-improvements";
</span><span style="color:#323232;">};
</span>

then, in my system configuration, I add this:

<pre style="background-color:#ffffff;">
<span style="color:#323232;"># Not sure if this is required, maybe caddy auto-allows it
</span><span style="color:#323232;">networking.firewall.interfaces.eth0.allowedTCPPorts = [443 80];
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Override the lemmy module with the one from the PR
</span><span style="color:#323232;">disabledModules = ["services/web-apps/lemmy.nix"];
</span><span style="color:#323232;">imports = [
</span><span style="color:#323232;">  "${inputs.nixpkgs-lemmy}/nixos/modules/services/web-apps/lemmy.nix"
</span><span style="color:#323232;">];
</span><span style="color:#323232;">
</span><span style="color:#323232;">services.lemmy = {
</span><span style="color:#323232;">  database.createLocally = true;
</span><span style="color:#323232;">  database.uri = "postgres:///lemmy?host=/run/postgresql&user=lemmy";
</span><span style="color:#323232;">  enable = true;
</span><span style="color:#323232;">  settings = {
</span><span style="color:#323232;">    hostname = "<YOUR_HOSTNAME>";
</span><span style="color:#323232;">  };
</span><span style="color:#323232;">  caddy.enable = true;
</span><span style="color:#323232;">};
</span>

and, that’s it!
However, I’m not sure if it will cleanly deploy, as you might get an error while starting.
If so, please check postgresql logs sudo journalctl -fu postgresql. The error will most likely be something like this:
[…] [10289] ERROR: permission denied: “RI_ConstraintTrigger_a_16639” is a system trigger […]

If that happens, you need to manually run the migration until the fix is merged into Lemmy. Here’s how I did it:

  1. sudo su - postgres
  2. psql -v ON_ERROR_STOP=1 lemmy postgres
  3. (in psql) SET ROLE lemmy;
  4. Paste the SQL code from here: github.com/LemmyNet/lemmy/issues/2784#issuecommen…

After that’s done, you can exit the postgres CLI by typing q, exit the postgres user and just simply sudo systemctl restart lemmy which should start properly now, and be accessible to the outside network.
Open it and it will give you the initial setup screen. Good luck!

twitterfluechtling OP , to selfhosted in Articles on self-hosted servers not propagated?

Ok… After changing some settings, I got this log:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">2023-06-13T15:16:56.808411Z ERROR HTTP request{http.method=GET http.scheme="http" http.host=lemmy.pathoris.de http.target=/api/v3/ws otel.kind="server" request_id=6603f30f-4523-4548-a82c-f38c22d1889f http.status_code=101 otel.status_code="OK"}: lemmy_server::api_routes_websocket: only_mods_can_post_in_community: only_mods_can_post_in_community
</span>

That explains a lot, I think :-)

Apparently my instance does try to push, as I expected, but the community is protected on lemmy.world. That’s a bit surprising still, since I thought it is a test group to test federation and such, but since that wasn’t specified anywhere, it’s fair enough that this could be a test-group by lemmy.world for lemmy.world :-)

Akhuyan OP , to newcommunities in A place dedicated to all things Star Trek: Deep Space Nine
@Akhuyan@lemmy.world avatar

A more thorough post is pinned in this community, but to put it simply,

<pre style="background-color:#ffffff;">
<span style="color:#323232;">[Star Trek: Deep Space Nine](/c/[email protected])
</span>

The brackets is the text that shows up, and the [email protected] is the community and the instance the community is on.

What hardware are you using for your self-hosted lemmy instance?

For those self-hosting a lemmy instance, what hardware are you using? I am currently using a small Hetzner VPS. It has 2 vCPU, 2GB RAM and 40GB SSD storage. My instance is currently just in testing with me as the only user, but I plan to use it for close friends or family that may want to try this out, but might not want to sign...

howdy , to selfhosted in What hardware are you using for your self-hosted lemmy instance?
@howdy@thesimplecorner.org avatar
  • 1 vCPU 2.9ghz
  • 1 GB DDR4 Memory
  • 25 GB NVMe/SSD Storage

5~ USD a month. Working great for personal use and I’d imagine a handful of users. Hosted in a data center that is very close to me.

Also fwiw: 4 days of lemmy. I am subbed to a bunch of stuff. I’ve only uploaded like three pictures to my instance… All that space is thumbnails from other instances.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">692M    ./postgres
</span><span style="color:#323232;">8.0K    ./lemmy-ui
</span><span style="color:#323232;">499M    ./pictrs
</span><span style="color:#323232;">1.2G    .
</span><span style="color:#323232;">1.2G    total
</span>

[SOLVED] How to configure Lemmy instance nginx proxy for websockets?

I’m playing around with my own instance of Lemmy but I keep getting a “websocket connection failed” error in my console. I’m having a really hard time understanding how to set up nginx for websockets - I’m more used to Apache and not familiar with WS at all. Is there documentation hiding somewhere that will help me set...

aucubin , to selfhosted in [SOLVED] How to configure Lemmy instance nginx proxy for websockets?

The nginx config provided in the Docker installation part contains everything needed for nginx. If you are installing lemmy directly on the machine you may need to use different upstreams.

The websocket part is basically the

<pre style="background-color:#ffffff;">
<span style="color:#323232;">            # proxy common stuff
</span><span style="color:#323232;">            proxy_http_version 1.1;
</span><span style="color:#323232;">            proxy_set_header Upgrade $http_upgrade;
</span><span style="color:#323232;">            proxy_set_header Connection "upgrade";
</span>

part in the nginx config on that page.

aucubin , to selfhosted in [SOLVED] How to configure Lemmy instance nginx proxy for websockets?

Ah, so you added another nginx on the host by installing it from the package store of the distro and have that proxy port 80 to the docker nginx?

If you do that then you also need to add the websocket settings I had in the first comment to the host nginx.

What I meant what that the nginx in the docker-compose from lemmy also listens to port 80 and you just need to add

<pre style="background-color:#ffffff;">
<span style="color:#323232;">server {
</span><span style="color:#323232;">    listen 80;
</span><span style="color:#323232;">    server_name my_domain.tld;
</span><span style="color:#323232;">
</span><span style="color:#323232;">    location / {
</span><span style="color:#323232;">        proxy_pass http://localhost:LEMMY_PORT;
</span><span style="color:#323232;">        proxy_set_header Host $host;
</span><span style="color:#323232;">        include proxy_params;
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">}
</span>

to the nginx.conf of the container.

Then you should have it accessable from port 80 without the host nginx (of course you need to stop the host nginx then).

koze , to technology in Slashdot -> Fark -> Digg -> Reddit -> Lemmy

It’s funny to read this article about the death of Digg again:

In reality, Digg changed their business model and pretended that they didn’t. That is something that is unacceptable with communities and won’t be forgotten. Reddit co-founder Alexis Ohanian hit the nail on the head in an open letter to (now former) Digg CEO – Kevin Rose:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">“You chose to grow with venture capital and you’ve no doubt (I hope) taken some money off the table in your Series C round. I say this because this new version of digg reeks of VC meddling. It’s cobbling together features from more popular sites and departing from the core of digg, which was to “give the power back to the people.”
</span>

searchengineland.com/digg-v4-how-to-successfully-…>

neoney , to linux in What distro(s) do you use?
@neoney@lemmy.world avatar

For me, NixOS is like someone took the archwiki and made a distro with it. I can just do

<pre style="background-color:#ffffff;">
<span style="color:#323232;">services.lemmy = {
</span><span style="color:#323232;">  enable = true;
</span><span style="color:#323232;">  settings = {
</span><span style="color:#323232;">    hostname = "lemmy.union.rocks";
</span><span style="color:#323232;">    database.createLocally = true;
</span><span style="color:#323232;">  };
</span><span style="color:#323232;">  caddy.enable = true;
</span><span style="color:#323232;">}
</span>

in my system config (example from Nix manual). It will install lemmy, install caddy, start lemmy backend on port 8536, frontend on 1234, expose it with a caddy reverse proxy to that hostname, and initialize a postgres database. This is also reproducible across systems, so it’s pretty much guaranteed to work the same on one PC and on another.

This is very useful, because some programs require some more configuration, and this can remove the need to know where to put their config files, their package names, systemd service names from your head. It’s all in there.

Also, when I fuck something up… when changing the config, it makes a new boot entry with it, so when booting I can just press arrow down when booting to select an older, working config. Magic.

Packages are also nicely separated from each other. I don’t have to install stuff globally, when I need a program one time I can just do nix shell nixpkgs#audacity and have an ephemeral shell with the package installed.

There are (optiona) binary caches, so you practically don’t have to compile anything from source when updating your system.

I have all my configuration on GitHub, like a lot of people, which makes it easy to share information.

A con is that when a program hasn’t been packaged for NixOS (whether it’s in nixpkgs or has a flake.nix in the repo), it’s not that easy to use it, so learning to write derivations (packages) for NixOS is pretty much a must have.

Also another must have is being in some community that uses NixOS, because it is really hard to learn without someone to help and guide you IMO.

Worth it though

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines