{"id":1221,"date":"2026-12-01T18:00:00","date_gmt":"2026-12-01T18:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=1221"},"modified":"2026-12-01T18:00:00","modified_gmt":"2026-12-01T18:00:00","slug":"install-nodejs-ubuntu-25-10-ppa","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/12\/01\/install-nodejs-ubuntu-25-10-ppa\/","title":{"rendered":"How to Install Latest Node.js on Ubuntu 25.10"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Install latest Node.js on Ubuntu 25.10 with a signed NodeSource APT repository and have <code>node<\/code> and <code>npm<\/code> working in about ten minutes. You will also run a private HTTP smoke test, so you can confirm the runtime works without exposing an application port to the internet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A 64-bit Ubuntu 25.10 server, code-named Questing, with at least 1 GB of RAM and 2 GB of free disk space.<\/li>\n\n\n<li>SSH access as <code>root<\/code>, or a normal user with working <code>sudo<\/code> privileges.<\/li>\n\n\n<li>Outbound HTTPS access to Ubuntu mirrors and <code>deb.nodesource.com<\/code>.<\/li>\n\n\n<li>No domain is needed for the installation or the localhost-only test.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-vps\">VPSLake Linux VPS<\/a> if you need a root-access Ubuntu server for Node.js projects.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu 25.10 is an interim release, not an LTS release, and its published support window ends in July 2026. If you are setting up a new production server after that date, choose a supported Ubuntu release instead; the commands below assume the Questing package sources still return normally.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The commands use <code>sudo<\/code>. If you are logged in as <code>root<\/code>, remove <code>sudo<\/code> from each command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Confirm Questing and refresh APT<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Confirming the release first prevents you from applying a repository setup intended for a different Ubuntu series.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>. \/etc\/os-release\nprintf 'ID=%s\\nVERSION_ID=%s\\nVERSION_CODENAME=%s\\n' \"$ID\" \"$VERSION_ID\" \"$VERSION_CODENAME\"\ndpkg --print-architecture\nsudo apt-get update\nsudo apt-get install -y ca-certificates curl gnupg<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The release check should show Ubuntu 25.10 and the <code>questing<\/code> codename. NodeSource\u2019s current Debian-style packages support the common <code>amd64<\/code> and <code>arm64<\/code> architectures.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ID=ubuntu\nVERSION_ID=\"25.10\"\nVERSION_CODENAME=questing\namd64<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>apt-get update<\/code> reports 404 errors from the Ubuntu mirrors, do not bypass the errors or disable signature checking. Ubuntu 25.10 is an interim release; upgrade the server to a supported release before continuing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Add the current Node.js APT repository<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The source post calls this a PPA, but NodeSource is actually a signed third-party APT repository. Its current-release script installs the keyring and source definition without the deprecated <code>apt-key<\/code> workflow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Download the official setup script locally, run it with <code>sudo<\/code>, and remove the temporary copy afterward:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/deb.nodesource.com\/setup_current.x -o \/tmp\/nodesource-setup-current.sh\nsudo -E bash \/tmp\/nodesource-setup-current.sh\nrm -f \/tmp\/nodesource-setup-current.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The script refreshes APT and creates <code>\/etc\/apt\/sources.list.d\/nodesource.sources<\/code>. Check the repository entry before installing the package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo grep -E '^(URIs|Suites|Components|Architectures|Signed-By):' \/etc\/apt\/sources.list.d\/nodesource.sources\napt-cache policy nodejs | sed -n '1,9p'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see a NodeSource URI, the <code>nodistro<\/code> suite, and a non-empty candidate. The current major can change over time; at the time of writing, the current selector points to the Node.js 26 line.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>URIs: https:\/\/deb.nodesource.com\/node_26.x\nSuites: nodistro\nComponents: main\nArchitectures: amd64\nSigned-By: \/usr\/share\/keyrings\/nodesource.gpg\n  Candidate: 26.x.y-1nodesource1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For the repository\u2019s supported setup variants, see the <a href=\"https:\/\/github.com\/nodesource\/distributions#debinstall\" target=\"_blank\" rel=\"noopener\">NodeSource Debian and Ubuntu instructions<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Install Node.js and npm<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The NodeSource <code>nodejs<\/code> package includes npm, so installing one package gives you the runtime and the standard JavaScript package manager.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install -y nodejs\nnode --version\nnpm --version\ncommand -v node\ncommand -v npm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The major version should match the candidate shown in Step 2, while patch and npm versions may change as the repository is updated.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>v26.x.y\n11.x.y\n\/usr\/bin\/node\n\/usr\/bin\/npm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If an older Ubuntu <code>nodejs<\/code> package was already installed, APT should select the NodeSource candidate because the setup script adds an APT preference for it. Confirm with <code>apt-cache policy nodejs<\/code> if the major version is unexpected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Run a localhost HTTP smoke test<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This test proves that Node.js can load its built-in HTTP module and answer a request while listening only on the loopback interface.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -e 'require(\"node:http\").createServer((request, response) =&gt; response.end(\"Node.js is working on Ubuntu 25.10\\n\")).listen(3000, \"127.0.0.1\")' &gt;\/tmp\/node-questing-test.log 2&gt;&amp;1 &amp;\nNODE_PID=$!\nsleep 1\ncurl --fail --silent http:\/\/127.0.0.1:3000\nkill \"$NODE_PID\"\nwait \"$NODE_PID\" 2&gt;\/dev\/null || true<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The request should return the following line. Because the server binds to <code>127.0.0.1<\/code>, you do not need a UFW rule for this temporary check.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Node.js is working on Ubuntu 25.10<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For a public application, put Node.js behind a TLS-enabled reverse proxy and open only the ports it needs. Do not run the application as <code>root<\/code> just to bind a low-numbered port.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Node.js installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run these checks to confirm the runtime, npm, architecture, built-in modules, and APT origin are all consistent:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node --version\nnpm --version\nnode -p 'process.platform + \" \" + process.arch'\nnode -e 'console.log(typeof require(\"node:fs\").readFileSync === \"function\" ? \"Built-in module check passed\" : \"Built-in module check failed\")'\napt-cache policy nodejs | sed -n '1,8p'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output includes a <code>v26<\/code> release from the current selector, a numeric npm version, <code>linux amd64<\/code> or <code>linux arm64<\/code>, a passed module check, and a candidate whose origin is <code>deb.nodesource.com<\/code>. Node.js APIs and runtime behavior are documented in the <a href=\"https:\/\/nodejs.org\/api\/\" target=\"_blank\" rel=\"noopener\">official Node.js API reference<\/a>.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Run Node.js on Ubuntu\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">Ubuntu VPS hosting<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Run Node.js on Ubuntu<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Deploy current Node.js applications on a root-access Ubuntu VPS.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-vps\" aria-label=\"View Linux VPS plans\">View Linux VPS plans<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>E: Failed to fetch ... questing ... 404 Not Found<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu 25.10 is an interim release and its repositories are no longer on the normal mirrors after the support window closes. Do not change the codename to another release or use an unsigned archive; back up the server and upgrade or reinstall it with a currently supported Ubuntu release, then repeat this guide.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>node<\/code> still shows an old major version<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The NodeSource script may not have completed, or your shell may still have a cached path. Inspect the candidate and clear Bash\u2019s command cache before reinstalling:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hash -r\ncommand -v node\napt-cache policy nodejs\nsudo apt-get update\nsudo apt-get install --only-upgrade -y nodejs\nnode --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The policy output should contain <code>https:\/\/deb.nodesource.com\/node_26.x<\/code> for the current branch. If it does not, rerun Step 2 and read its first error before installing again.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>Could not resolve host: deb.nodesource.com<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is a DNS or outbound-network problem, not a Node.js package problem. Test name resolution and HTTPS separately:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>getent hosts deb.nodesource.com\ncurl -I https:\/\/deb.nodesource.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An address from <code>getent<\/code> and an HTTPS response indicate that the repository is reachable. If either check fails, fix the VPS resolver, route, or provider-level egress restriction and then rerun Step 2.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><code>npm ERR! EACCES<\/code> when installing a global package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">APT-managed Node.js places global binaries under a system-owned prefix, so a regular user cannot write there. Prefer project-local dependencies:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/YOUR_APP\ncd ~\/YOUR_APP\nnpm init -y\nnpm install YOUR_PACKAGE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>YOUR_APP<\/code> with your application directory and <code>YOUR_PACKAGE<\/code> with the dependency name. This keeps the project files owned by your account; use a version manager if you specifically need several Node.js majors on one server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening and next steps<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Run production services under a dedicated non-root account and supervise them with systemd rather than leaving a shell process running.<\/li>\n\n\n<li>Keep <code>package-lock.json<\/code> in version control, store secrets outside the repository, and review <code>npm audit<\/code> results before changing production dependencies.<\/li>\n\n\n<li>If the application is public, allow only the required SSH, HTTP, and HTTPS ports in UFW. The <a href=\"https:\/\/vpslake.com\/ufw-firewall-generator\">VPSLake UFW firewall generator<\/a> can help draft a narrow ruleset for review.<\/li>\n\n\n<li>Track the Node.js release line your application supports. Current releases move quickly; choose the LTS selector for production when your dependencies do not require the newest features.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Is NodeSource the same thing as an Ubuntu PPA?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. A PPA is normally hosted through Launchpad, while NodeSource provides a signed APT repository. The installation experience is similar, but the source entry and signing key are managed by NodeSource.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does the repository use <code>nodistro<\/code> on Ubuntu 25.10?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">NodeSource\u2019s current setup script publishes a distribution-neutral APT entry and uses the Ubuntu system architecture. <code>nodistro<\/code> is intentional here; it avoids pretending that the package feed is a native Launchpad archive for Questing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should I install the current release or Node.js LTS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The current selector is useful when you need the newest runtime features and have checked dependency compatibility. For a long-lived production service, the LTS selector is usually the steadier choice; replace <code>setup_current.x<\/code> with <code>setup_lts.x<\/code> in Step 2 before running the script.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I install more than one Node.js version?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">APT is best suited to keeping one system-wide Node.js branch active. If different applications require different majors, use a per-user version manager and keep production services explicit about the Node binary they run.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Is NodeSource the same thing as an Ubuntu PPA?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. A PPA is normally hosted through Launchpad, while NodeSource provides a signed APT repository. The installation experience is similar, but the source entry and signing key are managed by NodeSource.\"}}, {\"@type\": \"Question\", \"name\": \"Why does the repository use `nodistro` on Ubuntu 25.10?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"NodeSource\u2019s current setup script publishes a distribution-neutral APT entry and uses the Ubuntu system architecture. `nodistro` is intentional here; it avoids pretending that the package feed is a native Launchpad archive for Questing.\"}}, {\"@type\": \"Question\", \"name\": \"Should I install the current release or Node.js LTS?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The current selector is useful when you need the newest runtime features and have checked dependency compatibility. For a long-lived production service, the LTS selector is usually the steadier choice; replace `setup_current.x` with `setup_lts.x` in Step 2 before running the script.\"}}, {\"@type\": \"Question\", \"name\": \"Can I install more than one Node.js version?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"APT is best suited to keeping one system-wide Node.js branch active. If different applications require different majors, use a per-user version manager and keep production services explicit about the Node binary they run.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install latest Node.js on Ubuntu 25.10 with NodeSource, verify npm and a local HTTP server, and fix common APT, DNS, and permission errors fast.","protected":false},"author":1,"featured_media":1222,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,9],"tags":[156,64,65,103],"class_list":["post-1221","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-vps-hosting","tag-javascript","tag-nodejs","tag-npm","tag-ubuntu-25-10","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=1221"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1221\/revisions"}],"predecessor-version":[{"id":4438,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1221\/revisions\/4438"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/1222"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=1221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=1221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=1221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}