Skip to content

Instantly share code, notes, and snippets.

@rromanv
Last active July 23, 2022 02:06
Show Gist options
  • Save rromanv/9209f7dbe8985fd4fa3b0f574e3d037e to your computer and use it in GitHub Desktop.
Save rromanv/9209f7dbe8985fd4fa3b0f574e3d037e to your computer and use it in GitHub Desktop.

Frontend Server Setup and Deployment

Create Server

Digital Ocean, Welcome to the developer cloud. They make it simple to launch in the cloud and scale up as you grow—whether you’re running one virtual machine or ten thousand.

  1. Go to Digital Ocean with the previus link and create an account or Click this link for a $100 credit for 60 days (pretty much two months free)
  2. Create a $6 Droptlet with Ubuntu 22.04, selecting a temporary password option.
  3. Copy the IP Address when the server is created.
  4. Login to the server with Putty on Windows, or SSH with Powershell, or ssh command on mac
  5. ssh root@SERVER_IP_ADDRESS

Add domain to Digital Ocean

  1. DO Console click on DNS
  2. Add Site and point @ to server, change TTL to 30 for quick propagation (Change that back later)
  3. On your domain registrar (Probably GoDaddy)
  4. Change Name Servers to the One that DO Have
  5. Point Domain to Server

Update Server

  1. Update server components list with apt update
  2. Upgrade server components with apt upgrade
  3. Remove unused apps with apt autoremove

Add Normal Sudo User and disable Root remote Login

  1. adduser username Where username is the name that you want to use 1.1 Type password and information needed
  2. usermod -aG sudo username Where username is the user created in previous step
  3. Test user conenction exits the server and acces now with username instead of root
  4. Log back with root and execute sudo nano /etc/ssh/sshd_config
  5. Change PermitRootLogin yes to PermitRootLogin no and #PermitEmptyPasswords no to PermitEmptyPasswords no
  6. Exit and save with Ctrl+x and then Y and finally Enter
  7. Restart ssh with /etc/init.d/ssh restart
  8. Exit the server

Add Firewall

  1. Login with your username account (not root)
  2. Type sudo ufw status to view firewall status
  3. Install Firewall if is needed with sudo apt-get install ufw
  4. Enable Ports on Firewall:
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 3000
  1. Enable Firewall sudo ufw enable
  2. Type sudo ufw status to view firewall status

Install Docker

sudo apt install docker.io docker-compose -y

Install Coolify

Coolify Website

wget -q https://get.coollabs.io/coolify/install.sh -O install.sh; sudo bash ./install.sh

Navigate to http://SERVER_IP:3000

Follow Rest of Instructionf from https://youtu.be/CfdPyASUSkI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment