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.

  1. Click on ‘Create’ to create a new cloud server

  2. Select Ubuntu, standard $5/month, region e.g London then Create Droplet

  3. DigitalOcean email root login details, ssh in using these credentials.

  4. Change root password

  5. 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.

  6. Disable root login:

    sudo nano /etc/ssh/sshd_config
    PermitRootLogin no
    sudo service ssh restart
    
  7. Allow created user to run sudo without password.

    sudo visudo
    

    Add to end of visudo file:

    oem ALL=(ALL) NOPASSWD:ALL
    

    Save and exit.

  8. Start the script

    wget https://raw.githubusercontent.com/openenergymonitor/EmonScripts/master/install/init.sh
    chmod +x init.sh
    ./init.sh
    
  9. 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_modules[config]=stable
    #emoncms_modules[wifi]=stable
    #emoncms_modules[setup]=stable
    
  10. Run main installation script:

    ./main.sh
    
  11. Allow access to port 80 in firewall:

    sudo ufw allow 80/tcp