Installation on a DigitalOcean droplet
Note: For a single user with moderate use, a small VM on a cloud service is likely plenty of performance for an emoncms installation. For applications with a large number of users and feeds the performance of emoncms will depend a lot on how the cloud provider implements storage. Networked disk drives will result in slow performance due to the network latency associated with the way the emoncms feed engines are implemented. VM’s on machines with local storage should provide much better performance.
Click on ‘Create’ to create a new cloud server
Select Ubuntu, standard $5/month, region e.g London then Create Droplet
DigitalOcean email root login details, ssh in using these credentials.
Change root password
Follow Initial Server Setup with Ubuntu 18.04
adduser oem usermod -aG sudo oem ufw allow OpenSSH ufw enable
logout of root and login with oem.
Disable root login:
sudo nano /etc/ssh/sshd_config PermitRootLogin no sudo service ssh restart
Allow created user to run sudo without password.
sudo visudo
Add to end of visudo file:
oem ALL=(ALL) NOPASSWD:ALL
Save and exit.
Start the script
wget https://raw.githubusercontent.com/openenergymonitor/EmonScripts/master/install/init.sh chmod +x init.sh ./init.sh
Modify config.ini for non emonSD installation.
Disable emonhub installation
install_emonhub=false
Disable firmware, emonpilcd, emonsd, wifiap installation
install_firmware=false install_emonpilcd=false install_emonsd=false install_wifiap=false Set user as applicable and set emonSD_pi_env=0
user=oem hostname=emonpi emonSD_pi_env=0
Comment out config, wifi and setup module:
#emoncms_emonpi_modules[config]=stable #emoncms_emonpi_modules[wifi]=stable #emoncms_emonpi_modules[setup]=stable
Run main installation script:
./main.sh
Allow access to port 80 in firewall:
sudo ufw allow 80/tcp