{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/1103","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/1103/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/1103/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/1103/events","html_url":"https://github.com/Unitech/PM2/issues/1103","id":62476390,"number":1103,"title":"Deploying with sudo","user":{"login":"webchaz","id":1342709,"avatar_url":"https://avatars.githubusercontent.com/u/1342709?v=3","gravatar_id":"","url":"https://api.github.com/users/webchaz","html_url":"https://github.com/webchaz","followers_url":"https://api.github.com/users/webchaz/followers","following_url":"https://api.github.com/users/webchaz/following{/other_user}","gists_url":"https://api.github.com/users/webchaz/gists{/gist_id}","starred_url":"https://api.github.com/users/webchaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webchaz/subscriptions","organizations_url":"https://api.github.com/users/webchaz/orgs","repos_url":"https://api.github.com/users/webchaz/repos","events_url":"https://api.github.com/users/webchaz/events{/privacy}","received_events_url":"https://api.github.com/users/webchaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T18:21:03Z","updated_at":"2015-03-19T14:43:15Z","closed_at":null,"body":"Is there a way when using deploy to have actions executed with sudo? for example using AWS and running `pm2 deploy ecosystem.json5 production setup` locally (for remote server on aws) doesn't work, since aws requires use of sudo."},"comment":{"url":"https://api.github.com/repos/Unitech/PM2/issues/comments/83612696","html_url":"https://github.com/Unitech/PM2/issues/1103#issuecomment-83612696","issue_url":"https://api.github.com/repos/Unitech/PM2/issues/1103","id":83612696,"user":{"login":"klinquist","id":1343376,"avatar_url":"https://avatars.githubusercontent.com/u/1343376?v=3","gravatar_id":"","url":"https://api.github.com/users/klinquist","html_url":"https://github.com/klinquist","followers_url":"https://api.github.com/users/klinquist/followers","following_url":"https://api.github.com/users/klinquist/following{/other_user}","gists_url":"https://api.github.com/users/klinquist/gists{/gist_id}","starred_url":"https://api.github.com/users/klinquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinquist/subscriptions","organizations_url":"https://api.github.com/users/klinquist/orgs","repos_url":"https://api.github.com/users/klinquist/repos","events_url":"https://api.github.com/users/klinquist/events{/privacy}","received_events_url":"https://api.github.com/users/klinquist/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T14:43:15Z","updated_at":"2015-03-19T14:43:15Z","body":"AWS doesn't require sudo...  The key is running PM2 as a user (such as 'ubuntu').\r\nOn a new AWS instance, I do the following:\r\n\r\n1) npm config set prefix ~\r\n2) (Add /home/ubuntu/bin to the path in /etc/environment)\r\n3) npm install pm2 -g\r\n3) pm2 startup ubuntu -u ubuntu\r\n\r\nNow pm2 should be able to run just fine without sudo."}}