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>
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;">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>
I have a noob question but seem overwhelmed with all the information I get about it. Basically, why do I need a reverse proxy if all my services are not public? Every guide or video for self hosting there’s always talk of a reverse proxy, have been doing it wrong?...
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
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…
SystemD is blamed for long boot times and being heavy and bloated on resources. I tried OpenRC and Runit on real hardware (Ryzen 5000-series laptop) for week each and saw only 1 second faster boot time....
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:
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.
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...
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
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.
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:
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>
<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.
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....
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)
I want host to act as an L2 switch for my VM / docker / systemd-container(s) to get IP address from router directly. Are there any tools to configure that?...
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:
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.
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).
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.
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.
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.
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:
Alternatively, you can use network management tools like NetworkManager or systemd-networkd to configure the bridge interface.
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.
I just spun up Lemmy on my Kubernetes cluster with nginx-unprivileged and ingress-nginx. All is well so far! I’m thinking about posting the Kustomization manifests and continuing to maintain and publish OCI’s per version release of Lemmy.
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!
<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:
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!
I set up a self-hosted instance yesterday, so far it runs fine. I can subscribe from there to communities hosted on other instances, I can comment from my instance and the comments show up on other instances....
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 :-)
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...
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.
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...
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.
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>
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.
Where are all the videos and gifs?
I’ve noticed that on Lemmy there aren’t really any videos/gifs as I scroll. I just see post titles, links, or images....
YouTube confirms 3-strike policy for blocking ads (www.androidauthority.com)
Whelp, here we go again
Lemmy active users grew by an astounding 1600% in June (lemmy.world)
From 2,997 active users across all lemmy instances at the beginning of June, the number increased to 52,797 by June 30th. Source....
Help understanding Reverse Proxies
I have a noob question but seem overwhelmed with all the information I get about it. Basically, why do I need a reverse proxy if all my services are not public? Every guide or video for self hosting there’s always talk of a reverse proxy, have been doing it wrong?...
Is Systemd that bad afterall?
SystemD is blamed for long boot times and being heavy and bloated on resources. I tried OpenRC and Runit on real hardware (Ryzen 5000-series laptop) for week each and saw only 1 second faster boot time....
[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...
Alternative to CryptPad
I’ve tried installing cryptpad, but without success. I need if possible a more lightweight cryptpad alternative
magic-tape: YouTube TUI client (fzf, image support) (gitlab.com)
cross-posted from: lemmy.world/post/530920...
It's not possible to be both Conservative and Radical
Here in the US, the Republican political party is called conservative and the Democratic party is called liberal. These two words have meanings....
The world’s largest democracy is collapsing before our eyes (www.vox.com)
Docker-compose help (lemmy selfhosted)
cross-posted from: lemmy.world/post/226995...
Reddit: open /r/pics or else. Mods: OK but you didn't say how (archive.ph)
I honestly don’t know if this is allowed here but I thought this is malicious compliance at its finest....
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....
[Question] How to setup L2 switch on host for containers?
I want host to act as an L2 switch for my VM / docker / systemd-container(s) to get IP address from router directly. Are there any tools to configure that?...
Anyone else running Lemmy with Kubernetes?
I just spun up Lemmy on my Kubernetes cluster with nginx-unprivileged and ingress-nginx. All is well so far! I’m thinking about posting the Kustomization manifests and continuing to maintain and publish OCI’s per version release of Lemmy.
NixOS and Lemmy
Anyone with experience using NixOS to create a Lemmy instance, please share any caveats and troubleshooting tips you have.
Articles on self-hosted servers not propagated?
I set up a self-hosted instance yesterday, so far it runs fine. I can subscribe from there to communities hosted on other instances, I can comment from my instance and the comments show up on other instances....
A place dedicated to all things Star Trek: Deep Space Nine
lemmy.world/c/ds9...
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...
[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...
Slashdot -> Fark -> Digg -> Reddit -> Lemmy
It's been a long journey, but here we arrive. Welcome home.
What distro(s) do you use?
What Linux distribution or distributions do you personally use?...