<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.helionet.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Allo</id>
	<title>HelioHost Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.helionet.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Allo"/>
	<link rel="alternate" type="text/html" href="https://wiki.helionet.org/Special:Contributions/Allo"/>
	<updated>2026-05-20T10:04:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2212</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2212"/>
		<updated>2026-03-12T09:56:12Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Getting Started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg|500px|right]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/, say you are getting a VPS and would like it to come with Hestia installed on it. Hestia is the control panel we will be using.  If you don&#039;t want to pay with PayPal, you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your dedicated IP, port, and other info for logging in. You will need an SFTP client such as [https://filezilla-project.org/ FileZilla] to upload files, as well as an SSH client. I personally use and prefer https://termius.com/, because I like the terminal and it doesn&#039;t weirdly close for no reason. I also use NMM File Manager from the [https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 Google Play Store] for editing the files of the server.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
chmod 755 is supposed to work and give only the owner of the file permission to mess with it.  But the /src folder is deep in the server and owned by root instead of normal accounts and I couldn&#039;t log in as root on nmm that I know of.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t get to the files, you may need to enter in terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sed -i &#039;s/internal-sftp-server.*/internal-sftp/&#039; /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Info|You could edit this file to change the entrypoint from app.js to something else like server.js}}&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
{{Info|to run multiple domains, make a template for each.  Have your second node project use port 3001 instead of 3000.  You would then repeat the steps of touching, chmodding, and editing the three node3000 files, but this time call them node3001 and change the ports mentioned in them from 3000 to 3001.  Then, as the template on your second node project, you would select node3001 instead of node3000.}}&lt;br /&gt;
&lt;br /&gt;
[https://wiki.helionet.org/VPS_Domain here]&#039;s what i did next; setting up custom domains.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2138</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2138"/>
		<updated>2025-10-07T19:36:28Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
chmod 755 is supposed to work and give only the owner of the file permission to mess with it.  But the /src folder is deep in the server and owned by root instead of normal accounts and I couldn&#039;t log in as root on nmm that I know of.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t get to the files, you may need to enter in terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sed -i &#039;s/internal-sftp-server.*/internal-sftp/&#039; /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Info|You could edit this file to change the entrypoint from app.js to something else like server.js}}&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
{{Info|to run multiple domains, make a template for each.  Have your second node project use port 3001 instead of 3000.  You would then repeat the steps of touching, chmodding, and editing the three node3000 files, but this time call them node3001 and change the ports mentioned in them from 3000 to 3001.  Then, as the template on your second node project, you would select node3001 instead of node3000.}}&lt;br /&gt;
&lt;br /&gt;
[https://wiki.helionet.org/VPS_Domain here]&#039;s what i did next; setting up custom domains.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2137</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2137"/>
		<updated>2025-10-07T18:35:38Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Terminal Stuff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
chmod 755 is supposed to work and give only the owner of the file permission to mess with it.  But the /src folder is deep in the server and owned by root instead of normal accounts and I couldn&#039;t log in as root on nmm that I know of.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t get to the files, you may need to enter in terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sed -i &#039;s/internal-sftp-server.*/internal-sftp/&#039; /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://wiki.helionet.org/VPS_Domain here]&#039;s what i did next; setting up custom domains.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2136</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2136"/>
		<updated>2025-10-07T18:26:49Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* sftp file editing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t get to the files, you may need to enter in terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sed -i &#039;s/internal-sftp-server.*/internal-sftp/&#039; /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://wiki.helionet.org/VPS_Domain here]&#039;s what i did next; setting up custom domains.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2135</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2135"/>
		<updated>2025-10-07T18:26:13Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t get to the files, you may need to enter in terminal:&lt;br /&gt;
&amp;lt;code&amp;gt;sed -i &#039;s/internal-sftp-server.*/internal-sftp/&#039; /etc/ssh/sshd_config&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart ssh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://wiki.helionet.org/VPS_Domain here]&#039;s what i did next; setting up custom domains.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2130</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2130"/>
		<updated>2025-10-06T22:08:28Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are two options for domains.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit &amp;lt;code&amp;gt;edit settings&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
Go to advanced settings and change the nameservers to the ones provided by cloudflare like I did here.&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
Now back to cloudflare to SSL.&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
Set it to Full(Strict) which is apparently the supersecure way.&lt;br /&gt;
Now in your hestia control panel, you can go to the user that owns the site, to the site, to the site options, and check SSL and Obtain Your Own.&lt;br /&gt;
[[File:Vpsnode3.jpg]]&lt;br /&gt;
And with that, your domain should be connected and secure.&lt;br /&gt;
{{Info|it may show a warning next to the url for the namecheap site because you are selfcreating your SSL.  At least it isn&#039;t a real security risk}}&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2129</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2129"/>
		<updated>2025-10-06T22:07:27Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit &amp;lt;code&amp;gt;edit settings&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
Go to advanced settings and change the nameservers to the ones provided by cloudflare like I did here.&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
Now back to cloudflare to SSL.&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
Set it to Full(Strict) which is apparently the supersecure way.&lt;br /&gt;
Now in your hestia control panel, you can go to the user that owns the site, to the site, to the site options, and check SSL and Obtain Your Own.&lt;br /&gt;
[[File:Vpsnode3.jpg]]&lt;br /&gt;
And with that, your domain should be connected and secure.&lt;br /&gt;
{{Info|it may show a warning next to the url for the namecheap site because you are selfcreating your SSL.  At least it isn&#039;t a real security risk}}&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2128</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2128"/>
		<updated>2025-10-06T22:03:18Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit &amp;lt;code&amp;gt;edit settings&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
Go to advanced settings and change the nameservers to the ones provided by cloudflare like I did here.&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
Now back to cloudflare to SSL.&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
Set it to Full(Strict) which is apparently the supersecure way.&lt;br /&gt;
Now in your hestia control panel, you can go to the user that owns the site, to the site, to the site options, and check SSL and Obtain Your Own.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2127</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2127"/>
		<updated>2025-10-06T22:01:59Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit &amp;lt;code&amp;gt;edit settings&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
Go to advanced settings and change the nameservers to the ones provided by cloudflare like I did here.&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
Now back to cloudflare to SSL.&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
Set it to Full(Strict) which is apparently the supersecure way.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2126</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2126"/>
		<updated>2025-10-06T22:00:30Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit &amp;lt;code&amp;gt;edit settings&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
Go to advanced settings and change the nameservers to the ones provided by cloudflare like I did here.&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2125</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2125"/>
		<updated>2025-10-06T21:59:35Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit &amp;lt;code&amp;gt;edit settings&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2124</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2124"/>
		<updated>2025-10-06T21:58:53Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
Now in to the hestia control panel go to users, find the user which you have as owner of this domain and hit&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2123</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2123"/>
		<updated>2025-10-06T21:57:00Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  Also feel free to make a cname telling the internets that the www form of your site also links to it.&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2122</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2122"/>
		<updated>2025-10-06T21:55:53Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
Grab that ipv4 ip from your heliohost email and make an &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; set to it.  Do the same with the ipv6 and &amp;lt;code&amp;gt;aaaa&amp;lt;/code&amp;gt;.  &lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2121</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2121"/>
		<updated>2025-10-06T21:52:55Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
First lets set the DNS.  Go to the DNS option on the dashboard and then to Records.&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2120</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2120"/>
		<updated>2025-10-06T21:50:44Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://wiki.helionet.org/VPS_Domain here]&#039;s what i did next; setting up custom domains.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain5.jpg&amp;diff=2119</id>
		<title>File:Customdomain5.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain5.jpg&amp;diff=2119"/>
		<updated>2025-10-06T21:48:56Z</updated>

		<summary type="html">&lt;p&gt;Allo: Allo uploaded a new version of File:Customdomain5.jpg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2118</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2118"/>
		<updated>2025-10-06T21:47:13Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2117</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2117"/>
		<updated>2025-10-06T21:46:43Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
[[File:customdomain1.jpg]]&lt;br /&gt;
[[File:customdomain2.jpg]]&lt;br /&gt;
[[File:customdomain3.jpg]]&lt;br /&gt;
[[File:customdomain4.jpg]]&lt;br /&gt;
[[File:customdomain6.jpg]]&lt;br /&gt;
[[File:customdomain5.jpg]]&lt;br /&gt;
[[File:customdomain7.jpg]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain6.jpg&amp;diff=2116</id>
		<title>File:Customdomain6.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain6.jpg&amp;diff=2116"/>
		<updated>2025-10-06T21:43:19Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain4.jpg&amp;diff=2115</id>
		<title>File:Customdomain4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain4.jpg&amp;diff=2115"/>
		<updated>2025-10-06T21:42:42Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain5.jpg&amp;diff=2114</id>
		<title>File:Customdomain5.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain5.jpg&amp;diff=2114"/>
		<updated>2025-10-06T21:41:59Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain3.jpg&amp;diff=2113</id>
		<title>File:Customdomain3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain3.jpg&amp;diff=2113"/>
		<updated>2025-10-06T21:41:02Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain2.jpg&amp;diff=2112</id>
		<title>File:Customdomain2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain2.jpg&amp;diff=2112"/>
		<updated>2025-10-06T21:40:28Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Customdomain1.jpg&amp;diff=2111</id>
		<title>File:Customdomain1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Customdomain1.jpg&amp;diff=2111"/>
		<updated>2025-10-06T21:39:37Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2110</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2110"/>
		<updated>2025-10-06T21:11:36Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* sftp file editing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.  Tho beware doing that to deeper folders than just your node project.  i just did it to /etc and it blew up my whole vps.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2109</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2109"/>
		<updated>2025-10-06T19:53:01Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2108</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2108"/>
		<updated>2025-10-06T19:50:12Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Cloudflare */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;br /&gt;
My internet is apparently too slow to load cloudflare&#039;s page.  So I will have to do screenshots in a week when my mobile data becomes fast again.  So I guess that is warning #1.&lt;br /&gt;
&lt;br /&gt;
{{Caution|If your internet is not fast, you cannot load the cloudflare dashboard.}}&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2107</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2107"/>
		<updated>2025-10-06T19:46:23Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Setting up Custom Domain via Namecheap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
Essentially, for namecheap, just follow [https://wiki.helionet.org/Namecheap_DNS_Records this] tutorial and be sure to ask an admin (tell them your domain) to set up your dns if you are using heliohost nameservers.  That&#039;s really all you need to do.&lt;br /&gt;
&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=Tutorials&amp;diff=2106</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=Tutorials&amp;diff=2106"/>
		<updated>2025-10-06T19:42:52Z</updated>

		<summary type="html">&lt;p&gt;Allo: Undo revision 2105 by Allo (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- The video tutorials are listed at the top of the page for better visibility, ordered from newest to oldest. &lt;br /&gt;
The written tutorial sections are alphabetized for now but could be re-arranged in order of popularity. &lt;br /&gt;
When creating new written tutorial pages, we can add the code: [[Category:Tutorials]] to the bottom since this should auto-add the new pages to the category page that can be linked to by a Discord chatbot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Video tutorials are listed at the top of the page for better visibility, ordered from newest to oldest. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All video tutorials are hosted on the [https://www.youtube.com/@HelioHostYT HelioHost YouTube channel]. &lt;br /&gt;
&lt;br /&gt;
If you enjoy the videos we post, please subscribe to our channel. As a small non-profit funded by donations, we don&#039;t have a huge budget to afford paid advertising. The more free advertising we get from word of mouth recommendations, social media likes, and channel subscriptions goes a long way towards helping us find more users and continuing to grow. Even if you can&#039;t [https://heliohost.org/donate/ donate], supporting our content is one of the great ways you can [[:How_You_Can_Help | help us for free]].&lt;br /&gt;
&lt;br /&gt;
* [https://youtu.be/Vq-cKnQGevU Caddy Webserver on HelioHost]&lt;br /&gt;
* [https://youtu.be/Fgmzvrtu7sA Creating a Modded Minecraft Server]&lt;br /&gt;
* [https://youtu.be/JAXDD7VYHUk How to create a Minecraft Server]&lt;br /&gt;
* [https://youtu.be/qXp6pw_aV0w How to issue a Google Trust Services Certificate]&lt;br /&gt;
* [https://youtu.be/IbUi2gcLbuA Installing MariaDB &amp;amp; PHP on a HelioHost VPS]&lt;br /&gt;
* [https://youtu.be/zHwWs7Tt2zc Installing NGINX on a HelioHost VPS]&lt;br /&gt;
* [https://youtu.be/-9Q9SAONgtM Hosting a Discord Bot with HelioHost]&lt;br /&gt;
* [https://youtu.be/Ak2yI8w-mew Hosting a Node.js site with HelioHost]&lt;br /&gt;
* [https://youtu.be/taTIjYTidcU Getting Started with a HelioHost VPS]&lt;br /&gt;
&lt;br /&gt;
== Written Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Written tutorial sections are alphabetized for now but could be re-arranged in order of popularity. &lt;br /&gt;
When creating new written tutorial pages, we can add the code: [[Category:Tutorials]] to the bottom since this should auto-add the new pages to the category page that can be linked to by a Discord chatbot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[:Astro|Astro]]&lt;br /&gt;
&lt;br /&gt;
* [[:Configuring_Environment|Configuring the Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[:Discord_Bot|Discord Bot]]&lt;br /&gt;
&lt;br /&gt;
* [[:Django|Django Tutorials]]&lt;br /&gt;
** [[:Django_on_HelioHost|Django on HelioHost]]&lt;br /&gt;
** [[:Converting_an_Existing_Django_App|Converting an Existing Django App to work on HelioHost]]&lt;br /&gt;
&lt;br /&gt;
* [[:DNS_Record_Management|DNS Record Management Tutorials]]&lt;br /&gt;
** [[:HelioHost_DNS_Records|HelioHost DNS Records]]&lt;br /&gt;
*** [[:Google_Site_Verification|Google Site Verification]]&lt;br /&gt;
*** [[:Manage_HelioHost_DNS|Manage HelioHost DNS]]&lt;br /&gt;
** [[:External_DNS_Hosting|External DNS Hosting]]&lt;br /&gt;
*** [[:Cloudflare_DNS_Records|Cloudflare DNS Record Management]]&lt;br /&gt;
*** [[:Namecheap_DNS_Records|Namecheap DNS Record Management]]&lt;br /&gt;
&lt;br /&gt;
* [[:Flask|Flask]]&lt;br /&gt;
&lt;br /&gt;
* [[:Gatsby|Gatsby]]&lt;br /&gt;
&lt;br /&gt;
* [[:Golang|Golang as CGI]]&lt;br /&gt;
&lt;br /&gt;
* [[:Node.js|Node.js Tutorials]]&lt;br /&gt;
** [[:Node.js|Node.js]]&lt;br /&gt;
** [[:Express|Express.js]]&lt;br /&gt;
** [[:Next.js|Next.js]]&lt;br /&gt;
&lt;br /&gt;
* [[:Perl|Perl]]&lt;br /&gt;
&lt;br /&gt;
* [[:Plesk Tutorials|Plesk Tutorials]]&lt;br /&gt;
** [[:View_Error_Logs|View Error Logs in Plesk]]&lt;br /&gt;
** [[:Account_Backups|Account Backups]]&lt;br /&gt;
** [[:Create_Website|Creating a Website]]&lt;br /&gt;
** [[:GitHub_Webhooks|Update Your Website with GitHub Webhooks and Plesk]]&lt;br /&gt;
** [[:Cron_Jobs|Cron Jobs]]&lt;br /&gt;
** [[:Password_Protect_a_Directory|Password Protect a Directory in Plesk]]&lt;br /&gt;
** [[:Custom_Error_Pages|Creating Custom Error Pages]]&lt;br /&gt;
&lt;br /&gt;
* [[:Python|Python]]&lt;br /&gt;
&lt;br /&gt;
* [[:Ruby_on_Rails|Ruby on Rails]]&lt;br /&gt;
&lt;br /&gt;
* [[:VPS|VPS Tutorials]]&lt;br /&gt;
** [[:NGINX|NGINX]]&lt;br /&gt;
** [[:VPS_WordPress|Installing WordPress on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Email|Setting Up Email on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Nodejs|Node.js from start to Hello World on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Domain|Using a custom domain on VPS]]&lt;br /&gt;
&lt;br /&gt;
== Tutorial Suggestions == &lt;br /&gt;
&lt;br /&gt;
Please let us know if there is a specific topic that you think would be good for our growing collection of tutorial videos and written guides. You can post your suggestions in our [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=Tutorials&amp;diff=2105</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=Tutorials&amp;diff=2105"/>
		<updated>2025-10-06T19:38:49Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Written Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- The video tutorials are listed at the top of the page for better visibility, ordered from newest to oldest. &lt;br /&gt;
The written tutorial sections are alphabetized for now but could be re-arranged in order of popularity. &lt;br /&gt;
When creating new written tutorial pages, we can add the code: [[Category:Tutorials]] to the bottom since this should auto-add the new pages to the category page that can be linked to by a Discord chatbot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Video tutorials are listed at the top of the page for better visibility, ordered from newest to oldest. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All video tutorials are hosted on the [https://www.youtube.com/@HelioHostYT HelioHost YouTube channel]. &lt;br /&gt;
&lt;br /&gt;
If you enjoy the videos we post, please subscribe to our channel. As a small non-profit funded by donations, we don&#039;t have a huge budget to afford paid advertising. The more free advertising we get from word of mouth recommendations, social media likes, and channel subscriptions goes a long way towards helping us find more users and continuing to grow. Even if you can&#039;t [https://heliohost.org/donate/ donate], supporting our content is one of the great ways you can [[:How_You_Can_Help | help us for free]].&lt;br /&gt;
&lt;br /&gt;
* [https://youtu.be/Vq-cKnQGevU Caddy Webserver on HelioHost]&lt;br /&gt;
* [https://youtu.be/Fgmzvrtu7sA Creating a Modded Minecraft Server]&lt;br /&gt;
* [https://youtu.be/JAXDD7VYHUk How to create a Minecraft Server]&lt;br /&gt;
* [https://youtu.be/qXp6pw_aV0w How to issue a Google Trust Services Certificate]&lt;br /&gt;
* [https://youtu.be/IbUi2gcLbuA Installing MariaDB &amp;amp; PHP on a HelioHost VPS]&lt;br /&gt;
* [https://youtu.be/zHwWs7Tt2zc Installing NGINX on a HelioHost VPS]&lt;br /&gt;
* [https://youtu.be/-9Q9SAONgtM Hosting a Discord Bot with HelioHost]&lt;br /&gt;
* [https://youtu.be/Ak2yI8w-mew Hosting a Node.js site with HelioHost]&lt;br /&gt;
* [https://youtu.be/taTIjYTidcU Getting Started with a HelioHost VPS]&lt;br /&gt;
&lt;br /&gt;
== Written Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Written tutorial sections are alphabetized for now but could be re-arranged in order of popularity. &lt;br /&gt;
When creating new written tutorial pages, we can add the code: [[Category:Tutorials]] to the bottom since this should auto-add the new pages to the category page that can be linked to by a Discord chatbot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[:Astro|Astro]]&lt;br /&gt;
&lt;br /&gt;
* [[:Configuring_Environment|Configuring the Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[:Discord_Bot|Discord Bot]]&lt;br /&gt;
&lt;br /&gt;
* [[:Django|Django Tutorials]]&lt;br /&gt;
** [[:Django_on_HelioHost|Django on HelioHost]]&lt;br /&gt;
** [[:Converting_an_Existing_Django_App|Converting an Existing Django App to work on HelioHost]]&lt;br /&gt;
&lt;br /&gt;
* [[:DNS_Record_Management|DNS Record Management Tutorials]]&lt;br /&gt;
** [[:HelioHost_DNS_Records|HelioHost DNS Records]]&lt;br /&gt;
*** [[:Google_Site_Verification|Google Site Verification]]&lt;br /&gt;
*** [[:Manage_HelioHost_DNS|Manage HelioHost DNS]]&lt;br /&gt;
** [[:External_DNS_Hosting|External DNS Hosting]]&lt;br /&gt;
*** [[:Cloudflare_DNS_Records|Cloudflare DNS Record Management]]&lt;br /&gt;
*** [[:Namecheap_DNS_Records|Namecheap DNS Record Management]]&lt;br /&gt;
&lt;br /&gt;
* [[:Flask|Flask]]&lt;br /&gt;
&lt;br /&gt;
* [[:Gatsby|Gatsby]]&lt;br /&gt;
&lt;br /&gt;
* [[:Golang|Golang as CGI]]&lt;br /&gt;
&lt;br /&gt;
* [[:Node.js|Node.js Tutorials]]&lt;br /&gt;
** [[:Node.js|Node.js]]&lt;br /&gt;
** [[:Express|Express.js]]&lt;br /&gt;
** [[:Next.js|Next.js]]&lt;br /&gt;
&lt;br /&gt;
* [[:Perl|Perl]]&lt;br /&gt;
&lt;br /&gt;
* [[:Plesk Tutorials|Plesk Tutorials]]&lt;br /&gt;
** [[:View_Error_Logs|View Error Logs in Plesk]]&lt;br /&gt;
** [[:Account_Backups|Account Backups]]&lt;br /&gt;
** [[:Create_Website|Creating a Website]]&lt;br /&gt;
** [[:GitHub_Webhooks|Update Your Website with GitHub Webhooks and Plesk]]&lt;br /&gt;
** [[:Cron_Jobs|Cron Jobs]]&lt;br /&gt;
** [[:Password_Protect_a_Directory|Password Protect a Directory in Plesk]]&lt;br /&gt;
** [[:Custom_Error_Pages|Creating Custom Error Pages]]&lt;br /&gt;
&lt;br /&gt;
* [[:Python|Python]]&lt;br /&gt;
&lt;br /&gt;
* [[:Ruby_on_Rails|Ruby on Rails]]&lt;br /&gt;
&lt;br /&gt;
* [[:VPS|VPS Tutorials]]&lt;br /&gt;
** [[:NGINX|NGINX]]&lt;br /&gt;
** [[:VPS_WordPress|Installing WordPress on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Email|Setting Up Email on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Nodejs|Node.js from start to Hello World on a VPS running Hestia Control Panel]]&lt;br /&gt;
&lt;br /&gt;
== Tutorial Suggestions == &lt;br /&gt;
&lt;br /&gt;
Please let us know if there is a specific topic that you think would be good for our growing collection of tutorial videos and written guides. You can post your suggestions in our [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=Namecheap_DNS_Records&amp;diff=2104</id>
		<title>Namecheap DNS Records</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=Namecheap_DNS_Records&amp;diff=2104"/>
		<updated>2025-10-06T19:37:49Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Namecheap DNS Record Management ==&lt;br /&gt;
&lt;br /&gt;
HelioHost has an [[:How_You_Can_Help#Use_Our_Affiliate_Links|affiliate agreement]] with [https://heliohost.org/partners/namecheap Namecheap], so if you&#039;re in the market for a new domain we highly recommend purchasing it from them.&lt;br /&gt;
&lt;br /&gt;
Using the affiliate banner below to sign up and register your domain will not cost you anything extra, but it helps HelioHost earn a bit of commission for the referral.&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap.png|link=https://heliohost.org/partners/namecheap]]&lt;br /&gt;
&lt;br /&gt;
{{Info|After checking if your preferred domain name is available, sometimes there will be a &#039;&#039;&#039;Promo Code&#039;&#039;&#039; to get a lower price for the first year.}}&lt;br /&gt;
&lt;br /&gt;
== Update Namecheap Settings ==&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve purchased a domain from Namecheap, follow the steps below to set up your DNS:&lt;br /&gt;
&lt;br /&gt;
* Login to your Namecheap account&lt;br /&gt;
* Click on &#039;&#039;&#039;Domain List&#039;&#039;&#039; in the left sidebar menu&lt;br /&gt;
* Click on the &#039;&#039;&#039;Manage&#039;&#039;&#039; button on the right side&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-1.png]]&lt;br /&gt;
&lt;br /&gt;
* Select &#039;&#039;&#039;Custom DNS&#039;&#039;&#039; from the dropdown menu in the &#039;&#039;&#039;Nameservers&#039;&#039;&#039; section&lt;br /&gt;
* Enter the HelioHost nameservers &#039;&#039;&#039;ns1.heliohost.org&#039;&#039;&#039; and &#039;&#039;&#039;ns2.heliohost.org&#039;&#039;&#039;&lt;br /&gt;
* Click on the &#039;&#039;&#039;green checkmark&#039;&#039;&#039; to save your settings&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-2.png]]&lt;br /&gt;
&lt;br /&gt;
{{Caution|If you are using a VPS, you also need to ask a heliohost admin to set up your DNS.}}&lt;br /&gt;
&lt;br /&gt;
== Wait 24 - 48 hours for DNS Propagation == &lt;br /&gt;
&lt;br /&gt;
{{Info|DNS records do not propagate immediately. Full DNS propagation can take up to 24 - 48 hours globally in some cases.}}&lt;br /&gt;
&lt;br /&gt;
Follow the steps below to check that your DNS is properly configured:&lt;br /&gt;
&lt;br /&gt;
* Go to [https://dnschecker.org/ dnschecker.org]&lt;br /&gt;
* Enter your &#039;&#039;&#039;domain name&#039;&#039;&#039;&lt;br /&gt;
* Select the type of record you want to check (in this case, select &#039;&#039;&#039;NS&#039;&#039;&#039;)&lt;br /&gt;
* Click the &#039;&#039;&#039;Search&#039;&#039;&#039; button&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-3.png]]&lt;br /&gt;
&lt;br /&gt;
== Further Support ==&lt;br /&gt;
&lt;br /&gt;
If you get stuck or have any questions, please don&#039;t hesitate to post in the [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum]. Make sure you provide your &#039;&#039;&#039;username&#039;&#039;&#039;, &#039;&#039;&#039;domain name&#039;&#039;&#039;, and any &#039;&#039;&#039;error message(s)&#039;&#039;&#039; received.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=Namecheap_DNS_Records&amp;diff=2103</id>
		<title>Namecheap DNS Records</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=Namecheap_DNS_Records&amp;diff=2103"/>
		<updated>2025-10-06T19:37:23Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Namecheap DNS Record Management ==&lt;br /&gt;
&lt;br /&gt;
HelioHost has an [[:How_You_Can_Help#Use_Our_Affiliate_Links|affiliate agreement]] with [https://heliohost.org/partners/namecheap Namecheap], so if you&#039;re in the market for a new domain we highly recommend purchasing it from them.&lt;br /&gt;
&lt;br /&gt;
Using the affiliate banner below to sign up and register your domain will not cost you anything extra, but it helps HelioHost earn a bit of commission for the referral.&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap.png|link=https://heliohost.org/partners/namecheap]]&lt;br /&gt;
&lt;br /&gt;
{{Info|After checking if your preferred domain name is available, sometimes there will be a &#039;&#039;&#039;Promo Code&#039;&#039;&#039; to get a lower price for the first year.}}&lt;br /&gt;
&lt;br /&gt;
== Update Namecheap Settings ==&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve purchased a domain from Namecheap, follow the steps below to set up your DNS:&lt;br /&gt;
&lt;br /&gt;
* Login to your Namecheap account&lt;br /&gt;
* Click on &#039;&#039;&#039;Domain List&#039;&#039;&#039; in the left sidebar menu&lt;br /&gt;
* Click on the &#039;&#039;&#039;Manage&#039;&#039;&#039; button on the right side&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-1.png]]&lt;br /&gt;
&lt;br /&gt;
* Select &#039;&#039;&#039;Custom DNS&#039;&#039;&#039; from the dropdown menu in the &#039;&#039;&#039;Nameservers&#039;&#039;&#039; section&lt;br /&gt;
* Enter the HelioHost nameservers &#039;&#039;&#039;ns1.heliohost.org&#039;&#039;&#039; and &#039;&#039;&#039;ns2.heliohost.org&#039;&#039;&#039;&lt;br /&gt;
* Click on the &#039;&#039;&#039;green checkmark&#039;&#039;&#039; to save your settings&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-2.png]]&lt;br /&gt;
&lt;br /&gt;
{{Caution:If you are using a VPS, you also need to ask a heliohost admin to set up your DNS.}}&lt;br /&gt;
&lt;br /&gt;
== Wait 24 - 48 hours for DNS Propagation == &lt;br /&gt;
&lt;br /&gt;
{{Info|DNS records do not propagate immediately. Full DNS propagation can take up to 24 - 48 hours globally in some cases.}}&lt;br /&gt;
&lt;br /&gt;
Follow the steps below to check that your DNS is properly configured:&lt;br /&gt;
&lt;br /&gt;
* Go to [https://dnschecker.org/ dnschecker.org]&lt;br /&gt;
* Enter your &#039;&#039;&#039;domain name&#039;&#039;&#039;&lt;br /&gt;
* Select the type of record you want to check (in this case, select &#039;&#039;&#039;NS&#039;&#039;&#039;)&lt;br /&gt;
* Click the &#039;&#039;&#039;Search&#039;&#039;&#039; button&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-3.png]]&lt;br /&gt;
&lt;br /&gt;
== Further Support ==&lt;br /&gt;
&lt;br /&gt;
If you get stuck or have any questions, please don&#039;t hesitate to post in the [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum]. Make sure you provide your &#039;&#039;&#039;username&#039;&#039;&#039;, &#039;&#039;&#039;domain name&#039;&#039;&#039;, and any &#039;&#039;&#039;error message(s)&#039;&#039;&#039; received.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=Namecheap_DNS_Records&amp;diff=2102</id>
		<title>Namecheap DNS Records</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=Namecheap_DNS_Records&amp;diff=2102"/>
		<updated>2025-10-06T19:36:43Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Namecheap DNS Record Management ==&lt;br /&gt;
&lt;br /&gt;
HelioHost has an [[:How_You_Can_Help#Use_Our_Affiliate_Links|affiliate agreement]] with [https://heliohost.org/partners/namecheap Namecheap], so if you&#039;re in the market for a new domain we highly recommend purchasing it from them.&lt;br /&gt;
&lt;br /&gt;
Using the affiliate banner below to sign up and register your domain will not cost you anything extra, but it helps HelioHost earn a bit of commission for the referral.&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap.png|link=https://heliohost.org/partners/namecheap]]&lt;br /&gt;
&lt;br /&gt;
{{Info|After checking if your preferred domain name is available, sometimes there will be a &#039;&#039;&#039;Promo Code&#039;&#039;&#039; to get a lower price for the first year.}}&lt;br /&gt;
&lt;br /&gt;
== Update Namecheap Settings ==&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve purchased a domain from Namecheap, follow the steps below to set up your DNS:&lt;br /&gt;
&lt;br /&gt;
* Login to your Namecheap account&lt;br /&gt;
* Click on &#039;&#039;&#039;Domain List&#039;&#039;&#039; in the left sidebar menu&lt;br /&gt;
* Click on the &#039;&#039;&#039;Manage&#039;&#039;&#039; button on the right side&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-1.png]]&lt;br /&gt;
&lt;br /&gt;
* Select &#039;&#039;&#039;Custom DNS&#039;&#039;&#039; from the dropdown menu in the &#039;&#039;&#039;Nameservers&#039;&#039;&#039; section&lt;br /&gt;
* Enter the HelioHost nameservers &#039;&#039;&#039;ns1.heliohost.org&#039;&#039;&#039; and &#039;&#039;&#039;ns2.heliohost.org&#039;&#039;&#039;&lt;br /&gt;
* Click on the &#039;&#039;&#039;green checkmark&#039;&#039;&#039; to save your settings&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-2.png]]&lt;br /&gt;
&lt;br /&gt;
[[Caution:If you are using a VPS, you also need to ask a heliohost admin to set up your DNS.]]&lt;br /&gt;
&lt;br /&gt;
== Wait 24 - 48 hours for DNS Propagation == &lt;br /&gt;
&lt;br /&gt;
{{Info|DNS records do not propagate immediately. Full DNS propagation can take up to 24 - 48 hours globally in some cases.}}&lt;br /&gt;
&lt;br /&gt;
Follow the steps below to check that your DNS is properly configured:&lt;br /&gt;
&lt;br /&gt;
* Go to [https://dnschecker.org/ dnschecker.org]&lt;br /&gt;
* Enter your &#039;&#039;&#039;domain name&#039;&#039;&#039;&lt;br /&gt;
* Select the type of record you want to check (in this case, select &#039;&#039;&#039;NS&#039;&#039;&#039;)&lt;br /&gt;
* Click the &#039;&#039;&#039;Search&#039;&#039;&#039; button&lt;br /&gt;
&lt;br /&gt;
[[File:Namecheap-dns-3.png]]&lt;br /&gt;
&lt;br /&gt;
== Further Support ==&lt;br /&gt;
&lt;br /&gt;
If you get stuck or have any questions, please don&#039;t hesitate to post in the [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum]. Make sure you provide your &#039;&#039;&#039;username&#039;&#039;&#039;, &#039;&#039;&#039;domain name&#039;&#039;&#039;, and any &#039;&#039;&#039;error message(s)&#039;&#039;&#039; received.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2101</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2101"/>
		<updated>2025-10-06T19:28:56Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* dont look yet im building this page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;br /&gt;
== Setting up Custom Domain via Namecheap ==&lt;br /&gt;
== Setting up Custom Domain via Cloudflare ==&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2100</id>
		<title>VPS Domain</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Domain&amp;diff=2100"/>
		<updated>2025-10-06T19:23:56Z</updated>

		<summary type="html">&lt;p&gt;Allo: Created page with &amp;quot;== dont look yet im building this page ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== dont look yet im building this page ==&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=Tutorials&amp;diff=2099</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=Tutorials&amp;diff=2099"/>
		<updated>2025-10-06T19:23:27Z</updated>

		<summary type="html">&lt;p&gt;Allo: /* Written Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- The video tutorials are listed at the top of the page for better visibility, ordered from newest to oldest. &lt;br /&gt;
The written tutorial sections are alphabetized for now but could be re-arranged in order of popularity. &lt;br /&gt;
When creating new written tutorial pages, we can add the code: [[Category:Tutorials]] to the bottom since this should auto-add the new pages to the category page that can be linked to by a Discord chatbot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Video tutorials are listed at the top of the page for better visibility, ordered from newest to oldest. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All video tutorials are hosted on the [https://www.youtube.com/@HelioHostYT HelioHost YouTube channel]. &lt;br /&gt;
&lt;br /&gt;
If you enjoy the videos we post, please subscribe to our channel. As a small non-profit funded by donations, we don&#039;t have a huge budget to afford paid advertising. The more free advertising we get from word of mouth recommendations, social media likes, and channel subscriptions goes a long way towards helping us find more users and continuing to grow. Even if you can&#039;t [https://heliohost.org/donate/ donate], supporting our content is one of the great ways you can [[:How_You_Can_Help | help us for free]].&lt;br /&gt;
&lt;br /&gt;
* [https://youtu.be/Vq-cKnQGevU Caddy Webserver on HelioHost]&lt;br /&gt;
* [https://youtu.be/Fgmzvrtu7sA Creating a Modded Minecraft Server]&lt;br /&gt;
* [https://youtu.be/JAXDD7VYHUk How to create a Minecraft Server]&lt;br /&gt;
* [https://youtu.be/qXp6pw_aV0w How to issue a Google Trust Services Certificate]&lt;br /&gt;
* [https://youtu.be/IbUi2gcLbuA Installing MariaDB &amp;amp; PHP on a HelioHost VPS]&lt;br /&gt;
* [https://youtu.be/zHwWs7Tt2zc Installing NGINX on a HelioHost VPS]&lt;br /&gt;
* [https://youtu.be/-9Q9SAONgtM Hosting a Discord Bot with HelioHost]&lt;br /&gt;
* [https://youtu.be/Ak2yI8w-mew Hosting a Node.js site with HelioHost]&lt;br /&gt;
* [https://youtu.be/taTIjYTidcU Getting Started with a HelioHost VPS]&lt;br /&gt;
&lt;br /&gt;
== Written Tutorials ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Written tutorial sections are alphabetized for now but could be re-arranged in order of popularity. &lt;br /&gt;
When creating new written tutorial pages, we can add the code: [[Category:Tutorials]] to the bottom since this should auto-add the new pages to the category page that can be linked to by a Discord chatbot. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[:Astro|Astro]]&lt;br /&gt;
&lt;br /&gt;
* [[:Configuring_Environment|Configuring the Environment]]&lt;br /&gt;
&lt;br /&gt;
* [[:Discord_Bot|Discord Bot]]&lt;br /&gt;
&lt;br /&gt;
* [[:Django|Django Tutorials]]&lt;br /&gt;
** [[:Django_on_HelioHost|Django on HelioHost]]&lt;br /&gt;
** [[:Converting_an_Existing_Django_App|Converting an Existing Django App to work on HelioHost]]&lt;br /&gt;
&lt;br /&gt;
* [[:DNS_Record_Management|DNS Record Management Tutorials]]&lt;br /&gt;
** [[:HelioHost_DNS_Records|HelioHost DNS Records]]&lt;br /&gt;
*** [[:Google_Site_Verification|Google Site Verification]]&lt;br /&gt;
*** [[:Manage_HelioHost_DNS|Manage HelioHost DNS]]&lt;br /&gt;
** [[:External_DNS_Hosting|External DNS Hosting]]&lt;br /&gt;
*** [[:Cloudflare_DNS_Records|Cloudflare DNS Record Management]]&lt;br /&gt;
*** [[:Namecheap_DNS_Records|Namecheap DNS Record Management]]&lt;br /&gt;
&lt;br /&gt;
* [[:Flask|Flask]]&lt;br /&gt;
&lt;br /&gt;
* [[:Gatsby|Gatsby]]&lt;br /&gt;
&lt;br /&gt;
* [[:Golang|Golang as CGI]]&lt;br /&gt;
&lt;br /&gt;
* [[:Node.js|Node.js Tutorials]]&lt;br /&gt;
** [[:Node.js|Node.js]]&lt;br /&gt;
** [[:Express|Express.js]]&lt;br /&gt;
** [[:Next.js|Next.js]]&lt;br /&gt;
&lt;br /&gt;
* [[:Perl|Perl]]&lt;br /&gt;
&lt;br /&gt;
* [[:Plesk Tutorials|Plesk Tutorials]]&lt;br /&gt;
** [[:View_Error_Logs|View Error Logs in Plesk]]&lt;br /&gt;
** [[:Account_Backups|Account Backups]]&lt;br /&gt;
** [[:Create_Website|Creating a Website]]&lt;br /&gt;
** [[:GitHub_Webhooks|Update Your Website with GitHub Webhooks and Plesk]]&lt;br /&gt;
** [[:Cron_Jobs|Cron Jobs]]&lt;br /&gt;
** [[:Password_Protect_a_Directory|Password Protect a Directory in Plesk]]&lt;br /&gt;
** [[:Custom_Error_Pages|Creating Custom Error Pages]]&lt;br /&gt;
&lt;br /&gt;
* [[:Python|Python]]&lt;br /&gt;
&lt;br /&gt;
* [[:Ruby_on_Rails|Ruby on Rails]]&lt;br /&gt;
&lt;br /&gt;
* [[:VPS|VPS Tutorials]]&lt;br /&gt;
** [[:NGINX|NGINX]]&lt;br /&gt;
** [[:VPS_WordPress|Installing WordPress on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Email|Setting Up Email on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Nodejs|Node.js from start to Hello World on a VPS running Hestia Control Panel]]&lt;br /&gt;
** [[:VPS_Domain|Using a custom domain on VPS]]&lt;br /&gt;
&lt;br /&gt;
== Tutorial Suggestions == &lt;br /&gt;
&lt;br /&gt;
Please let us know if there is a specific topic that you think would be good for our growing collection of tutorial videos and written guides. You can post your suggestions in our [https://helionet.org/index/forum/45-customer-service/?do=add Customer Service forum]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2098</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2098"/>
		<updated>2025-10-06T19:20:31Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions.  It may be handy to know that &amp;lt;code&amp;gt;sudo chmod 777 -R directory&amp;lt;/code&amp;gt;, with directory being your target directory, applies the permission to everything in that folder.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2092</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2092"/>
		<updated>2025-10-03T03:09:29Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2091</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2091"/>
		<updated>2025-10-03T03:07:07Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;im currently building this page so wait one sec pls. dont look yet!&lt;br /&gt;
  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode7.jpg]]&lt;br /&gt;
&lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Vpsnode7.jpg&amp;diff=2090</id>
		<title>File:Vpsnode7.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Vpsnode7.jpg&amp;diff=2090"/>
		<updated>2025-10-03T03:06:36Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2089</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2089"/>
		<updated>2025-10-03T03:05:45Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;im currently building this page so wait one sec pls. dont look yet!&lt;br /&gt;
  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
[[File:vpsnode6.jpg]]&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/bd8fcc6a2462757df4f424472daf878c.jpg&lt;br /&gt;
  &lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Vpsnode6.jpg&amp;diff=2088</id>
		<title>File:Vpsnode6.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Vpsnode6.jpg&amp;diff=2088"/>
		<updated>2025-10-03T03:04:45Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2087</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2087"/>
		<updated>2025-10-03T03:03:29Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;im currently building this page so wait one sec pls. dont look yet!&lt;br /&gt;
  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
[[File:vpsnode5.png]]&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
https://user.uploads.dev/file/30178d35f063d742c1215e72069269fb.jpg&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/bd8fcc6a2462757df4f424472daf878c.jpg&lt;br /&gt;
  &lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2086</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2086"/>
		<updated>2025-10-03T03:01:56Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;im currently building this page so wait one sec pls. dont look yet!&lt;br /&gt;
  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode4.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
https://user.uploads.dev/file/fad1b70e9c0d634b1855d0100f105658.png&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
https://user.uploads.dev/file/30178d35f063d742c1215e72069269fb.jpg&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/bd8fcc6a2462757df4f424472daf878c.jpg&lt;br /&gt;
  &lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Vpsnode4.jpg&amp;diff=2085</id>
		<title>File:Vpsnode4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Vpsnode4.jpg&amp;diff=2085"/>
		<updated>2025-10-03T03:01:18Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2084</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2084"/>
		<updated>2025-10-03T03:00:28Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;im currently building this page so wait one sec pls. dont look yet!&lt;br /&gt;
  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/b95f4acd8017d1ab19d0d5fbfd807fb4.jpg&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
https://user.uploads.dev/file/fad1b70e9c0d634b1855d0100f105658.png&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
https://user.uploads.dev/file/30178d35f063d742c1215e72069269fb.jpg&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/bd8fcc6a2462757df4f424472daf878c.jpg&lt;br /&gt;
  &lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Vpsnode3.jpg&amp;diff=2083</id>
		<title>File:Vpsnode3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Vpsnode3.jpg&amp;diff=2083"/>
		<updated>2025-10-03T02:59:51Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2082</id>
		<title>VPS Nodejs</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=VPS_Nodejs&amp;diff=2082"/>
		<updated>2025-10-03T02:58:24Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;im currently building this page so wait one sec pls. dont look yet!&lt;br /&gt;
  &lt;br /&gt;
== Starting Up ==&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode1.jpg]]&lt;br /&gt;
&lt;br /&gt;
In https://heliohost.org/chat/ say you are getting a VPS and that you would like it to come with Hestia installed on it.  Hestia is the control panel we will be using.  If you don&#039;t want to pay with paypal you may also ask for an alternate payment link.&lt;br /&gt;
&lt;br /&gt;
You should get an email listing your ip, port, and other info for logging in.  I did this all on phone so now I&#039;m going to direct you to some android apps, tho there are equivalents for all devices.  just search &#039;sftp&#039; or &#039;ssh&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I use https://termius.com/ because i like the terminal and it doesn&#039;t weirdly close for no reason.  And NMM at https://play.google.com/store/apps/details?id=in.mfile&amp;amp;pli=1 for editing the files of the server since Termius can&#039;t do that.&lt;br /&gt;
&lt;br /&gt;
== In to Hestia ==&lt;br /&gt;
&lt;br /&gt;
Before we log in to the apps, let&#039;s try logging in to Hestia.  In your email see where it says your domain is &amp;lt;code&amp;gt;vps###.heliohost.us&amp;lt;/code&amp;gt;? ### refers to your specific number in the email.  Add a &amp;lt;code&amp;gt;:8083&amp;lt;/code&amp;gt; so the link is &amp;lt;code&amp;gt;vps###.heliohost.us:8083&amp;lt;/code&amp;gt; and go to it in your browser.  You should find a login page with the username being &#039;admin&#039; and password being your password.  Enter those and you are in the Hestia Control Panel.  Explore around it a bit.&lt;br /&gt;
&lt;br /&gt;
Now lets change account setting from nologin to bash, and link our first domain.&lt;br /&gt;
&lt;br /&gt;
To change from nologin to bash, touch the three bars below the top three bars, go to users, and touch the admin user.  Go to the bottom where it says Advanced Options, and change nologin to bash.&lt;br /&gt;
&lt;br /&gt;
[[File:vpsnode2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Now lets add a domain so u can have the node site online somewhere.  If you ask in support chat they can give you a free heliohost domain to build with.&lt;br /&gt;
&lt;br /&gt;
Touch the 3 bars again and go to Web.  Add a new domain with the address and ip.  Enable SSL in advanced options.  Mine looks like this.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/69c3bd511288969586ad7c3051be65d4.jpg&lt;br /&gt;
&lt;br /&gt;
== Terminal Stuff ==&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s open Termius and log in.&lt;br /&gt;
I would take screenshots but Termius doesn&#039;t let me.  Skip the logging in and ai stuff of termius and go straight to Hosts and make a new host.  Set the ip to either of the ips from your email.  I use the ipv6 one and no idea if there are limitations using the ipv4 one or not. :)&lt;br /&gt;
&lt;br /&gt;
port should already be on 22 correctly and enter username &amp;lt;code&amp;gt;admin&amp;lt;/code&amp;gt; and your password.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/b95f4acd8017d1ab19d0d5fbfd807fb4.jpg&lt;br /&gt;
&lt;br /&gt;
You will find terminal stuff is filled with Permissions issues and nearly any command will have to be prefaced with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;... OR you could just log in as root; so let&#039;s do that now.  Type and enter &amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;.  It will ask for your password.  Enter it and afterward you should see you are logged in as root.&lt;br /&gt;
&lt;br /&gt;
Now lets make sure these files are created and give them the correct permissions.  These files are used to create a node.js template in Hestia.  Enter each of these lines in terminal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;touch /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.tpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 777 /usr/local/hestia/data/templates/web/nginx/nodejs3000.stpl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I am a noob and chmod 755 is supposed to work while still restricting some users, but didn&#039;t work for me.  777 allows any user to edit the file.  This doesn&#039;t mean random people on the internet can edit it, but if you are a business that shares the webserver with multiple users each with their own login, each one can edit this file.  So I used 777, but feel free to do it correctly instead (if you know how).&lt;br /&gt;
&lt;br /&gt;
== sftp file editing ==&lt;br /&gt;
&lt;br /&gt;
Now lets add in what is supposed to go in each of these files.  Start the NMM app and log in with the same info you used with Termius.  Then touch your files and go to the lowest level and you should see:&lt;br /&gt;
https://user.uploads.dev/file/fad1b70e9c0d634b1855d0100f105658.png&lt;br /&gt;
&lt;br /&gt;
Navigate to the files you touched; they are at &amp;lt;code&amp;gt;/usr/local/hestia/data/templates/web/nginx/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Copy and paste these in to each file and save.  Also, to even see files, you will probably have to deal with permissions; chmod 777ing everything and crying when recursively applying it to everything in a folder doesn&#039;t work even though the internet says it should.&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.sh:&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
user=$1&lt;br /&gt;
domain=$2&lt;br /&gt;
ip=$3&lt;br /&gt;
home=$4&lt;br /&gt;
docroot=$5&lt;br /&gt;
mkdir &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
chown -R $user:$user &amp;quot;$home/$user/web/$domain/nodeapp&amp;quot;&lt;br /&gt;
rm &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&lt;br /&gt;
runuser -l $user -c &amp;quot;pm2 start $home/$user/web/$domain/nodeapp/app.js&amp;quot;&lt;br /&gt;
sleep 5&lt;br /&gt;
chmod 777 &amp;quot;$home/$user/web/$domain/nodeapp/app.sock&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.tpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    location @fallback {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
    &lt;br /&gt;
    include %home%/%user%/conf/web/nginx.%domain%.conf*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the text for nodejs3000.stpl:&lt;br /&gt;
&amp;lt;pre&amp;gt;server {&lt;br /&gt;
    listen %ip%:%proxy_port%;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    return 301 https://%domain_idn%$request_uri;&lt;br /&gt;
}&lt;br /&gt;
server {&lt;br /&gt;
    listen %ip%:%proxy_ssl_port% http2 ssl;&lt;br /&gt;
    server_name %domain_idn% %alias_idn%;&lt;br /&gt;
    ssl_certificate %ssl_pem%;&lt;br /&gt;
    ssl_certificate_key %ssl_key%;&lt;br /&gt;
    error_log /var/log/%web_system%/domains/%domain%.error.log error;&lt;br /&gt;
    gzip on;&lt;br /&gt;
    gzip_min_length 1100;&lt;br /&gt;
    gzip_buffers 4 32k;&lt;br /&gt;
    gzip_types image/svg+xml svg svgz text/plain application/x-javascript text/xml text/css;&lt;br /&gt;
    gzip_vary on;&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://127.0.0.1:3000;&lt;br /&gt;
        proxy_http_version 1.1;&lt;br /&gt;
        proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
        proxy_set_header Connection &#039;upgrade&#039;;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_cache_bypass $http_upgrade;&lt;br /&gt;
    }&lt;br /&gt;
    location /error/ {&lt;br /&gt;
        alias %home%/%user%/web/%domain%/document_errors/;&lt;br /&gt;
    }&lt;br /&gt;
    location @fallback {&lt;br /&gt;
    proxy_pass https://127.0.0.1:3000:/$1;&lt;br /&gt;
    }&lt;br /&gt;
    location ~ /\.ht {return 404;}&lt;br /&gt;
    location ~ /\.svn/ {return 404;}&lt;br /&gt;
    location ~ /\.git/ {return 404;}&lt;br /&gt;
    location ~ /\.hg/ {return 404;}&lt;br /&gt;
    location ~ /\.bzr/ {return 404;}&lt;br /&gt;
&lt;br /&gt;
    include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== finally node stuff ==&lt;br /&gt;
&lt;br /&gt;
At this point you should probably install npm and also pm2 to start the app correctly.  i had eaddrinuse errors when starting not using pm2.&lt;br /&gt;
so do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update &amp;amp;&amp;amp; apt install npm -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;npm install pm2 -g&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
finally we are almost there.  Now that those three files are correct, go back in to the hestia control panel, to web, to the domain, to advanced options, and under proxy template select nodejs3000.&lt;br /&gt;
https://user.uploads.dev/file/30178d35f063d742c1215e72069269fb.jpg&lt;br /&gt;
finally we are to the simple node stuff&lt;br /&gt;
&lt;br /&gt;
in termius use cd to navigate to the directory referenced by the template:&lt;br /&gt;
&amp;lt;code&amp;gt;cd /home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt;&lt;br /&gt;
Use your domain instead of allo.helioho.st.&lt;br /&gt;
{{Caution|also people will tell you to make a new user account instead of do it under admin.  I didn&#039;t tho.  I just wanted to complete the process of getting a node site fully online; not delve in to accounts.}}&lt;br /&gt;
{{Info|Making my first real site after this tutorial; I started with making a dedicated account for it.}}&lt;br /&gt;
&lt;br /&gt;
now we npm init in that folder to start a node project:&lt;br /&gt;
&amp;lt;code&amp;gt;npm init -y&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now here is a starter hello world node file.&lt;br /&gt;
&amp;lt;pre&amp;gt;const http = require(&#039;http&#039;); // Import the built-in http module&lt;br /&gt;
&lt;br /&gt;
    const hostname = &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
    const port = 3000; // Port to listen on&lt;br /&gt;
&lt;br /&gt;
    // Create a server instance&lt;br /&gt;
    const server = http.createServer((req, res) =&amp;gt; {&lt;br /&gt;
      // Set the response header&lt;br /&gt;
      res.writeHead(200, { &#039;Content-Type&#039;: &#039;text/plain&#039; });&lt;br /&gt;
&lt;br /&gt;
      // Send the response body&lt;br /&gt;
      res.end(&#039;Hello, World!\n&#039;);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
server.on(&#039;listening&#039;,function(){&lt;br /&gt;
    console.log(&#039;ok, server is running&#039;);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
    // Start the server and listen for incoming requests&lt;br /&gt;
    server.listen(port, hostname, () =&amp;gt; {&lt;br /&gt;
      console.log(`Server running at http://${hostname}:${port}/`);&lt;br /&gt;
    });&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Danger|All these places in files that say ip 127.0.0.1 keep them like that.  Don&#039;t use your own ip.  It&#039;s supposed to say 127.0.0.1.}}&lt;br /&gt;
&lt;br /&gt;
Open up nmm again and navigate to &amp;lt;code&amp;gt;/home/admin/web/allo.helioho.st/nodeapp&amp;lt;/code&amp;gt; and create a file named app.js and paste in the code.&lt;br /&gt;
&lt;br /&gt;
In termius terminal be cd&#039;d in to that folder and type:&lt;br /&gt;
&amp;lt;code&amp;gt;pm2 start app.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now go to your domain and it should say hello world :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if you have problems, you could allow node&#039;s ports 3000 and 449 through the firewall.&lt;br /&gt;
&lt;br /&gt;
For the firewall, touch the three bars in top right, and go to Server Settings, then Firewall and add an exception.&lt;br /&gt;
&lt;br /&gt;
https://user.uploads.dev/file/bd8fcc6a2462757df4f424472daf878c.jpg&lt;br /&gt;
  &lt;br /&gt;
I actually don&#039;t know if this is required because what was blocking me turned out to have to do with something other than the firewall, but, while searching for answers, I came across someone who implied opening ports 3000 and 449 was needed.  so i did both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also I was not able to access my site without a vpn initially and this was solved by communicating clearly on the discord support and Krydos deleting the aaaa records off my vps.&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
	<entry>
		<id>https://wiki.helionet.org/index.php?title=File:Vpsnode2.jpg&amp;diff=2081</id>
		<title>File:Vpsnode2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.helionet.org/index.php?title=File:Vpsnode2.jpg&amp;diff=2081"/>
		<updated>2025-10-03T02:57:31Z</updated>

		<summary type="html">&lt;p&gt;Allo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Allo</name></author>
	</entry>
</feed>