I have an old ThinkPad 11e running Debian that I have repurposed into a home server. It’s only supposed to run TVheadend. I don’t need any other services for now, but later on i might add a few using docker.

Is it enough to set multiuser.target as default to disable gui and keep the system always on?

How can I disable all unnecessary services and minimize power usage?

24 points

In case you didn’t already do that: remove the battery. It’s probably dead anyway, you don’t need it and it poses a potential (albeit low) risk.

permalink
report
reply
8 points

Depends. Usually it is still good as a UPS for a few minutes, and some laptops have a bios option to limit full charge which lowers the risk even further.

permalink
report
parent
reply
2 points

And how much need is there for a UPS in this scenario - realistically.

Some of the people here take their admin-LARPing a tad too seriously. Most households have reliable enough electricity, and even if there’s an outage once every quarter, would a dead battery even help?

I advocate for being realistic with one’s own needs. Don’t build a five-nines datacenter for a glorified weather station or VCR.

permalink
report
parent
reply
14 points

The nice thing about some battery backup is not keeping it running during an outage, but safely shutting it all down.

I agree on the laptop battery, I’m just disagreeing on battery backup. It serves a purpose, as does decent surge elimination.

permalink
report
parent
reply
7 points

Most households have reliable enough electricity

US defaultism in action, it seems.

permalink
report
parent
reply
5 points
*

That is why I said it depends. There are many places where electricity cuts for a short duration are quite frequent. Often you don’t even notice it, but a 24/7 server would be effected.

In general, I think the risk of laptop batteries catching fire is overstated especially if you limit the charge to 80% or so. So weighting these two issues against each other you can come out either way, but I think for most places it will come down towards a UPS being nice to have.

permalink
report
parent
reply
2 points

Thanks. Yeah I’ll do that. Is it also possible to enable auto power on after power outage and restore? My celeron mini pc has this feature.

permalink
report
parent
reply
1 point

That’s typically a feature for servers or business desktops. Maybe your laptop has it, just look into the BIOS.

As I wrote in my other comment: try to be realistic about your needs. Chances are, pressing the power button every few months (if at all) is perfectly fine for your use case (and most others here).

permalink
report
parent
reply
12 points

I would just do a minimal reinstall if you had used this as a personal computer OS before

And also take the battery out

permalink
report
reply
7 points
*

I usually do the expert install and don’t install a graphical environment in the first place. But your solution should be fine, too. I think you can show running services with systemctl and then disable unneeded ones. For example systemctl disable gdm but there shouldn’t be that much running on a plain Debian anyways.

For powersave I run powertop in auto-tune mode as a systemd service. A description is here: https://wiki.archlinux.org/title/Powertop

Unfortunately, the Debian Wiki doesn’t seem to have a lot on laptop power saving. The Arch wiki has some more (random) info: https://wiki.archlinux.org/title/Power_management

I’d say do the powertop systemd service on startup, set the multiuser target or disable the login manager and that’s it.

permalink
report
reply
4 points

The easiest way to disable unnecessary services is to uninstall them with aptitude, or whichever package manager you like. Try terminating services one by one, and see if anything bad happens. If nothing bad happens, you can probably uninstall it. On the other hand, if the system does get wonky a reboot should fix it. Or, you can research the services by name and decide whether to uninstall them. (avahi-daemon for example is a good idea to uninstall.)

To make the GUI not run, uninstall your display manager (gdm, xdm, nodm, or whatever) and uninstall your xorg server or wayland server. There may be GUI programs remaining after that, but they will only be consuming disk space, not RAM or CPU.

If the battery is old and holds little charge, you may save a few watts by removing it and throwing it away, instead of letting the system keep it topped off.

Get a power meter, such as a Kill-a-watt device. Then, experiment with different settings. If it’s consuming less than 30 watts, you’re probably fine. If you live in the US, one watt-year is about one US dollar (or a little more), so for every watt it consumes, that’s about how much you will pay per year for its electricity.

permalink
report
reply
1 point

Thanks. I installed Cockpit and disabled a couple of unnecessary services.

permalink
report
parent
reply
4 points

Disable unused interfaces in BIOS.

Netinstall with only basic utilities.

Reduce Debian

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5.2K

    Monthly active users

  • 1.8K

    Posts

  • 19K

    Comments