Maintaining Ubuntu Droplet
by John Vincent
Posted on May 12, 2018
This is part of a series of discussions regarding Deploying to a Digital Ocean Droplet.
For more details, please see Deploy TaskMuncher
Maintaining Ubuntu Droplet
Update Npm
sudo npm install -g npmUpdate Ubuntu
sudo apt-get updatedid not retrieve any updates, just gets package information.
sudo apt-get dist-upgrade
older dist:
sudo apt-get upgradecontinue?
YA new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.
Keep the local version currently installed.Then restart the droplet
Restart the droplet
sudo rebootShutdown / Restart Droplet
Login to digitalocean.com
Select droplet
Console:
login as root
shutdown -h nowThis will shut down your operating system, flush any pending changes to the disk, and then terminate power to your server.
Visit the control panel and select the option to power on your Droplet.
Verify droplet is not running
- Dashboard
- Access
- Launch Console
- Verify droplet is not running.
To start the droplet
- Dashboard
- Power
- Power cycle
Verify droplet is running
- Access
- Launch Console
- Login to verify droplet is running.
Renew SSL Certificates
See Update SSL Certificates to Ubuntu at Digital Ocean
Nginx
Restart Nginx
nginx-restartor
sudo nginx -t
sudo systemctl restart nginxStop Nginx
sudo nginx -t
sudo systemctl stop nginxTroubleshooting
Verify running
ps -ef | grep nginxCheck Nginx enabled servers
cd /etc/nginx/sites-enabled
ls -laEnable https
enable-httpsEnable http
enable-httpPM2
To restart PM2
pm2 restart allTo setup PM2 for the application
handle-pm2Status
pm2 listand then pm2 show {id}, which provides details about the task. Notice the logs
PM2 Logs
Check the logs
/home/jv/.pm2/logs/*
/home/jv/.pm2/pm2.logPM2 Other
pm2 monitswap
sudo swapon --summary
free -hLogs
Nginx logs /var/log/nginx
Check for bots
sudo vi /var/log/access.logand
sudo vi /var/log/error.logcan sometimes have messages of some interest.
Firewall
May need to change the firewall
sudo ufw deny from XXX.XXX.XX.XXList Rules
sudo ufw status numberedDigital Ocean
- Building and deploying MyTunes to johnvincent.io
- Building and deploying React Github Helper App to johnvincent.io
- Configuring Google Domains
- Create Ubuntu Droplet at Digital Ocean
- Create Ubuntu Droplet at Digital Ocean
- Deploy Feediator to Digital Ocean
- Deploy to Droplet
- Feediator Overview
- Feediator Project
- Maintaining Ubuntu Droplet
- Maintaining Ubuntu Droplet
- Overview of Deployment of a Node API Server
- Overview of johnvincent.io
- Overview of johnvincent.io Jekyll website
- Overview of React Gomoku
- Overview of React Hangman
- Overview of React Lights Out
- Overview of React Yahtzee
- TaskMuncher Overview
Taskmuncher
- Backup TaskMuncher from Digital Ocean
- Configure HTTP Nginx
- Configure HTTPS Nginx
- Configuring Google Domains
- Configuring Meta Tags
- Create Site Map
- Create SSL Certificates
- Create Ubuntu Droplet at Digital Ocean
- Deploy TaskMuncher React App to AWS
- Facebook Application Id
- First time deploy TaskMuncher React App to Digital Ocean
- Google Analytics for TaskMuncher
- Google Authentication
- Google Gmail Configuration
- Google Webmaster Tools
- Install Ubuntu Mongo
- Install Ubuntu Nginx
- Mailgun
- Maintaining Ubuntu Droplet
- Material-UI Showcase
- Optimizing TaskMuncher with Webpack 4
- React Production Issues
- TaskMuncher Images and Favicons
- TaskMuncher Overview
- TaskMuncher Performance
- TaskMuncher Website Validation
- Update SSL Certificates
- Update TaskMuncher for Lighthouse Findings
- Update TaskMuncher to be a Progressive Web App
- Update TaskMuncher to use React BrowserRouter
- Update TaskMuncher to Webpack v4, Babel v7, Material-UI v3
Ubuntu
- Configure HTTP Nginx
- Configure HTTP Nginx
- Configure HTTPS Nginx
- Configure HTTPS Nginx
- Configure PM2
- Create SSL Certificates
- Create SSL Certificates
- Create Ubuntu Droplet at Digital Ocean
- Create Ubuntu Droplet at Digital Ocean
- Deploy Feediator to Digital Ocean
- Install Jekyll Ubuntu
- Install Ubuntu Mongo
- Install Ubuntu Nginx
- Install Ubuntu Nginx
- Maintaining Ubuntu Droplet
- Maintaining Ubuntu Droplet
- SSH to Github
- Update SSL Certificates
- Update SSL Certificates