• 0 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: June 3rd, 2025

help-circle
  • Not that I should even bother, but:

    If my recommendations reflect a common consensus in this community, then perhaps there is good reason they are popular, no? In my case, I personally know the person who runs the VPS I rent and do actively trust them. I know that situation isn’t going to be the same for everyone, but if you don’t fully trust your VPS provider, there’s a reason TLS forwarding and ZTT solutions like Tailscale exist.

    And sorry my writing isn’t to your expectations, I guess.


  • My use case has containers and reverse proxy all rootless on a given machine. TLS certs pulled at proxy level. I explicitly group small clusters of relevant services per machine. Authentik and other utilities live on one machine. Things like Jellyfin and Navidrome on another, etc.

    The real way to achieve the same using user isolation rather machine isolation (given you’d be having multiple reverse proxies on one machine) is to have a second layer reverse proxy with no TLS or anything, simply handling the routing to the then off-port HTTPS connections published at system level.

    For my public-facing stuff, the reverse proxy on my VPS does roughly the same thing, taking my HTTPS connections and either directly forwarding, or decrypting and rewriting the cert to a wildcard one I use if I need packet filtering or other tech for a given service. Having well-defined network ranges and reverse proxies being assigned static addresses (container-level networking or otherwise) helps significantly when working out your trusted proxies config at each layer.


  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•How "secure" is your setup?
    link
    fedilink
    English
    arrow-up
    24
    arrow-down
    9
    ·
    2 months ago

    I have a few practices, technologies that I leverage across my systems, network for selfhosting.

    First, the principles I follow:

    • Least access — Limit exposure of ports, services to as limited an audience as possible.
    • Don’t put all your eggs in one basket — Spread your service deployments out across different machines, or at least different users on the same machine. Group relevant services together as seen fit, but don’t deploy everything in the same place.
    • Security through obscurity is bad — What I mean is make your process for deploying and maintaining applications easy to read and understand the context. Software versions, customizations, and other tweaks should be easy to find and understand.
    • Mind your secrets — Seriously, don’t engage in practices that may lead to exposed secrets. Keep files that may have them out of your git repos. Read your logs before pasting them or feeding them to another application. If it can be done, automate secret deployments where possible.
    • Understand your tech — Learning stuff in the context of LAN is perfectly fine and I encourage doing so. For anything that you plan to bring to any wider network though, please do the recommended reading about each component you are using. Security mistakes often come from glossing over something that wasn’t apparent, but was important. Yes, this will slow down your work to a crawl if you’re used to just pulling Docker images and deploying at-will. I still recommend to take the hit in speed in order to do things as right as possible the first time.

    Now, onto the actual technologies and practices I use:

    First off, as hinted above, I make heavy use of containerized applications. OCI (commonly referred to as Docker) containers are a convenient way for developers to package their applications, but also offer some affordances in security if you leverage the tools well. I personally use Podman as my tool of choice for many reasons, but one of them being the relatively sane rootless setup that is ready to use out of the box. This means that can be started up at user-level (without root permissions and with user-level restrictions), which is great in case of an exploit to escape the sandbox occurs. Combine this with pairing relevant applications together on different users, and an actual semblance of a security model starts to form in mitigating the potential disaster from a rogue container. If you use multiple users on a system, make sure they are isolated users who should not be able to even read another user’s files; don’t give users free sudoers access. I also utilize multiple different machines for different processes, which works as well.

    Secondly, I utilize Quadlets, a way to write podman container, pod, network definitions as SystemD units, and be able to hook them in with other SystemD units. I love this approach for many reasons, including having declarative definitions of most of my deployment stack. Certainly makes redeployments, migration, and restoration a breeze when tracked with git. More importantly for security, an easy-to-read set of config files makes managing selfhosting significantly more predictable and boring, which is how it should be. Any question I might have about how something is setup I can find within a minute every time. Less guessing, less searching, more informed decisions; which is crucial to making less mistakes that could have security implications. Practically speaking, there are more than just Quadlets: Docker compose, Kubernetes definitions, Helm charts, and others all exist with their various strengths and weaknesses. Pick what works for you.

    With actually exposing stuff to the internet (or at least a broader network), I do limit my machines’ reach where possible. I have the capability to, but do not directly port forward anything from my home router. I rent a small VPS with minimal latency to my location that I use as a forwarding proxy for public services. I have a wireguard tunnel on my home router to the VPS that I let access specific IP ranges that contain my static IP server IPs only, with firewall rules on the router to back the access grant in the tunnel config. From there, I forward traffic to the VPS’s public IP with FirewallD on the edge, or have traffic sit behind a reverse proxy on said VPS.

    With most traffic though (especially with services I don’t completely trust to leave exposed), I restrict who and what may gain access to said services. If the model works for you, Zero Trust Tunneling / Mesh Network solutions like Tailscale, Netbird, or Netmaker are of high recommendation. For many of these, they allow you to connect end-user devices and serving devices together over a dynamic Wireguard tunnel (or similar) to share services that normally wouldn’t be as suitable sitting on the open internet. I personally run a selfhosted instance of Headscale which also sits on the edge VPS, and acts as my Tailscale control server and sole traffic relay for connections that can’t be direct peer to peer. Most of my services sit behind the requirement of being in the virtual network, while some I configure dual-offering. I should note that using Tailscale and others that offer direct peer-to-peer will directly expose your devices’ public IPs to others in the network that can interact.

    Lastly, I can note that while there have been many efforts with various solutions to try and make selfhosting as mindlessly easy as possible, I don’t recommend running many of them for a very specific reason. Much like how I hate people using LLM chatbots in place of their own brains to try and solve problems, having some container management platform take the initial setup out of selfhosted applications and attempt to abstract away as much of finer details as possible can lead to a fast initial deployment, but certainly not a secure one long-term. I do believe there are many practices and details one should learn about their selfhosting setup (such as networking, firewalls, what each app depends on, how best to upgrade them, when to pin application versions, etc.). Having a platform take that away in the beginning will only lead to problems later down the line when those funny little details start to become more important. Only learning about those details when the problems start to occur becomes a much more monumental hurdle to cross than simply learning the details as you set things up for the first time.

    Final Notes

    This comment is quite large, even by my standards. Yet, I am sure I have missed something somewhere. I will be happy to reply to any specifics about either technology or practice if I missed anything.


  • Generally, your auth provider (assuming setup correctly) should be one of the most secure components of your internet-exposed setup. That being said, vulnerabilities can and do occur. Adding a combination of Crowdsec, OWASP CRS, other ModSecurity rulesets, and/or fail2ban will add a degree of migitation of potential exploits by blacklisting known bad actors/active bad behavior.

    Above all, you should have a plan to keep aware of updates to your publicly-exposed software and be able to deploy those updates in a timely fashion.


  • If you take a look at it from the lens of distro maintainers, this would be an absolute nightmare. Distros package library versions, and currently tightly control the release of applications to given library versions. Allowing just any range of library versions for applications would loosen said requirement, but would require distros to then build and maintain a ton of versions of each library.

    Flathub currently curbs this problem to a large extent by bundling explicit point release packages of common libraries, and expects the application to bundle uncommon ones themselves. This does mean that one cannot simply package an application without some thought put into the library versions used for release on Flathub still.

    For distros, this style of packaging could somewhat be copied, but to little benefit. It would either be wasting time replicating congruence with an existing standard like Flathub’s library bundles or do their own thing and further complicate things for developers wanting to get their app published to a distro’s repos.

    Overall, flatpaks make the process look a bit more seamless than things really are for developers and package maintainers. Flatpaks really only work as well as they do because everyone mostly agrees on adhering to the library packages published by Flathub. I don’t really think adding even the sliding scale of library ‘sets’ for various distros would any benefit beyond what is currently done.


  • Adding to compatibility notes, it does seem that with the 2015 A1502’s there won’t be anything major in poor compatibility, beside the webcam not working out of the box. Found someone who documented their experience heavily tuning their Fedora install on their 2015 A1502. The author kitted out their Mac with a new SSD and better Wi-Fi card, which is worth mentioning. Some of the information is straight up helpful for even a standard A1502. Common stuff like installing the RPMFusion libva driver, EasyEffects equalizer presets, TLP are generally good ideas.

    Mbpfan is also a good idea, but it looks like the package got dropped on 44 from a missing maintainer. May be recommended to install 43 for now if going with Fedora. I pulled the package source and built it on my computer, and it seems to work. Unfortunately I don’t have an actual Macbook to test it on. I’ll see about getting a COPR repo for it available soon, so that the package can be easily tested.

    I have a Copr repo available (jrgd/mbpfan) for unofficial packages on Fedora 44.

    Some stuff, like disabling mitigations, throttled, and installing the FacetimeHD drivers are not stuff I’d really recommend. You can still go with any of these noting the caveats listed for each tweak. The FacetimeHD drivers are required for getting the webcam to work, so going through the hassle of getting those drivers to behave or just not having a built-in webcam is a choice to make.


  • Probably your best bet for something similar in vein to MacOS would be any distro that ships with GNOME. Ubuntu, Fedora, Debian, OpenSUSE Tumbleweed all either ship explicitly with GNOME or have them as options within their live installers.

    If you know which model and spec your Macbook is, I could give better compatibility insights. In short, the Broadcom chips used for Wi-Fi, Bluetooth in the 2014-2015 Macbooks used to be quite problematic for many Linux distros, but I do believe the in-tree bcm43xx driver in the kernel should handle them well enough nowadays. Depending on exact year and spec, your Macbook may come with an NVidia GPU, which will require additional post-installation steps to install the proprietary drivers on many distros. As it isn’t the primary display device on those models, there shouldn’t be too many issues in getting the cards to function and render offloading to work.

    Ubuntu discourse

    Ubuntu is not really spyware as people may claim it to be. The main spyware claim comes from two sources: the 14 year old once-integration for Amazon services that Ubuntu shipped around the 12.10 point release and that Ubuntu does utilize more telemetry than other distros.

    Often though, it’s not a recommended distro anymore for many reasons. One primary one is that Ubuntu used to be seen as user-friendly and had a lot of community forum posts to document how to use it. Nowadays, most major distros have caught up and surpassed Ubuntu in usability and reliability, and Ubuntu’s once-positive of forum posts largely tend to clog up being able to find useful information when a problem does occur because of how out-of-date many of those forum posts that still show up in search results are.

    Another big reason is Ubuntu is not recommended is Canonical’s (the company the makes Ubuntu) makes regular missteps and often falls on the wrong side of development for progress of the Linux desktop. See Unity desktop, Mir, Upstart, and the current misstep of Snaps. Canonical has also additionally put less effort into keeping that once-polished experience the Ubuntu desktop had and moved a lot of their effort into their server offerings. There have been relatively recent Ubuntu LTS desktop releases that have shipped with some baffling and often showstopping bugs that should have been release blockers. It’s to a point where the QC of releases is often worse than what is found on 6-month point release and even many rolling release distros to where many don’t recommend Ubuntu anymore.


  • Based on OP’s edit, that looks correct. Unless OP checks the topology and can make the claim that drives from the main chipset are the slow ones, secondary chipset drives will tend to perform slower, and the ASMedia ASM1061 has several reports online of poor to trash performance compared to baseline.

    Best bet if the full performance is necessary out of every drive would be finding a decent quality PCI-E SATA III riser card that doesn’t use a known flawed driver chip rather use the two ‘extra’ ports on the motherboard.


  • You can absolutely swap the primary boot entry in the BIOS by hand, but as mentioned, GRUB can be made to show an entry for Windows 10 upon normal boot. You can select that entry rather than swap the primary target in the BIOS, which will be a time saver when switching OS. Some configuration to get GRUB to pick it up will likely need to be done however.

    For that to work, one needs to uncomment a line in /etc/default/grub (#GRUB_DISABLE_OS_PROBER=false becomes GRUB_DISABLE_OS_PROBER=false). If the line simply isn’t present in /etc/default/grub, just add it at the bottom.

    For GPT, EFI installations

    On modern (EFI, GPT) systems, there is specifically one partition you will need to persistently mount from the Windows drive through fstab, being the Windows EFI partition. It does not matter particularly where it is mounted, as long as it is out of the way (a mount point like /windows is fine). You’ll have to create an empty directory preferably somewhere under / and owned by root, and then add the Windows EFI partition as a line to /etc/fstab. The command line utilities lsblk and blkid can help to determine the disk partition layout and the EFI partition’s UUID. The ‘Disks’ utility installed by default in Mint can also do this, and may be easier.

    Before touching your /etc/fstab file, make a copy of it. The resulting line added to /etc/fstab will look roughly like UUID=ABCD-1234 /windows vfat umask=0077,nofail 0 2, replacing the ABCD-1234 with the actual UUID and /windows with the actual desired mount point, if different. Running mount -a with sudo is highly recommended after touching the fstab file to verify that everything is correct. The command should complete with no errors. If it errors, revert your /etc/fstab to the copied version. Rebooting with a broken fstab file can leave your system unbootable.

    Finally, for systems like Linux Mint, run update-grub with sudo to rebuild the bootloader entries. With os-prober enabled in /etc/default/gruband the Windows EFI partition mounted if relevant, update-grub should show a warning about os-prober being enabled and among other entries, an entry for Windows 10 should be present. As long as the Windows drive continues to be installed in the system, a boot entry should be available next to your Linux Mint and bios entry options in GRUB going forward.


  • Generally, if they are fully on separate drives, things should be fine. When going to install Windows for the dual boot, physically unplug or uninstall the Linux drive. After Windows is installed and can boot, you can then reinstall the Linux drive.

    On the Linux side, you may need to trigger a rebuild for GRUB or your preferred bootloader to get the appropriate Windows 10 entry to show in the boot menu. Some distros may need extra configuration to get this to work. Don’t attempt to automount any partitions from the Windows 10 side and don’t generally try to mount them unless necessary. The only exception to this is if using EFI partitions, then that partition will need to be mounted for GRUB to see it.

    Also highly recommended to block Windows 10 from connecting to any network if possible, as it is end of life (unless using ESU releases).


    EDIT: Somewhat incorrect information in regard to EFI partitions, missing GRUB configuration related to distro


  • Using the AUR largely expects users to understand the basics of shell/BASH scripts, which is what a PKGBUILD is. The most obvious source to check is what URL(s) the PKGBUILD is pulling in for a package’s source(s). Are these URLs sourced from official or otherwise trusted sources for the application or component (such as from the app author’s download site or their git forge)? Does the PKGBUILD make any claims of what is being downloaded and does the target URL’s contents match that? If either of these checks fail, it’s best to avoid that package.

    Additionally, does the PKGBUILD attempt to do things like obfuscate data such as URLs or tokens for downloading? Does it attempt to recklessly delete or modify files/directories (rm -rf, other recursive functions)? Does the PKGBUILD make use of any arbitrary execution statements such as exec or spawning subshells? If any of these check true, the package should seriously be revised before attempting to install it. System-level software installs on Linux systems should never be complicated enough to need fancy execution techniques nor reckless file management.


  • Starting with confirmation of what others have said, yes you can use compose tools with Podman and Podman can hook directly with Docker Compose (the tool), but it really isn’t recommended. Compatibility with compose now is better than it used to be, but there are still edge cases. For a lot of projects that just pre-write a compose file that they expect to cover the general use case of their container, you’re best to take the compose file and write it out to Quadlet unit(s).

    Other differences not mentioned can include:

    • Podman alongside containers has optional pods, which let you wrap multiple containers together, sharing the same IP internally. Useful for having a service and their sidecar containers (e.g. Valkey, Postgres, Meilisearch, etc.) be bundled under the same IP address and simply reference each other as localhost, 127.0.0.1, or ::1. If you utilize pods for certain split-container applications, you may need to remap certain service ports as they can overlap and cause binding failures.
    • Podman has multiple networking modes. If you use Podman at the system level (rootful) like Docker expects you to, you’re not really going to encounter any quirks with the default networking setup. Per-user Podman (rootless) defaults to using the Pasta backend for networking, which is still very highly performant, but is a bit clunky to configure (if ever actually necessary) and inter-pod communication can be difficult to get right. Alternatively, registering rootless pods with a bridge network makes inter-pod communication easy, but can cause problems if accurate source IPs are needed (e.g. upstream reverse proxies, accurate client IP logging, etc.).
    • Because Podman is daemonless, there is also no persistent API socket loaded by default (an intentional security choice). For both rootful and rootless containers, you can enable this manually and mount it to containers that need it. For containers that expect docker.sock explicitly for API manipulation, your mount will need to reflect the name change of the podman.socket to what the container expects.
    • Podman by default won’t shorthand container pulls from docker.io by default: a sin I see constantly done in so many compose files. When pulling a container from DockerHub, you need to put the docker.io/ prefix, just as you would but the appropriate prefix with Quay, Github, Gitlab, or any other distributor.
    • Podman can optionally let you auto-update containers based on the release tag specified for the container.
    • Because of Podman’s integration with SystemD, a lot of oddball integrations (external cron jobs, one-shot services, etc.) can be pulled together with extra SystemD units (services, timers, etc.).

  • Might take a little bit of effort to do a conversion if you’re locked into explicitly how Docker interacts with OCI containers, but over in the Podman camp you have two options.

    • Cockpit with the Podman containers interface: a graphical web-based solution for managing podman containers and the rest of the system.
    • Podman Quadlets: a config file-based way to manage Podman containers, volumes, pods, networks with custom SystemD units. Great if you want to version control your deployments.

    Other than that, the more usable solutions I’ve tried of graphical Docker container management interfaces would be the ones in Unraid and Proxmox, though those solutions may not be suitable depending on your use case and have their own caveats to be aware of.


  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•Authentik Helm woes
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 months ago

    Coming back and checking the values file posted. Not sure why your authentik block won’t get used in your values file. Your current issue of non-starting is likely the Authentik server container starting successfully, but failing liveness while waiting for the worker container(s) that is definitely not spooling up with your current configuration.

    Something to denote about Authentik itself that won’t be well-explained by the quickstart for the Helm chart itself is that Authentik is split into two containers: server and worker. For most environment variabless and mounted secrets, both the server and worker definitions should have them applied. The chart tends to handle most of the essential shared stuff in the authentik block to prevent the duplication, but secrets will likely need to be mounted for both volumes if using file or env references in the shared config, as well as most env overrides will need to be applied for both.


  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•Authentik Helm woes
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 months ago

    In my case I’m running an external Postgres DB and external cache plus a handful of other settings. As such, I have a decently sized values file. All of the env vars I was looking for in my case are provided in the chart, so I didn’t need to set any directly, but just through their counterparts in the values file.

    I don’t use ArgoCD in my case, so I couldn’t really say if it would affect your deployment strategy in any way.


  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•Authentik Helm woes
    link
    fedilink
    English
    arrow-up
    3
    ·
    8 months ago

    When I did my authentik setup through helm chart a while back, the only real problems I had were with learning blueprints and not so much with getting Authentik to do its thing.

    The main things you should be checking given a liveliness probe failure is kubectl -n <namespace> describe pod <podname> to check the reason for failure. Additionally, kubectl logs -p -n <namespace> <podname> [container]. Will get you logs of the last run of the pod that has already failed, rather than the current run that may be soon to fail. Those two commands should point you pretty directly where your chart config has gone wrong. I can likely help as well if you are unsure what you are looking at.

    Additionally, once you get things working, please go back and usw secrets properly with the chart. Authentik lets you sub many values for env vars or files, which combined with mounting secrets is how you can use them.



  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•OpenWRT router
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    It does depend on the connection type, but the general rule is not completely, barring some connection types like DSL. Given it sounds like you have Fiber, DOCSIS, or similar; you likely fall under the general rule. That said, you can absolutely tune and test above the typical 10-15% safety margin many guides start with without actually incurring any noticeable bufferbloat. The 10-15% is usually a good value for ISPs that fluctuate heavily in available babdwidth to the customer, but for more consistent connections (or for those that overrate high enough that the bandwidth fluctuations sit out of range for what the customer is actually paying for), you can absolutely get much closer to your rated connection speed, if not meeting or even passing it.

    The general process is to tune one value at the time (starting with the bandwidth allocations for your pipes), apply the changes, noting the previous value, and performing a bufferbloat test with Waveform’s or others’ testing tools. Optionally, (this will drastically slow down the process, but can be worth it) one should actually hammer the network with actual load for a good few hours while testing some real-world applications that are sensitive to bufferbloat. Doing this between tweaked values will help expose how stable or unstable your ISP’s connection truly is over time.


  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•OpenWRT router
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    Yeah, not having cake sqm is the one thing that will probably kill Opnsense as a choice for some people. That’s not to say you cannot get excellent results with fq_codel, because you absolutely can (I actively use both OpenWRT and OPNSense on different network applications personally). It is definitely more work to get good results though. OPNSense’s wireguard support has been excellent for a number of years now, and it’s exclusively what I use for tunneling in a VPC I rent.

    If you’re particularly constricted on host hardware and need a lightweight router to manage multiple other VMs on said host, I could definitely see the benefits of running a minimal OpenWRT over OPNSense in that case.


  • jrgd@lemmy.ziptoSelfhosted@lemmy.world•OpenWRT router
    link
    fedilink
    English
    arrow-up
    7
    ·
    11 months ago

    I mean, the mini PCs don’t come with a managed switch, and often without good wireless connectivity that most home routers will come equipped with. So in total with Wi-Fi APs and a decent switch, definitely more than €100 in total.

    Also unrelated, but if you’re running a x86 system with gigabytes of RAM, why not run Opnsense at that point?