in this video I'm going to show you five different ways to self-host nadn we're going to start with the easiest method and then move on to the more complicated methods I'm going to talk about the pricing for different options and then also the advantages and disadvantages when it comes to these different options when it comes to self-hosting andn self-hosting has a lot of advantages the biggest being the fact that you have full control over your data and it's very private and also the fact that you can utilize open-source large language models from Ama or other platforms to completely learn everything locally on your machine or on these Cloud servers where you can scale as your needs grow this is going to be a super useful video so make sure you stick until the end because you going to learn a lot about self-hosting and the different options that are available for NN before we jump into the video I have a few very quick announcements the first that I'm partnering with Cole he has a great YouTube channel him and I will be working on a few great projects that are upcoming that I'm super excited about some more details upcoming on that one another one that I've officially joined the NN ambassador program the ambassador program is great where will get to hold events so in the next quarter I'll be holding inperson events in the San Francisco area because I am the nent Ambassador for the San Francisco Bara in California so there's going to be a lot of exciting things that going to be coming from that side so make sure you stay tuned and look out for those announcements if you're new to the channel my name is Zar my YouTube channel my school Community is all about building incredible AI agents that are useful for businesses and for personal use cases we have a great Community where everybody's passionate about building amazing AI agents and workflows and automations a lot of of the folks on my school Community are business owners so it's a great way for you to join and network with like-minded individuals who are serious about learning and jumping into this world of Automation and AI in particular with nadn we have a great classroom section where you can jump in and learn everything about nadn we have deep dive topics about Vector databases all things AI agents when to use which a agent for one purpose and then also I have Daily Calls where you can jump in and if you have any questions you can always ask me there but also we have our ask and assist Channel where you can post a question and some will get to you within a few hours with the response I'll put the link in the description hopefully I'll see you there all right let's get started with the video all right so Neden has really great docs on docs. eden. io / hosting so there's a lot of uh great guys there that talks about the different options that are available but I'm going to choose and talk about the five most popular ways to self host nnn the first one I'm going to start with the easiest one which is through the note package manager or npm so we're going to walk through and do this because this is a very easy way to self post NN on your local computer where you will essentially Run nadn for free on your local machine this has a lot of advantages when it comes to privacy because again you're running everything on your local machine and therefore you'll be able to connect to local large language models through Ama or other platforms as well so the easiest way to do this is basically go to your terminal whether your MacBook or on a PC machine I'm on MacBook so I'm going to go ahead and walk through step by step on how to install this uh if you're not familiar with npm or node package package manager uh make sure you watch my previous videos when I talk about uh information on how node Works in general but anyways if you're new to this all you have to do is search for node.
js and this is where you will go ahead and jump into their website it's nodejs. org and you will download that nodejs here uh if you already have it in your machine then the way to check it is if you go to your terminal all you have to do is just do node DV and this will show the version of note that's installed on your computer so I already have this node installed and then also you have to install node package manager as well if you don't have that or if you have it on your computer you want to make sure and check npm Das V and this will show you the note package version that's installed on your computer and you can go ahead and update that if you have an older version installed all right so once you do that all we need to do is just create a folder first of all so I'm going to do uh mktr actually you know what I'm going to switch to my desktop first so I'm going to CD to desktop and then I'm going to do m kdr and I'm just going to say nn- npm all right so now that we have uh created that folder I'm going to CD into it okay so now that I've cded into my folder here and the reason why I'm creating a folder is because you want to make sure you're putting all your dependencies or everything related to NN on that particular FAL in case you need to go ahead and access it in the future all right so while I'm uh when I'm here all I have to do is do npm das install Das G and the reason I'm doing d g is because we want to install n um NN globally and then I'm just going to say n8n and that's pretty much it so all you have to do is just type this oneliner code you're going to press enter and this is going to install all of the packages and everything that's related to nadn that's required for it to run on your local machine so again the big advantage of running nadn via npm is that this is going to be completely 100% on your machine locally the disadvantage is that if you you don't have a powerful computer so if you don't I have the M4 MacBook Pro so I have a pretty uh pretty good computer to run things locally on my machines so this is not going to be that big of a problem for me because I have uh 24 GB of RAM and then in general if I'm running smaller models on my local computer it's very easy to do so that's why for me it's um a good option sometimes I use this when I'm testing things locally but if you have a computer that is uh if the ram is not big enough then uh you might want to consider other options that I'll show in uh the next few steps but once this is installed so once the packages are installed your nadn is basically ready to be run on your computer so all I have to do is now type NN and press enter and now this is going to start nadn and it's going to show you that right now it is running on Local Host 5678 so now I can just press o and it's going to open the browser if I press o oops R it here as you can see right now it's showing me that it is run on my Local Host 5678 and again if you don't uh press the uh all from on your terminal you can just copy and come to Local Host 578 and this is going to uh bring you to the same space if this is your first time running this this is going to show up the sign up form where you need to fill in the information to sign up but if you already have an account which I already do then you will just sign in Via your email and password and then you'll be good to go so that's the easiest way to do it the second method I'm going to show you is using Docker uh so this is the preferred method when it comes to running NN locally on your machine because Docker is great it puts everything together and it will have consistent performance regardless of where you're using NN because it will be installed inside of a container where you don't need to worry about uh any environment related issues or you don't need to worry about dependencies that NN needs in order for it to run successfully Docker is going to basically take care of all of that so that's why this is such a great way to run NN locally if you're looking to run everything on your machine all right so the way to do this is you're going to go to dock. and you will download the docker desktop app um you want to make sure you're downloading the proper app so I'm going to use the download for mac Apple silicon so once you click on that this is going to get downloaded and I'm going to go now to my applications or you can just click the image there so now Docker has been installed so I'm going to move this over to my applications and this is going to install Docker on my local computer so once that's done so now I'm going to go ahead and open my applications here and I'm going to click on Docker um if you have an account go ahead and sign up or create an account and you can sign in or you can just skip this part and and it will take you directly to this page where this will show you the containers the images and everything else um so we don't have to worry about the volumes builds or anything like that right now um so the way to install nadn through Docker is you need to come to the images section here and you're going to click on search images to run here you will search for NAD and this is going to pull up all the different images that are within Docker where you can uh pull and again the way to install this via Docker is you're going to click on pull so first thing is you want to make sure that you are using uh the nadn io/ NN and as you can see right here next to it it says there's been 100 million plus pulls so you want to make sure you're clicking on this one and all I have to do is just click on pull so now this is going to pull all of the dependencies and everything related to NN into my local machine so now uh if we give it a couple of seconds so now as you can see right now this is being downloaded and the image got pulled now download newer image for say all right so that's good to go now so now all we have to do is click and if we go to the containers tab quickly right now you can see the container is empty and if you want to find out more information about what container is or how it works um within Docker make make sure you click on this little 5 minute video uh guide here but anyways I'm going to go back to images I'm going to click on the Run button right here under actions so there's some optional settings here um so one of the ones that I always like to do is I want to make sure that uh my port is 5678 or you can assign a different port as well and again this is I'll show that in a little bit where earlier like we Ed for um npm this will be the local port or a local host port number that we need to ident ify but this one we just want to make sure that 5678 matches the uh the port number TCP here so all you have to do is just put 5678 the volumes again this is optional uh you don't have to put this but if you want to create a uh folder on your local machine and you want everything to match to The Container path you can do that here but for now we're going to leave it as it is um uh so I'm going to click on run here so once I do this is going to run that and as you can see right here in the bottom it says editor is now accessible we Local Host 5678 so now if we just go and copy and paste this if I go to my browser now let me actually turn off the terminal here because otherwise it's going to have a conflict terminate all right so now if I go ahead and go to my local host 5678 this is going to now pull up this set up your account with naden so again because I haven't I earlier I deleted my naden on my Docker image so that way I can show you how to do this from from the first step this is what shows up meaning now I have to set up a uh new account so I'm going to go ahead and do that I don't think this will allow me because I think I already have an account with this email but let's go ahead and try this I'm going to click on Next Step oh there you go perfect all right so this one I'll just click on get started and skip this but here it is right now you have your Ann instance running on your local machine via this Docker setup so as long as your container is running as you can see right here I can click on stop here so if you want to stop this then next time you go to 56 local hold 5678 it's not going to work but because um right now it's running everything is good to go that's why I'm able to access this and now I can create my uh workflows just like I am going to uh I will be creating in my cloud account all right so that's good to go now I'm going to go ahead and go back to my Docker container and I'm going to click on stop so once I do this now that container is no longer running so if I go back and refresh the page you will see right now that this is not going to work it says the site can't be reached because obviously our Docker container we stopped it right here but if I click on display button again this is going to run so if I go ahead and refresh the page this is going to take me back to my workflow so it's very very simple that's why like I said this is one of the best ways in my opinion this is the best way to run naden if you want to run it uh uh on your local machine all right let's jump in to now we're going to move from our local machine to a third-party Cloud hosting version so there are different ways to host nadn on uh the cloud there's several options that are available based on you need because there's a lot of advantages when it comes to hosting your nadn on a thirdparty um server Cloud Server so uh for example if when it comes to scaling uh so if you are using nent and as your needs grow and you want to be able to utilize a Cloud Server that scales as you grow then that's where the big advantage of cloud hosting comes in so basically you can think of uh hosting your nadn in these Cloud servers which acts as a virtual machine meaning that you can have all your infrastructure and all your data stored in a local environment but on a cloud service pro provider we're going to focus on two of the most popular ones again there's several ways to do this but the two most popular way the first one is the Q mode which we're going to utilize the railway app this in my opinion is the easiest and the cheapest way and it's also very useful when it comes to scalability and then our next one is going to be via digital ocean but let's walk through the Q mode so the Q mode basically provides the best scalability option so the way this works again I'm going to put the link in the description here for this particular guide that NN provided and this is great but the way it works is that when you're running in Cube mode you basically have multiple NAD instance set up one is the main instance and then um because the main instance is going to receive web hooks um triggers and then afterwards there's going to be worken instances that's going to be providing all these executions and at the bottom they have this image right here we're also going to utilize in this particular Q mode version uh there's a radius that sits right in the center and radius is basically a message broker that sits in the Middle where it will maintain the cue of these pending executions that are coming in from the maintenances of nn and it's going to send it over to the worker instance where then the these worker instances picks that message from reddis and completes that workflow Automation and then that uh gets written on the NN database and it gets post back to redus that the execution is complete again if you want to um understand more please take a look at this guide they explain this step by step of how all of this works but anyway I'm going to walk through and show you step by step on how to host andn on this Railway app so the first thing you need to do is you need to head over over to railway.
apppp you're going to head over to the login page and you're going to create an account actually first of all I just quickly talk about pricing here uh so there's different PL uh pricing plans based on whatever your need is um if you're just using this for personal use then this hobby plan which is $5 a month this is going to be perfectly fine for you because it provides you 8 GB of RAM and that's plenty if you're just using this for your own projects so that way the advantage of this is that you don't lose any of your workflows um if you lose your your local computer or machine breaks down whatever this basically gives you that option to access nadn locally on a third party server so if you're using it for your personal use please go ahead and use this $5 a month which is the hobby plan so I'm going to click on sign up for Railway I haven't done this so I'm going to do this step by step with you guys all right so I'm going to put my email here once you do that click on email so click this uh code uh security code copy I'm going to go to my email here so now I've received this message I'm going to click on log into to railway so this is going to log me in and I'm going to paste that code right here the security code and now we're good to go so let's go ahead and close this down I'm going to go back refresh the page all right so now we're good to go here so make sure you uh accept the term of services I'm going to click on agree here this is going to go ahead and do what it needs to do I'll will not deploy any of that related to Miners and everything all right so once you uh uh create your account you're going to come here to your plans we're going to go go ahead and deploy with hobby we're going to come here to the bottom scroll the bottom and just going to say deploy with hobby so this is where you'll put your credit card number uh I'm going to go ahead and do that all right so once you put your credit card number you're going to click on subscribe to hobby plan and this will process your $5 payment and now we're good to go so all we need to do is now head over to railway.