Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk11 min

How to Fix Node.js Installed but Not Running on a Linux Server

A practical runbook for the “node -v works but my app will not start” problem, covering executable paths, systemd units, journal errors, permissions, ports, reboot failures, and --permission.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If “Node.js is installed but not running,” first separate the runtime from the application. A successful node --version proves only that one Node executable can start in the current shell; it does not prove that your entry script exists, dependencies load, the service has its environment, or anything is listening on the expected port.

The reliable fix is to trace the same execution context from binary to entry point to service logs to socket: identify the exact Node path, run the application directly, inspect systemd and its journal, make the unit use absolute paths and explicit variables, test permissions as the service user, then verify local network reachability. This sequence also explains why node -v works but an app will not start, why a systemd Node service exits immediately, and why Node works over SSH but fails after reboot.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “Node is installed” actually proves

Linux can have several Node installations at once: a distribution package, a version-manager shim, a manually installed binary, or a path supplied by a shell profile. Your interactive shell may therefore resolve one executable while systemd starts with another, or with no Node path at all. Even when both contexts use the same binary, the application can still fail before opening a port.

There are four separate checks:

  • Runtime: can the selected Node executable launch?
  • Entry point: does the intended JavaScript file exist at the path used by the process?
  • Application startup: can imports, configuration, permissions, and initialization complete?
  • Service and network: does the supervisor keep the process alive and is a socket bound where clients expect it?

Debug them in that order. A failure at an earlier layer makes later tests misleading: for example, checking a reverse proxy cannot help when the service never reached its listen call.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

1. Prove which Node binary the failing context uses

Run these commands in the shell where you observed the problem:

command -v node
node --version
readlink -f "$(command -v node)"
which npm
npm --version

command -v shows the command selected by the shell, while readlink -f resolves symlinks to the real executable. Record both the path and version. A common trap is testing a version-manager shim over SSH and then configuring systemd with a path that exists only after a profile script has run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If systemd cannot see the same executable, use the absolute path returned above in the unit’s ExecStart=. Put application variables in the unit itself or in an EnvironmentFile=; do not depend on .bashrc, .profile, or another interactive-shell file. PID 1 does not automatically load those files.

2. Run the application without systemd

Running the exact entry point directly distinguishes a Node installation problem from an application or service-definition problem. Use the application’s real directory and an absolute script path:

cd /srv/myapp
/usr/bin/node /srv/myapp/server.js

Substitute the executable path you measured and the actual entry file. Capture the first error exactly, including its error code and stack trace. Do not background the command while diagnosing it; the foreground process preserves the original stderr and exit status.

Node resolves a non-absolute program entry point relative to the current working directory. If the file cannot be found, the CLI throws an error instead of silently searching the whole server. Thus, a wrong directory can look like a broken installation even when Node itself is healthy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Classify the first startup error

Observed failure What it means Next action
Entry file not found The path or current directory is wrong. Confirm the file with namei -l and use an absolute path in the service.
Module-resolution error A dependency is absent, installed for a different directory, or incompatible with the runtime. Check the deployment directory and lockfile installation; fix the dependency before returning to systemd.
Permission denied The process user cannot traverse a parent directory, read code, or access a required resource. Test the same operation as the service user and correct only the necessary ownership or mode.
Missing environment variable Your SSH session supplied configuration that the service does not have. Declare the value in the unit or its environment file, keeping secrets readable only by the service account.
Address already in use Another process owns the configured port. Identify the listener with ss, then stop, reconfigure, or replace the conflicting process.
Exception during initialization The application started loading but failed in its own setup code. Use the stack trace to repair configuration, migrations, external connections, or application logic.

If the foreground command stays running and serves requests, Node and the application are basically functional; the remaining fault is in the unit, boot environment, permissions, or network path. Stop the foreground process before testing the managed service so two copies do not compete for the same port.

3. Inspect systemd state and boot-time logs

For a unit named myapp.service, inspect state, the current boot’s journal, the complete unit definition, and the properties systemd actually applied:

sudo systemctl status myapp.service --no-pager
sudo journalctl -u myapp.service -b --no-pager -n 200
sudo systemctl cat myapp.service
sudo systemctl show myapp.service -p User -p WorkingDirectory -p ExecStart -p Environment

systemctl is the standard interface for unit state and service control. The journal normally contains the process’s stderr, exit status, restart attempts, and the point at which startup stopped. Read the earliest failure in the sequence, not only the final “failed” line.

How to read common systemd results

Result or symptom Likely cause
status=1/FAILURE Node launched, then the application returned a failure or threw during startup. Reproduce the command directly and compare its stderr.
203/EXEC systemd could not execute the file named in ExecStart=; the path may be wrong, missing, or not executable.
Immediate stop with no useful application output The working directory, executable, user, or environment may be invalid. Inspect the rendered unit with systemctl show, not just the file you intended to install.
Repeated starts followed by throttling The process is exiting quickly and systemd has limited restart attempts. Fix the first startup error before increasing restart settings.
Works manually but not as a unit The managed process has a different user, directory, PATH, variables, filesystem access, or port ownership.

When a drop-in override or generated unit is involved, systemctl cat reveals the combined definition. This prevents editing one file while another override silently wins.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Make the service unit explicit

A dependable unit states who runs the process, where it starts, which executable to invoke, and which configuration it receives. The following is a minimal baseline; change paths and the account to match your server:

[Unit]
Description=My Node.js application
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=myapp
WorkingDirectory=/srv/myapp
ExecStart=/usr/bin/node /srv/myapp/server.js
Restart=on-failure
Environment=NODE_ENV=production
# EnvironmentFile=/etc/myapp/myapp.env
StateDirectory=myapp
RuntimeDirectory=myapp

[Install]
WantedBy=multi-user.target

Why each setting matters

  • User=myapp avoids running application code as root and makes permission failures reproducible.
  • WorkingDirectory=/srv/myapp gives relative file and module lookups a known base. The absolute entry path in ExecStart= removes ambiguity about the program itself.
  • ExecStart= should name the real Node binary, not a shell expression or a version-manager command that only exists in an interactive session.
  • Environment= and EnvironmentFile= make production configuration visible to the service. Protect an environment file containing secrets with restrictive ownership and mode.
  • Restart=on-failure handles unexpected exits but does not repair a deterministic configuration error; an endlessly restarting broken process still needs its first error fixed.
  • After=network-online.target orders startup after the network target is considered online. It does not guarantee that every database or remote API is healthy.
  • StateDirectory= and RuntimeDirectory= ask systemd to create service-owned locations for persistent state and runtime data instead of making the application tree broadly writable.

Use the exact executable discovered in step one if it is not /usr/bin/node. If the application needs a different port, host, or feature flag, declare those values explicitly rather than assuming an SSH session exported them.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

5. Reload, enable, and test the unit

After creating or changing the unit, make systemd reread it and perform a controlled start:

sudo systemctl daemon-reload
sudo systemctl enable --now myapp.service
sudo systemctl restart myapp.service
sudo systemctl status myapp.service --no-pager

enable --now both registers the unit for the normal multi-user boot target and starts it immediately. The subsequent restart is useful after a code or environment change; status confirms the current state, but the journal remains the authoritative place for the process’s startup output.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the unit fails, do not repeatedly restart it while guessing. Return to the latest boot journal, correct one variable at a time, run daemon-reload when the unit changes, and restart once. This keeps the log sequence understandable and avoids restart throttling obscuring the original error.

6. Test file and directory access as the service user

Root can read almost anything, so a successful root test does not prove that User=myapp can start the application. Check the entry file and runtime itself under the same account:

sudo -u myapp test -r /srv/myapp/server.js
sudo -u myapp /usr/bin/node --version
namei -l /srv/myapp/server.js

namei -l displays permissions for every directory component. The service account needs execute permission on each parent directory to reach the file, read permission for code and configuration, and whatever access the application requires at runtime.

Repeat the test for every writable location: uploads, caches, generated reports, database files, Unix sockets, temporary files, and application logs. Prefer a dedicated directory owned by the service account. The StateDirectory= and RuntimeDirectory= settings provide managed locations for persistent and transient data; point the application at those paths when possible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Fix ownership and modes narrowly. Granting chmod -R 777 can hide the immediate symptom while exposing source, credentials, and user data to every local account. If a parent directory is owned by another deployment user, adjust only the required group membership or directory ACL rather than making the complete application tree writable.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

7. Confirm that Node is listening and reachable locally

Once the service reports active, verify that a process owns the expected TCP port:

sudo ss -ltnp
sudo ss -ltnp '( sport = :3000 )'
curl -v http://127.0.0.1:3000/

Use the application’s actual port in place of 3000. The first ss command shows all listening TCP sockets and their processes; the filtered form is quicker when you know the port. The local curl test removes DNS, external firewall rules, and most reverse-proxy variables from the equation.

Interpret the socket result

  • No listener: the process exited before binding, is configured for another port, or failed during initialization. Read the journal and application error.
  • A different process owns the port: stop or reconfigure the competing service, or select a free port for this application.
  • Node listens on 127.0.0.1: a reverse proxy on the same host can reach it, but direct external clients cannot. That binding can be intentional and is often preferable behind a proxy.
  • Node listens on the wrong address or port: correct the application’s environment and unit configuration, then restart it.
  • Local curl succeeds but remote access fails: investigate the reverse proxy, firewall, security policy, DNS, and external routing only after the local path is healthy.

8. Check Node’s permission model when it is enabled

Recent Node deployments can opt into the permission model with --permission. In enforcement mode, operations not granted by allow flags are denied with ERR_ACCESS_DENIED. The restrictions can affect filesystem reads and writes, network access, child processes, workers, native add-ons, WASI, FFI, and the inspector. A service that worked before this flag was added may therefore exit during initialization even though the files and port are correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Search both the unit files and launch scripts for the flag and for options injected through NODE_OPTIONS:

grep -R --line-number -- '--permission|NODE_OPTIONS' /etc/systemd/system /srv/myapp 2>/dev/null

Grant only the capabilities the application needs. For example, a service that reads its own tree and serves network traffic might require options resembling:

--permission --allow-fs-read=/srv/myapp --allow-net

The exact allow list depends on the application. If it writes uploads or state, add the narrowly scoped write location; if it launches a child process or loads a native add-on, account for that operation explicitly. Do not remove the permission model merely to make the error disappear unless you have accepted the security trade-off.

Node also provides audit mode through --permission-audit. Audit mode records permission violations while allowing execution, which can reveal the operations that must be granted before enforcement is turned back on. Treat the resulting log as an inventory to review, not as proof that every observed operation is desirable in production.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why Node works over SSH but fails after reboot

An SSH session and a boot-started unit differ in more than timing. SSH commonly supplies a user’s home directory, PATH modifications, version-manager initialization, exported secrets, and a convenient current directory. systemd starts with the unit’s declared environment and filesystem context; it does not infer those interactive choices.

Typical reboot-only failures include:

  • The unit names node, but the executable exists only inside a profile-managed PATH.
  • The script path is relative, so the boot-time working directory does not contain it.
  • A variable such as a database URL or encryption key was exported only in the SSH shell.
  • The service account cannot access a directory mounted later or owned by another deployment account.
  • The application starts before a required local dependency and exits without a retry strategy.
  • A previous manually started copy still owns the port during testing, creating an address conflict.

Use systemctl show to inspect what systemd actually applied, and test the binary as myapp rather than as your login user. Once paths, variables, ordering, and permissions are declared in the unit, a reboot exercises the same configuration that you tested manually.

Choosing a startup method on one Linux server

Several launch approaches can run Node, but they expose different operational behavior. For a single Linux server, systemd is usually the clearest baseline because it provides a standard state interface, boot integration, journal access, and declarative restart behavior.

Axis systemd unit Interactive shell or ad-hoc script Separate process manager
Startup authority PID 1 starts and supervises the process at boot. A user or script must remember to launch it. The manager starts its own daemon, which must itself be installed and enabled.
Environment reproducibility Variables, directory, user, and executable can be declared in one unit. Often depends on shell profiles and whichever directory the command was run from. Depends on that manager’s configuration format and startup integration.
Failure visibility Exit codes, status, stderr, and boot-scoped journal entries are available through standard commands. Output may disappear when the terminal closes or be scattered across custom logs. Visibility is split between the manager’s logs and the host’s service integration.
Restart behavior Policies such as Restart=on-failure are explicit and reviewable. Usually requires a loop, cron job, or manual intervention. Configured through manager-specific restart rules.

The choice does not change the debugging order: prove the executable, run the entry point, inspect the supervisor’s logs, verify permissions, and test the listener. A different manager cannot compensate for a missing file, absent variable, or application exception.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Final verification before calling the issue fixed

Consider the problem resolved only when all layers pass in the same service context:

  • The absolute Node executable and version are known.
  • The absolute entry point starts successfully from the declared working directory.
  • The unit names its user, executable, directory, environment, and restart policy.
  • The service account can read code and configuration and write only its required state locations.
  • The journal shows a clean start rather than a rapid failure loop.
  • The expected port is owned by the intended process.
  • curl reaches the application on the loopback address and port.
  • If the permission model is enabled, every required operation is explicitly allowed or intentionally observed in audit mode.

With those checks satisfied, failures outside the process—such as a reverse proxy, firewall, DNS record, or external dependency—can be investigated independently instead of being mistaken for a Node installation fault.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.