• 0 Posts
  • 14 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle








  • Here is the example docker-compose.yml:

    services:
      caddy:
        image: caddy
        container_name: caddy
        volumes:
          - ./caddy/data:/data
          - ./caddy/config:/config
          - ./caddy/Caddyfile:/etc/caddy/Caddyfile
        ports:
          - 80:80/tcp
          - 443:443/tcp
          - 443:443/udp
        restart: always
    
      lemmy:
        image: lemmy
        container_name: lemmy
        ...
    

    Before executing, create a new directory caddy i working directory, then create new file Caddyfile in it (lemmy is a container name):

    mydomain.com {
        reverse_proxy lemmy:<lemmy_container_http_port>
        encode zstd gzip
    }
    

    Then fix your UDP Buffer size, so it’s compatible with QUIC: https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes

    And that’s it. tcp80, tcp443 and udp443 should be reachable from anywhere, as Caddy out of the box uses ACME to retrieve TLS certificates for your domain.

    Give it a try. Honestly Traefik is shit for a simple load balancer. It’s more suited for large enterprises and kubernetes services, but it also has numerous issues, such as basic auth performance issues, lack of headers customization as well as in overall somewhat difficult configuration. Caddy makes it straightforward & simple, which is perfect for simple users who love to self-host.



  • Myself I have dual boot. For the sake of simplicity - let’s say I have 2 drives:

    1. 512GB NVME SSD - for OSes.
    2. 2TB SATA SSD - for games.

    512gb ssd partitioned into 2 parts - 256 for Linux and 256 for Windows.

    2TB ssd without partitions, but a plain BTRFS with zstd compression storage.

    Guess what - There is WinBTRFS driver. I am also sharing the same Steam library (on 2TB ssd) between both OSes… 😅 Works like a charm. 👌👌👌


  • It depends. Kind of prefer Flatpaks as they are always working as expected on any distro, but some of them are giving me just too much struggle.

    For example, dealing with sandboxing, or especially VSS code app. Yes, there are instructions, but then I install Golang SDK via Flatpaks the hard way (using CLI) for Go development, then having a nightmare trying to setup everything in vss code. Then how tf should I access go binary within my host terminal?

    On Arch Linux I just tend to install from official repos, while the rest of apps - from Flatpaks.

    Personally I don’t like the way they are sandboxed, bit as long as it works I am fine.


  • In the company I work, we have to use jumpbox + “password” from proprietary code generator.

    Imagine going through this, then you suddenly need 2nd terminal. Inconvenience doing it again in another terminal?

    Well, there is a solution:

    1. tmux
    2. CTRL+B then ". And now you have 2 terminals.

    Also tmux is great for “quick solution” kind of things - to leave something running in the background. Talking about background - you can have many terminals open, from only 1 SSH session. :)