Jump to content

Start server remotely

Go to solution Solved by m9x3mos,
19 hours ago, Needfuldoer said:

Barely any electricity. An idling laptop should only draw 10 watts or less with the screen off.

 

Let's say the laptop does draw 10 watts at idle. That's 1 kilowatt-hour for every 100 hours of run time, or 7.2 kWh in a 30-day month. At the US average of $0.23/kWh, that's $1.66/mo to simply leave the laptop turned on 24/7. That's splitting hairs; any alternate solution would either eat all your power savings or take an eternity to save you enough to make up its purchase price.

 

Don't worry about leaving it running! It's fine. 🙂 

Unless wake on Lan is an option if it has it. 

I have been doing that with my work laptop that is a Dell and it works great. And with my home lab servers too. 

I use an asus router that I VPN to when I'm not home and use that to send the wake on Lan command. 

Worth at just checking even if it don't save a lot of money. 

A laptop running 24/7 will clog to cooler quicker so be sure to clean it out frequently if you do that. 

I have a old laptop that I use as a Ubuntu server for developing node.js projects and learning about Linux servers. I don't want to have the server always on as that would be a waste of electricity. I can close the server by ssh but not start by my knowledge. Are there any ways to start a server remotely?

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/
Share on other sites

Link to post
Share on other sites

Something has to be on and ready to recive a signal to power on other things.

 

One option is Wake On Lan which may not be available in the laptop's BIOS and may not work as expected even if it is.

 

Another option might be a remote controlled socket.

 

An idle laptop shouldn't draw that much power though.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16010459
Share on other sites

Link to post
Share on other sites

2 hours ago, ArchitectTim said:

I don't want to have the server always on as that would be a waste of electricity

Barely any electricity. An idling laptop should only draw 10 watts or less with the screen off.

 

Let's say the laptop does draw 10 watts at idle. That's 1 kilowatt-hour for every 100 hours of run time, or 7.2 kWh in a 30-day month. At the US average of $0.23/kWh, that's $1.66/mo to simply leave the laptop turned on 24/7. That's splitting hairs; any alternate solution would either eat all your power savings or take an eternity to save you enough to make up its purchase price.

 

Don't worry about leaving it running! It's fine. 🙂 

I sold my soul for ProSupport.

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16010524
Share on other sites

Link to post
Share on other sites

19 hours ago, Needfuldoer said:

Barely any electricity. An idling laptop should only draw 10 watts or less with the screen off.

 

Let's say the laptop does draw 10 watts at idle. That's 1 kilowatt-hour for every 100 hours of run time, or 7.2 kWh in a 30-day month. At the US average of $0.23/kWh, that's $1.66/mo to simply leave the laptop turned on 24/7. That's splitting hairs; any alternate solution would either eat all your power savings or take an eternity to save you enough to make up its purchase price.

 

Don't worry about leaving it running! It's fine. 🙂 

Unless wake on Lan is an option if it has it. 

I have been doing that with my work laptop that is a Dell and it works great. And with my home lab servers too. 

I use an asus router that I VPN to when I'm not home and use that to send the wake on Lan command. 

Worth at just checking even if it don't save a lot of money. 

A laptop running 24/7 will clog to cooler quicker so be sure to clean it out frequently if you do that. 

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16012073
Share on other sites

Link to post
Share on other sites

2 hours ago, m9x3mos said:

Unless wake on Lan is an option if it has it. 

I have been doing that with my work laptop that is a Dell and it works great. And with my home lab servers too. 

I use an asus router that I VPN to when I'm not home and use that to send the wake on Lan command. 

Worth at just checking even if it don't save a lot of money. 

A laptop running 24/7 will clog to cooler quicker so be sure to clean it out frequently if you do that. 

It has the option for wake on LAN in the bios. If I enable that it would just start if I connect to it by ssh? (If so that would be perfect)

Other question: I am trying to create a little home lab myself with old laptops(I don't have much budget). I want't to create a completely separate wifi network for my home lab and my home wifi so that if I do something wrong or get a virus in my home lab(port forwarding etc) it does not damage the rest of the devices in my home. Do you know if this is possible and if yes how? I have asked this question also here: 

 

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16012194
Share on other sites

Link to post
Share on other sites

19 hours ago, ArchitectTim said:

It has the option for wake on LAN in the bios. If I enable that it would just start if I connect to it by ssh? (If so that would be perfect)

Other question: I am trying to create a little home lab myself with old laptops(I don't have much budget). I want't to create a completely separate wifi network for my home lab and my home wifi so that if I do something wrong or get a virus in my home lab(port forwarding etc) it does not damage the rest of the devices in my home. Do you know if this is possible and if yes how? I have asked this question also here: 

 

Not with ssh only. It needs to be a special packet to wake it up. 

There are plenty of free applications that can send these packets if the router doesn't. 

As far as an isolated network that gets a bit more compared as you would need two seperate routers connected to the modem to do it cheaply if your modem can handle that. Would be the easiest first guess I have but I really haven't looked into it. 

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16013406
Share on other sites

Link to post
Share on other sites

On 6/30/2023 at 9:00 AM, ArchitectTim said:

I want't to create a completely separate wifi network for my home lab and my home wifi so that if I do something wrong or get a virus in my home lab(port forwarding etc) it does not damage the rest of the devices in my home. Do you know if this is possible and if yes how?

VLAN


But I think you'd be better off just renting a low cost VPS...

Something like this:

https://cloudserver.net/billing/index.php?rp=/store/custom-packages/leb-1gb-annual-plan

image.png.e050cee1101f8603f24b9645bc77aaf5.png

* you can update it to latest LTS release easily after installation.

 

Pros:

- You don't have to worry about securing your home network

- Dedicated IPv4
- Doesn't require your hardware or your internet bandwidth

- Doesn't use your electricity, might even be cheaper... this is less than 1$ a month.
Though, not that it matters much if you will be paying ~0.8$ for VPS or ~1.6$ for electricity monthly.


Cons:
- Less RAM, compute power and storage compared to your laptop for sure...
but depending on what you are planning on running, it can easily be more than enough.

Here is one of mine running WireGuard, Apache and a Discord bot (Node.js):
image.png.6d7fffbc388fb16ada71c75c49b5c252.png

 

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16013945
Share on other sites

Link to post
Share on other sites

18 hours ago, Biohazard777 said:

VLAN


But I think you'd be better off just renting a low cost VPS...

Something like this:

https://cloudserver.net/billing/index.php?rp=/store/custom-packages/leb-1gb-annual-plan

image.png.e050cee1101f8603f24b9645bc77aaf5.png

* you can update it to latest LTS release easily after installation.

 

Pros:

- You don't have to worry about securing your home network

- Dedicated IPv4
- Doesn't require your hardware or your internet bandwidth

- Doesn't use your electricity, might even be cheaper... this is less than 1$ a month.
Though, not that it matters much if you will be paying ~0.8$ for VPS or ~1.6$ for electricity monthly.


Cons:
- Less RAM, compute power and storage compared to your laptop for sure...
but depending on what you are planning on running, it can easily be more than enough.

Here is one of mine running WireGuard, Apache and a Discord bot (Node.js):
image.png.6d7fffbc388fb16ada71c75c49b5c252.png

 

I have rented a vps before, but it was 5 euro's a month and it only had problems. I could not get ssl to work and could not get the domain name connected that I bought sepretly. 10 euro a year is a lot cheaper and I don't need a lot of performance. I will look into this, thanks for the tip. 

Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16015076
Share on other sites

Link to post
Share on other sites

On 6/30/2023 at 6:34 AM, m9x3mos said:

Unless wake on Lan is an option if it has it. 

I have been doing that with my work laptop that is a Dell and it works great. And with my home lab servers too. 

I use an asus router that I VPN to when I'm not home and use that to send the wake on Lan command. 

Worth at just checking even if it don't save a lot of money. 

A laptop running 24/7 will clog to cooler quicker so be sure to clean it out frequently if you do that. 

Thanks for the tip that I should use wake on LAN. If anyone else wants to do this I have followed this tutorial: https://www.golinuxcloud.com/wake-on-lan-ubuntu/. It does exactly what I wanted it to do. 

---

Update:

I have had some problems with getting wake on LAN to work. First problem was that you need to connect the device directly to the router. The ethernet connection can not go to a switch when I tested it. 

The second problem was that it whould not work if I had the lid closed. I have had a long discusion about it on this forum: https://ubuntu-mate.community/t/wake-on-lan-persistance-issues-22-04/25600?u=architecttim

My solution was in the end to just leave the lid open and use the setterm command to automatically set the screen to dark after 2 min. 

 

Edited by ArchitectTim
Link to comment
https://linustechtips.com/topic/1516267-start-server-remotely/#findComment-16015153
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×