Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Run a systemd service as a user
# How to create systemd services:
# Digital ocean on a mongodb service:
Description=Run SystemD as users
WorkingDirectory=[USER HOME]
ExecStart=/bin/bash --login -c 'source [USER_HOME]/.bashrc; cd [Directory of command] && [COMMAND TO RUN]'
Copy link

alexbuzzbee commented Feb 27, 2019

PR: this fork contains a number of simplifications.

Copy link

blakec-som commented Oct 26, 2022

Thanks, needed to see how to run a service as a user and this worked when other suggestions didn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment