-
Notifications
You must be signed in to change notification settings - Fork 12
Creating a New Server
Jason Kiesling edited this page Apr 8, 2020
·
3 revisions
- Obtain a server with Ubuntu 18.04.
- Update all packages to be the latest versions.
- Restrict SSH access to only authorized users.
- Create a new group via
sudo groupadd sshlogin
. - Add your account to the group via
sudo usermod -a -G sshlogin [username]
. - Edit
/etc/ssh/sshd/config
and add a line sayingAllowGroups sshlogin
. - Restart the SSH server via
sudo systemctl restart sshd
. - BEFORE EXITING SSH, in a new terminal test that your account can still SSH in.
- Create a new group via
- Create SSH key and add to GitHub.
- Clone all 3 repos via SSH.
- Add MYR firebase key config file.
- Install yarn.
- Run
yarn install
ornpm install
for all repos. - Install MongoDB.
- Install pm2
npm install pm2@latest -g
. - In the MYR-backend directory, run
pm2 start npm --name "MYR Beta Server" -- start
. - Install Nginx.
- Add Nginx configuration.
- Add SSL files.
- Restart Nginx.
- Run
pm2 startup
to get command to have pm2 run on boot. - Run
pm2 save
to save config.
MYR | MYR GitHub | ECG Website
General
Server Information