# Plexamp headless closes when I close putty

**URL:** <https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011>\
**Category:** Plex Labs\
**Tags:** plexamp\
**Created:** [July 21, 2023, 7:28pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011 "2023-07-21T19:28:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhintintin](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rhintintin](https://forums.plex.tv/u/rhintintin)\
**Post date:** [July 21, 2023, 7:28pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/1 "2023-07-21T19:28:02Z")

</div>

I’m having fun sorting out the headless app. This, I’m hoping is the simplest of the issues i’ve encountered.

Plexamp headless is installed, it runs, it works. wooohooo!! However… I’m connecting via ssh using putty. So far so great. Except if I close putty, the headless app drops.

What can I do to stop this? And is there a way i can add this to start automatically on system startup

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 21, 2023, 8:00pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/2 "2023-07-21T20:00:02Z")

</div>

It needs to run as a service, see [Plexamp on the Raspberry Pi](https://forums.plex.tv/t/plexamp-on-the-raspberry-pi/791500)

---

<div class="post-metadata">

**Author:** ![rhintintin](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rhintintin](https://forums.plex.tv/u/rhintintin)\
**Post date:** [July 21, 2023, 8:35pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/3 "2023-07-21T20:35:31Z")

</div>

Hmm. I think I’ve done something a bit odd when I installed. I’m not on a Pi though I don’t think that should matter. The installation path is different but I’ve accounted for that when copying the service.

Not sure if this is where I’m having the problem.  
4. Install the Plexamp service if you feel like having it start on boot (and why wouldn’t you?). CTRL-C out of the foreground running Plexamp and do this:

so I’ve got the headless running and then hit ctrl-c at that point the headless instance stops. Is that then causing be a problem copying the service over?

---

<div class="post-metadata">

**Author:** ![rhintintin](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rhintintin](https://forums.plex.tv/u/rhintintin)\
**Post date:** [July 21, 2023, 8:43pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/4 "2023-07-21T20:43:19Z")

</div>

Damn, wait, i rekon issue is in the plexamp.service file presumably in exec start. i can’t seem to work out how to format the line so it will work though. but it was pointing to somewhere where index.js isn’t. It’s in two parts, is that right?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 21, 2023, 8:57pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/5 "2023-07-21T20:57:00Z")

</div>

> [@rhintintin](#):
>
> It’s in two parts, is that right?

I don’t know what that means, but I highly recommend installing it in the default place, especially if you’re not a systemd expert 😅

---

<div class="post-metadata">

**Author:** ![odinb1](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@odinb1](https://forums.plex.tv/u/odinb1)\
**Post date:** [July 21, 2023, 9:08pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/6 "2023-07-21T21:08:51Z")

</div>

If you want to, you can install it [via a script](https://github.com/odinb/bash-plexamp-installer).

---

<div class="post-metadata">

**Author:** ![rhintintin](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rhintintin](https://forums.plex.tv/u/rhintintin)\
**Post date:** [July 21, 2023, 9:22pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/7 "2023-07-21T21:22:50Z")

</div>

I just mean the address in that line was split, a space between the two parts of execstart

WorkingDirectory=/plexamp  
ExecStart=/home/chris /plexamp/js/index.js  
Restart=on-failure

I’ll have another crack reinstalling. I followed a different guide originally because I’m not using a pi. But looking at the guide again I must just have misunderstood how to install it… hopefully I can manage it!

---

<div class="post-metadata">

**Author:** ![rhintintin](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rhintintin](https://forums.plex.tv/u/rhintintin)\
**Post date:** [July 21, 2023, 9:24pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/8 "2023-07-21T21:24:11Z")

</div>

Cool. I might try that on the other hardware that I’m trying to install on, given that script looks to install node16 and my system is stubbornly refusing to do so and is stuck on 12.

---

<div class="post-metadata">

**Author:** ![Ryuzaki\_2](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ryuzaki_2/32/211321_2.png) [@Ryuzaki\_2](https://forums.plex.tv/u/Ryuzaki_2)\
**Post date:** [July 21, 2023, 9:26pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/9 "2023-07-21T21:26:37Z")

</div>

The script is the way.

---

<div class="post-metadata">

**Author:** ![rhintintin](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@rhintintin](https://forums.plex.tv/u/rhintintin)\
**Post date:** [July 21, 2023, 9:38pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/10 "2023-07-21T21:38:11Z")

</div>

yes it was! I still needed to manually copy plexamp.service possibly because there was a version already there. But afterwards it’s up and running! Obliged!

---

<div class="post-metadata">

**Author:** ![odinb1](https://avatars.discourse-cdn.com/v4/letter/o/ecccb3/32.png) [@odinb1](https://forums.plex.tv/u/odinb1)\
**Post date:** [July 21, 2023, 10:30pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/11 "2023-07-21T22:30:09Z")

</div>

> [@rhintintin](#):
>
> Cool. I might try that on the other hardware that I’m trying to install on, given that script looks to install node16 and my system is stubbornly refusing to do so and is stuck on 12.

As long as it is Debian, the script will fix the node-issue!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [October 19, 2023, 10:30pm UTC](https://forums.plex.tv/t/plexamp-headless-closes-when-i-close-putty/848011/12 "2023-10-19T22:30:43Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
