We have a existing news 🤩 , Neutralinojs cloud preview version is released!. Today I am going to show you how to run neutralino cloud on AWS EC2.

One of my previous article said about an experiment that gives full access to virtual machine to frond end users. So we have developed something more and released v1.0.4-alpha with the features as per below.

Blacklisting specific functions

Two modes — desktop and cloud

Jumping In to the Game..

So very first.. If you don’t have an AWS account and you are an undergraduate, simply apply AWS Educate and get free credits 😍.

Creating an EC2 instance

Create an instance using a fresh Ubuntu image because neutralinojs supports Linux.

Connect with PuTTY

Use PuTTY ssh client if you are using windows otherwise use ssh command on Linux.

Exposing port to outside

Default port of neutralino is 8080 (You can set another by editing settings.json ). Then we need to add inbound TCP rule in AWS.

Click instance -> select security group -> edit inbound rules -> Add rule

So now anybody from outside has access to 8080 port

Setting up neutralinojs

ssh into instance and continue with these commands.

Download and extract Neutralinojs-v1.0.4-cloud.zip



unzip Neutralinojs-v1.0.4-cloud.zip wget https://github.com/neutralinojs/neutralinojs/releases/download/v1.0.4-alpha/Neutralinojs-v1.0.4-cloud.zip unzip Neutralinojs-v1.0.4-cloud.zip

Start neutralinojs

chmod 770 neutralino

./neutralino

Go ahead and open your browser, type <public dns or public ip> :8080/myapp

Cloud configuration

See app/settings.json configuration file

{

"appname" : "myapp",

"appport" : "8080",

"mode" : "cloud",

"cloud" : {

"blacklist" : ["os.runCommand"]

}

}

mode is set in to cloud. it will disable self killing feature(Removing neutralino server process when browser is closed) and it will check blacklist per each os native call.

Testing blacklist

Open console and play with this snippet

Neutralino.os.getEnvar('USER', (e)=>{console.log(e)}, ()=>{})

Obviously this one will return ubuntu 😋

Hm.. play with this too

Neutralino.os.runCommand('ls', (e)=>{console.log(e)}, ()=>{})

No you can’t 😎 it gives this response

{

error: "Cloud permission error!"

}

This is because we added os.runCommand to blacklist

Usage of neutralino cloud

If you want to take control of your virtual machines or bare metal servers or even your computer inside a private network give a try with neutralinojs cloud.

Also for controlling your devices withing a private network using mobile app. cool! you can use neutralinojs easily.

I’ll come with another article and show you cool scenario to apply neutralinojs cloud 😎.

Conclusion

Neutralinojs is still under development process and all releases are unstable. We are planning to develop macos implementation too. Thus there are few issues with Linux version too.

Give us a star! 😍 support us..

Happy coding!!