Autostart – How to run a service on linux boot time using systemd

The easiest way to start a service on linux boot time is to use system and service manager called systemd. Let’s see how to autostart docker container on linux boot time.

Step 1 – Prepare *.service file

Prepare my-service.service  file:

using following template:

Step 2 – enable and start your service

Starting and stopping service:

Service status:

Enable start on boot time:



Run docker service on linux boot time

Prepare my-docker-service.service  file:

with following content:

Enable service on boot time and start it:



Leave a Reply

Feel free to ask me about anything!

Notify of