moon indicating dark mode
sun indicating light mode

Preparing droplet for phoenix app deployment

April 01, 2020

Droplet and user creation

  1. Set up ssh key access
  2. add user adduser web
  3. add newly created user to sudoers group usermod -aG sudo web
  4. make web sudoer without password echo "web ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/web
  5. allow SSH connections for the firewall ufw allow OpenSSH
  6. Enable firewall ufw enable
  7. copy ssh keys for authorization for new user(web) rsync --archive --chown=web:web ~/.ssh /home/web
  8. connect to droplet as user web

Installing dependencies (erlang, elixir, etc)

  1. install erlang and elixir
wget && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang
sudo apt-get install elixir

Installing nginx

  1. install ngixn
sudo apt update
sudo apt install nginx
  1. add to firewall
sudo ufw allow 'Nginx Full'
  1. test the server by accessing server

you should see welcome to nginx

Hi 👋🏻, I'm Askar - Software Developer from Munich
I'm currently working with Typescript/React/NodeJS, learning Elixir and some Ops