speckleworks / SpeckleServer

Check a brand new Speckle at: https://github.com/specklesystems
http://speckle.systems
MIT License
110 stars 29 forks source link

update readme - clarification on debian server setup #124

Closed MartinHenriksen closed 5 years ago

MartinHenriksen commented 5 years ago

this PR addresses #123 - very small changes to the readme

didimitrie commented 5 years ago

Hello Mr. @MartinHenriksen! Good to see you around these parts :) I've added some comments to the pr, let's see how we go about them!

MartinHenriksen commented 5 years ago

It looks like the the permissions of the SpeckleServer-folder is the reason sudo was required: image Would it be safe to give write access to the folder for non-root users? @didimitrie

logan12358 commented 5 years ago

It looks like you're trying to install things from a folder you don't have permissions for. These steps just worked on a fresh Debian 9 install:

As root:

  1. curl -sL https://deb.nodesource.com/setup_10.x | bash to get packages from NodeSource
  2. apt install mongodb redis-server nodejs git to install things
  3. adduser speckle to create a new user
  4. su - speckle to become the speckle user

As speckle:

  1. git clone https://github.com/speckleworks/SpeckleServer.git to get the SpeckleServer source
  2. cd ~/SpeckleServer
  3. npm install to get dependencies
  4. cp .env-base .env to get base configuration. Edit .env at this point.
  5. cd ~/SpeckleServer/plugins
  6. git clone https://github.com/speckleworks/SpeckleAdmin.git to get the admin interface
  7. git clone https://github.com/speckleworks/SpeckleViewer.git to get the 3D viewer
  8. cd ~/SpeckleServer
  9. npm start to start the server on port 3000
logan12358 commented 5 years ago

Note that those steps don't produce a "proper" deployment. You probably want to:

MartinHenriksen commented 5 years ago

@logan12358 you are right it does look like it is a problem with permissions, but I don't know how it should be resolved in a way that would work for all. I setup a Ubuntu instance on ec2 and in that case I would still need sudo to follow the steps you describe; even the adduser only works as sudo adduser. Maybe there is some note on deploying the instance that could help avoid the need for sudo

logan12358 commented 5 years ago

The first steps (under "As root") should be performed with root permissions, either by logging in as root or by using sudo. The steps after that can be performed as the new speckle user without permissions.

The steps performed with root permissions are unavoidable on Debian or Ubuntu, as they involve system-wide installations.

On Fri, Mar 8, 2019, at 12:07 PM, Martin B. Henriksen wrote:

@logan12358 https://github.com/logan12358 you are right it does look like it is a problem with permissions, but I don't know how it should be resolved in a way that would work for all. I setup a Ubuntu instance on ec2 and in that case I would still need sudo to follow the steps you describe; even the adduser only works as sudo adduser. Maybe there is some note on deploying the instance that could help avoid the need for sudo

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/speckleworks/SpeckleServer/pull/124#issuecomment-470737643, or mute the thread https://github.com/notifications/unsubscribe-auth/ABI9rqY92rgBA_992otjUm1T9E5V_ghrks5vUZuTgaJpZM4bj2Yi.

MartinHenriksen commented 5 years ago

updated instructions with inputs from @logan12358 and @didimitrie

MartinHenriksen commented 5 years ago

closing this as it is superseded by #126