# Startscript for container in SSH Sandbox

**URL:** <https://community.homey.app/t/startscript-for-container-in-ssh-sandbox/100150>\
**Category:** Developers\
**Tags:** homey-pro\
**Created:** [January 5, 2024, 11:08pm UTC](https://community.homey.app/t/startscript-for-container-in-ssh-sandbox/100150 "2024-01-05T23:08:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_RB](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_rb/32/79349_2.png) [@Johan\_RB](https://community.homey.app/u/Johan_RB)\
**Post date:** [January 5, 2024, 11:08pm UTC](https://community.homey.app/t/startscript-for-container-in-ssh-sandbox/100150/1 "2024-01-05T23:08:35Z")

</div>

Hi!

I’m using the SSH Sandbox for the Homey Pro and runs some scripts in there which works great!

When the homey is restarted all the scripts are killed which is totally understandable. However, I’d like to run these scripts automatically on after a reboot, so do anyone know how to run for i.e. a bash script automatically after boot?

I’ve tried alot different approaches without getting it to work.

Thanks!

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 6, 2024, 7:06am UTC](https://community.homey.app/t/startscript-for-container-in-ssh-sandbox/100150/2 "2024-01-06T07:06:45Z")

</div>

Possibly by adding an s6 service in `/run/service`. See [this](https://skarnet.org/software/s6/servicedir.html) for more info.

---

<div class="post-metadata">

**Author:** ![cfeenz](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cfeenz/32/124386_2.png) [@cfeenz](https://community.homey.app/u/cfeenz)\
**Post date:** [April 6, 2025, 9:59am UTC](https://community.homey.app/t/startscript-for-container-in-ssh-sandbox/100150/3 "2025-04-06T09:59:45Z")

</div>

I’ve been trying to figure this out but can’t for the life of me. I just need to run a command at startup because every time I disconnect from SSH my program stops running.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [April 6, 2025, 10:01am UTC](https://community.homey.app/t/startscript-for-container-in-ssh-sandbox/100150/4 "2025-04-06T10:01:00Z")

</div>

> [@cfeenz](#):
>
> because every time I disconnect from SSH my program stops running.

Use [`nohup`](https://www.digitalocean.com/community/tutorials/nohup-command-in-linux)
