Start an application using systemd

systemd is used to start applications on linux systems.

In this post, we will create an application and run start it on boot using systemd.

Lets create our sample application.

Add following content to the file and save.

You can start the application by running following command on terminal

this will run a simple web server on port 80. If you already have a web server running on port 80, change the port to another.

To stop web server, type CTRL+C.

Create Systemd service file

To manage this application using systemd, we need to create a service file.


systemd service file

Managing Systemd service

First you need to enable the service with

To start the service, run

To stop the service, run

To see status of the service, run

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *