-
Notifications
You must be signed in to change notification settings - Fork 12
Setting Up a Server
-Get a server with Ubuntu 18.04 LTS
-Create an account in your name
--sudo adduser [username]
--sudo usermod -aG sudo [username]
-Log in with your user account
-Delete the previous temporary account
-Create an app user
--sudo adduser app
--sudo usermod -aG sudo app
---Sudo is only on the app account to setup the system
-Install NVM
--https://github.com/creationix/nvm
---Follow prompts
----nvm install 10.9.0
----nvm use 10.9.0
-Install yarn
--https://yarnpkg.com/lang/en/docs/install/#debian-stable
-in /home/app
--git clone https://github.com/isensedev/MYR
--git clone https://github.com/jasondkiesling/MYR-backend
--git clone https://github.com/jasondkiesling/MYR-admin
-Follow install guides for MYR, the MYR backend, and the MYR admin portal.
-Install nginx
--https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
--Add SSL certs
--redirect port 80 to 443
---Use server config from https://github.com/jasondkiesling/MYR-backend/wiki/NGINX-Config (copy source)
-Check UFW rules
-Install PM2
--http://pm2.keymetrics.io/docs/usage/quick-start/
---Be sure to do a global install.
--pm2 start npm --name "MYR-dev-backend" -- run start
---Change name to whatever name you want
-Restrict SSH login to only personal accounts
--sudo nano /etc/ssh/sshd_config
-Add line "AllowGroups sshlogin"
sudo groupadd -g 00408 sshlogin
-
sudo usermod -aG sshlogin [username]
for each user allowed to SSH sudo systemctl restart sshd
-Remove the app user from sudo --sudo deluser app sudo
MYR | MYR GitHub | ECG Website
General
Server Information