• 0 Posts
  • 15 Comments
Joined 1 year ago
cake
Cake day: August 15th, 2023

help-circle
  • Something like that indeed.
    Every active network connection, every process, every piece of hardware and others are in your file system.
    Then there’s also the possibility for linking to a file and links take up no space, but can show up like files.
    You can use a command like ‘stat’ to get more information about a file (or directory).


  • Something to realise when starting with Linux is that everything is a ‘file’. Sockets, processes, input, output etc. That’s very different from Windows and part of why scripting on Linux is so powerful. You can interact with anything.
    So some directories are filled with things that aren’t necessarily files but look like it. Someone else posted a whole list, just realise that under those directories/paths shouldn’t be messed with unless you know what it’s for.
    Generally when you’re getting used to Linux, /home/$user (aka ~) is where you put personal things. The rest is managed by OS and applications, don’t worry about it.
    Edit: spelling


  • forwardvoid@feddit.nltoSelfhosted@lemmy.worldHosting websites over 4g
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    10 months ago

    If you’re hosting websites and not applications, perhaps you can use SSGs like Hugo/Gatsby. You could deploy your site in a bucket and put cloudflare in front. They can also be used on your own server of course. If you are hosting applications and want to keep them on 4g, you could put a CDN (CloudFlare or …) in frint of it. That would cache all static resources and greatly improve response times.


  • forwardvoid@feddit.nltoSelfhosted@lemmy.worldHosting websites over 4g
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    10 months ago

    If you’re hosting websites and not applications, perhaps you can use SSGs like Hugo/Gatsby. You could deploy your site in a bucket and put cloudflare in front. They can also be used on your own server of course. If you are hosting applications and want to keep them on 4g, you could put a CDN (CloudFlare or …) in frint of it. That would cache all static resources and greatly improve response times.



  • Portainer + caddy + watchtower, this will give you the benefits of containers without the complexity of Kubernetes. As someone who professionally works with Kubernetes, I agree with what other people have said here: “only run it if you want to learn it for professional use”.

    Portainer is a friendly UI for running containers. It supports docker compose as well. It helps with observability and ops.
    Caddy is an easy proxy with automatic Let’s Encrypt support.
    Watchtower will update and restart your containers if there’s an update.
    (Edit: formatting)






  • Yeah the 300meg isn’t going to get much less. Switching to Debian won’t change much there. Perhaps you can look into running a minimalist container distro if you are just using the machine for that. I personally want to check out Talos, there’s also RKE and Burmilla. No experience with them, to me the memory doesn’t matter much because I run a homelab. So I currently just run Debian and k3s. On my systems the containers are actually what gobbles up all the memory. If you’re using public container images, there’s a good chance the memory configuration on them isn’t optimal. Especially JVM services are a lot of the time configured to just use whatever is available. If you give them less memory they will do more garbage collection. So if CPU is less an issue then mem, that could be worth looking into (it’s just parameters you can pass on startup). Hopefully any of this is of use. Good luck :)


  • In my experience kernel tweaks aren’t going to be a major change on memory usage. Most distros are meant to be full featured and not necessarily lightweight. So unless you are already running a minimalist distro, make sure you don’t have bunch of background services running you don’t need. I can recommend using Debian Minimal iso’s, they require 256MB of mem. Depending on what features you enable you could use a lot more.


  • My 2c, buy RPi’s because what makes them so great is the availability of drivers and information. You will end up paying with your time if you try to save some money up front. I had several OPi, one randomly started throwing errors. After several reinstalls with various sd card, the information I could find was that the SoC itself was causing the errors. Also getting any hardware to work with it is just a major pain, driver support is severely lacking. Support for the Linux versions is community driven, so you’re dependent on Armbian maintainers. If you have a very new or an older board, you’re probably out of luck when you want to do anything outside of Linux. Example, I could not get a camera and BT module working. I later bought a RPi4 and had the same hardware working within hours.