Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Lean server for backend applications?

  1. #1
    Join Date
    Oct 2023
    Beans
    4

    Question Lean server for backend applications?

    I am new to Linux. I want to set up the leanest possible Ubuntu LTS server but one that is just as secure as the bulky versions.
    Why LTS? In my understanding LTS is better than others. Correct me if I am wrong.
    I came across flavors like minimal Ubuntu, Ubuntu server & Alpine but I don't know how to proceed. In my understanding ubuntu server just lacks a GUI but is there a way to make it even more leaner by deleting some things that will not be useful in a backend server running Node/Java & relational db like MySQL?

    TLDR: How to set up a secure networking capable Ubuntu LTS server that can run JavaScript, Java & MySQL without having even one extra line of code than it truly needs.
    Last edited by monkey-learns-linux; October 3rd, 2023 at 10:26 PM.

  2. #2
    Join Date
    Oct 2023
    Beans
    4

    Question Lean server for backend applications?

    How can I make "ubuntu server" LTS version even leaner such that it is specific for backend apps like Java JavaScrpt & relational DB like MySQL? Just point me in the direction of knowledge.

  3. #3
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Lean server for backend applications?

    Why LTS? In my understanding LTS is better than others.
    I would not sat that. LTS = Long Term Support. With LTS we get 5 years support which can be extended for an additional 5 years the Extended Security Maintenance (ESM) which comes with sonething called Ubuntu Pro.

    https://ubuntu.com/pro

    Ubuntu LTS releases come out every two years in the April. So, 20.04 LTS (April 2020); 22.04 LTS (April 2022). The next Ubuntu LTS will be 24.04 LTS (April 2024).

    The Ubuntu releases that come out every six months in between those dates are only supported for nine months. I would not describe them as of lesser quality than an LTS release. Or, less stable. These standard support releases come with update drivers and upgraded applications. Over the life support time (5 years) of an LTS release it also is upgraded to the latest set of Linux drivers (called Linux firmware). We call these upgrades point releases. Right now I am running Ubuntu Desktop 20.04.6 which reaches end of support life in April 2025. I have signed up for Ubuntu Pro so I will get an additional 5 years support for 20.04. It is free for up to 5 machines.

    Oh, by the way, I do not think that Alpine Linux is classed as a flavour of Ubuntu even though it may be based upon Ubuntu code.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  4. #4
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Lean server for backend applications?

    Quote Originally Posted by monkey-learns-linux View Post
    How can I make "ubuntu server" LTS version even leaner such that it is specific for backend apps like Java JavaScrpt & relational DB like MySQL? Just point me in the direction of knowledge.
    If you want a light server, there are better distros, like alpine https://www.alpinelinux.org/ which is well under 50MB, not 2GB. Pick the right tool for the right job. Alpine comes with nothing extra. You have to install what you want/need.

  5. #5
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Lean server for backend applications?

    <<duplicate thread to: https://ubuntuforums.org/showthread.php?t=2491297>>
    As in nothing extra... Alpine is stripped of many of what I would consider basic Linux Utilities. I install what I need, when I need it.

    In his other thread with the same title in the "New To Ubuntu Section", you say you are a new user to Linux and are asking for recommendations on a what to do there also...
    Quote Originally Posted by monkey-learns-linux
    I am new to Linux. I want to set up the leanest possible Ubuntu LTS server but one that is just as secure as the bulky versions.
    Why LTS? In my understanding LTS is better than others. Correct me if I am wrong.
    I came across flavors like minimal Ubuntu, Ubuntu server & Alpine but I don't know how to proceed. In my understanding ubuntu server just lacks a GUI but is there a way to make it even more leaner by deleting some things that will not be useful in a backend server running Node/Java & relational db like MySQL?

    TLDR: How to set up a secure networking capable Ubuntu LTS server that can run JavaScript, Java & MySQL without having even one extra line of code than it truly needs.
    I do not think you have the knowledge or experience to choose Alpine and make it a success. I would recommend Ubuntu Server, installed as minimal.
    Last edited by MAFoElffen; October 4th, 2023 at 04:38 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  6. #6
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Lean server for backend applications?

    <<>duplicate thread of: https://ubuntuforums.org/showthread.php?t=2491299>

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  7. #7
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Lean server for backend applications?

    Quote Originally Posted by MAFoElffen View Post
    I do not think you have the knowledge or expereince to choose Alpine and make it a success. I would recommend Ubuntu Server, installed as minimal.
    Ah. If someone doesn't have a few years of Server experience, then alpine would be a challenge. But desire and passion can make up for all sorts of deficiencies.
    The learning curve on Ubuntu Server is steep enough for someone without at least a year experience at a terminal.

    There's a reason many of us here use Ubuntu Server - it tends to have slightly newer, but stable packages compared to Debian Stable. There are many nice packages installed to make life comfortable and it still provides the customization we need/want in a server. There are a few things in Ubuntu Server that I don't want installed too, so I remove them. What to remove is a matter of taste.

    If you remove too much, and break the system, you'll learn a bunch, so be certain you have snapshots or backups or better, both before heading that direction. If you don't have the skills do accomplish those things ... back up and learn those first. Then you can worry about removing packages and looking for negative impacts.

    My leanest ubuntu server
    Code:
    $ df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    lxd/containers/back18        30G  531M   30G   2% /
    So it is using 531MB of storage. That's an LXC container. LXC containers aren't a sparse as a Docker container. They have a different philosophy and use more storage. But once you care that much, it is time to move to something like alpine, IMHO.

    A stock Ubuntu 22.04 server, with snapd removed:
    Code:
    $ df -h
    Filesystem                Size  Used Avail Use% Mounted on
    /dev/mapper/vg--00-lv--0  9.8G  4.5G  4.8G  49% /
    /dev/vda2                 739M  400M  286M  59% /boot
    seems to use 5G of storage.

    So, if you want lean, use containers, not full installs.

  8. #8
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Lean server for backend applications?

    Threads merged since reply in both threads.

    Do not post duplicate threads. We all are volunteers and need to know what has already been suggested.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #9
    Join Date
    Oct 2023
    Beans
    4
    Quote Originally Posted by TheFu View Post
    If you want a light server, there are better distros, like alpine https://www.alpinelinux.org/ which is well under 50MB, not 2GB. Pick the right tool for the right job. Alpine comes with nothing extra. You have to install what you want/need.
    Is alpine linux less secure than "ubuntu server LTS" ? Will it have networking & backend applications capabilities? How can I learn about this? I dont even know how to go about learning this.

    Quote Originally Posted by MAFoElffen View Post
    <<duplicate thread to: https://ubuntuforums.org/showthread.php?t=2491297>>
    As in nothing extra... Alpine is stripped of many of what I would consider basic Linux Utilities. I install what I need, when I need it.

    In his other thread with the same title in the "New To Ubuntu Section", you say you are a new user to Linux and are asking for recommendations on a what to do there also...
    QUOTE=monkey-learns-linux;14159831]I am new to Linux. I want to set up the leanest possible Ubuntu LTS server but one that is just as secure as the bulky versions.
    Why LTS? In my understanding LTS is better than others. Correct me if I am wrong.
    I came across flavors like minimal Ubuntu, Ubuntu server & Alpine but I don't know how to proceed. In my understanding ubuntu server just lacks a GUI but is there a way to make it even more leaner by deleting some things that will not be useful in a backend server running Node/Java & relational db like MySQL?

    TLDR: How to set up a secure networking capable Ubuntu LTS server that can run JavaScript, Java & MySQL without having even one extra line of code than it truly needs.
    I do not think you have the knowledge or expereince to choose Alpine and make it a success. I would recommend Ubuntu Server, installed as minimal.[/QUOTE]

    I dont think I have the experience to make alpine a success either because like you assumed correctly, i dont know what I am doing. However, I want to know. So how can I know? Is there a way to cut Ubuntu server beyond minimal so that its specific for backend applications and relational db?

    Quote Originally Posted by TheFu View Post
    Ah. If someone doesn't have a few years of Server experience, then alpine would be a challenge. But desire and passion can make up for all sorts of deficiencies.
    The learning curve on Ubuntu Server is steep enough for someone without at least a year experience at a terminal.

    There's a reason many of us here use Ubuntu Server - it tends to have slightly newer, but stable packages compared to Debian Stable. There are many nice packages installed to make life comfortable and it still provides the customization we need/want in a server. There are a few things in Ubuntu Server that I don't want installed too, so I remove them. What to remove is a matter of taste.

    If you remove too much, and break the system, you'll learn a bunch, so be certain you have snapshots or backups or better, both before heading that direction. If you don't have the skills do accomplish those things ... back up and learn those first. Then you can worry about removing packages and looking for negative impacts.

    My leanest ubuntu server
    Code:
    $ df -h
    Filesystem                  Size  Used Avail Use% Mounted on
    lxd/containers/back18        30G  531M   30G   2% /
    So it is using 531MB of storage. That's an LXC container. LXC containers aren't a sparse as a Docker container. They have a different philosophy and use more storage. But once you care that much, it is time to move to something like alpine, IMHO.

    A stock Ubuntu 22.04 server, with snapd removed:
    Code:
    $ df -h
    Filesystem                Size  Used Avail Use% Mounted on
    /dev/mapper/vg--00-lv--0  9.8G  4.5G  4.8G  49% /
    /dev/vda2                 739M  400M  286M  59% /boot
    seems to use 5G of storage.

    So, if you want lean, use containers, not full installs.

    Great reply. I think I want to start from alpine because it will help me understand the things I will install. Like building legos. My question is how can I learn about what comes in alpine linux in-depth? I am starting my journey with linuxfromscratch.org so that should help me understand linux to some extent. My question is what do I do after that? Because my end goal is to make the leanest possible secure server.

    Quote Originally Posted by oldfred View Post
    Threads merged since reply in both threads.

    Do not post duplicate threads. We all are volunteers and need to know what has already been suggested.
    ok, i will not do that again. Thanks for merging it this time.

    One thing that is stuck in my head is "will alpine linux be as secure as Ubuntu?" Because Ubuntu has a corporation behind it that maintains it, it seems to be that it may be more secure because of faster updates. Do Ubuntu and alpine linux have the same security packages? Can I install ubuntu packages on alpine linux?

    I do not wish to trade security for size.
    Last edited by jeremy31; October 4th, 2023 at 11:35 AM.

  10. #10
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    5,033

    Re: Lean server for backend applications?

    Quote Originally Posted by monkey-learns-linux View Post

    I am new to Linux.
    I want to set up the leanest possible Ubuntu LTS server but one that is just as secure as the bulky versions.


    Those are opposites.

    If you are truly "new", then it is unlikely that you have the skills to accomplish a "leanest possible" install.
    And if you are experienced enough to accomplish "leanest possible", then you already know how much work that requires.

    Quote Originally Posted by monkey-learns-linux View Post
    In my understanding LTS is better than others. Correct me if I am wrong.


    Okay: You might be wrong. Keep an open mind. LTS and non-LTS each have different advantages and disadvantages. Neither is objectively "better" or "worse."

    Many "new" folks wipe and reinstall, sometimes several times as they
    learn. Your first install is unlikely to be your last.

    Quote Originally Posted by monkey-learns-linux View Post
    TLDR: How to set up a secure networking capable Ubuntu LTS server that can run JavaScript, Java & MySQL without having even one extra line of code than it truly needs.
    It will take you several weeks, perhaps months, to learn the skills required. There is no single path for everybody.

    General advice for new users: Make your install successful rather than perfect. Increment toward perfection as your skills improve. Re-evaluate what perfection should look like based upon your learning and experience.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •