VLClean Plain comparisons of self-hosted media tools

How to restart services via command line on a headless server

Learn how to restart a service from the command line on a headless server, with what to prepare, numbered steps, tool options and common mistakes.

By VLClean ยท

VLClean is published by the makers of Askarr and Watcharr, which are compared here alongside other tools.

Connect to the server from another computer with a terminal session, confirm the exact service name, check its status, run the restart command, then check the status and logs again to confirm it is running.

OptionWhat it does for this jobCost details
AskarrYou request a movie or show on Askarr, and your own Radarr and Sonarr add it. [1]The Free plan costs $0 and allows 10 requests a month. [1]
Remote terminal sessionLets you type restart and status commands on the server from another computer.not published
Server service managerStarts, stops and reports on services on the server, where your system provides one.not published

What you need before you start

A headless server has no screen or keyboard attached, so you manage it from another computer over a network connection. Before you restart anything, make sure you can reach the server from a terminal on your own computer and that you have an account with permission to manage services.

Write down the exact name of each service you may need to restart. Names are often short and case-sensitive, and restarting the wrong one can interrupt something else that is running.

Know where the service writes its log messages. A restart that fails usually leaves a clue there. Note the service's normal status now, so you have something to compare against after the restart.

Choose a time for the restart and tell anyone who uses the service that it will be briefly unavailable.

Step by step

  1. Connect to the server from your terminal using the account you normally use for administration.
  2. List the services on the server, or search the list for the name you wrote down, so you know the exact name.
  3. Check the current status of that service and note whether it is running, stopped or failing.
  4. Run the restart command for your service manager with the exact service name. On many Linux servers the service manager is systemctl, and the command is systemctl restart followed by the service name. Add administrator permission if the command needs it.
  5. Check the status again. Confirm it reports running and has not stopped soon after starting.
  6. Read the most recent log lines for the service to confirm it started without errors.
  7. Test the thing people use, such as opening its web page or running a quick check, before you close the session.

Tools that can do it

The direct route is a terminal session on the server, using the service manager that your system provides. The exact commands depend on your system, so check its manual for the restart, status and log commands.

Askarr is a hosted website that works with existing Radarr and Sonarr. [1] You request a movie or show on Askarr, and your own Radarr and Sonarr add it. [1] Askarr is a hosted website that works with existing Radarr and Sonarr, and you add it to them as an import list, not as an app on the server. [1]

No other tool is named here in detail. Before you rely on any other tool, check its documentation for restart, status and log commands, and confirm how it handles permissions and which account it runs under.

Common mistakes to avoid

Avoid restarting a service by a name you have not checked. A similar name can belong to another service, and the wrong restart can interrupt something people depend on.

Avoid restarting without reading the log first. If the service fails again right away, the log usually shows why, and repeated restarts can hide that clue.

Avoid skipping the status check after the restart. A command can finish without an error while the service stops moments later.

Avoid sharing one administrator login without a record of who made each change. Note the time and reason for each restart so the next person can follow what happened.

Frequently asked questions

How do you restart a service from the command line on a headless server?

Connect to the server from another computer with a terminal session, then find the exact service name. Check the service's current status, run its restart command with administrator permission if needed, and check the status again. Read the newest log lines to confirm the service started cleanly, and test the thing people use before you close the session.

Can Askarr restart services on a headless server?

Askarr is for requesting movies and shows, which your own Radarr and Sonarr then add. [1] Use the server's own command line for restarting a service, and keep those steps separate from any request tool. Check each tool's documentation before you rely on it for server maintenance.

Does Askarr connect to Radarr and Sonarr on the server?

Askarr never connects to your Radarr or Sonarr and never receives their API keys. [1] You add Askarr to Radarr and Sonarr one time as an import list, and they read your requests from it. [1] Nothing is installed on the server; you add Askarr in Radarr and Sonarr as an import list. [1]

What should be checked before restarting a service on a headless server?

Confirm the exact service name, note its current status, and read its recent log lines so you know what the restart might change. Make sure you have administrator access and that people who use the service know it will be briefly unavailable. Keep a short record of the time and reason for the restart so the change can be traced later.

Is Askarr free to try for requests?

The Free plan costs $0 and allows 10 requests a month. [1] You can also try the dashboard with a throwaway demo account and sample data without signing in. [1] The demo lets you see the request dashboard with sample data before you sign up for a plan.

The Free plan costs $0 and allows 10 requests a month. [1]

Try Askarr

Sources

  1. Askarr's own description of itself (the product of this site's publisher)

Related comparisons