---
title: "How do I run a daemon with my script?"
url: "https://ploi.io/documentation/server/how-do-i-run-a-daemon-with-my-script"
published: "2020-05-13"
last_updated: "2020-10-27"
---

# How do I run a daemon with my script?

In order for you to run a script as daemon you can easily create a bash file and run that. Let's take Laravel Echo Server in this example.

Create a new script called **socket.sh** and enter these contents:

```
#!/usr/bin/env bash

laravel-echo-server start
```

Then you can run that script in your daemons tab, just enter the path like: /home/ploi/domain.com/socket.sh:

[![](https://ploi.io/storage/9oc1FOicqH2HtLzConIS3LQEVegNG2eHh3zs6Xhi.png)](https://ploi.io/storage/9oc1FOicqH2HtLzConIS3LQEVegNG2eHh3zs6Xhi.png)