- Path:
docs/setup/ubuntu/os.md - Template Version:
20260508
This document describes the base Ubuntu operating system setup for a dedicated runtime user account referenced as user.
The account is intended to run application processes, use Docker, and maintain its own Node.js runtime through nvm.
This document does not describe application deployment, application configuration, Apache virtual hosts, reverse proxy rules, or service management.
Docker must be installed and running on the host.
Check Docker status:
sudo systemctl status dockerIf Docker is not installed, install and enable it before configuring the runtime user.
Run as an administrator:
sudo apt update
sudo apt install -y git curl ca-certificates build-essentialThe packages provide:
- git: repository access;
- curl: remote installation scripts and HTTP checks;
- ca-certificates: TLS certificate validation;
- build-essential: native dependency build tooling.
Create the dedicated user without password-based login:
sudo adduser --disabled-password --gecos "" user
sudo passwd -l userThe account is not intended for direct SSH password login.
Administrative access to the account is performed through sudo from an authorized administrator account:
sudo -iu userAdd the runtime user to the docker group:
sudo usermod -aG docker userThe group membership becomes active after starting a new login session for the user.
Switch to the runtime user:
sudo -iu userCheck the current user and group membership:
whoami
groupsExpected user:
user
The docker group should be present in the group list.
Check Docker access:
docker psRun the commands under the user account.
Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bashThe command uses the current upstream installer. Pin a specific nvm release if strict reproducibility is required.
Load nvm into the current shell session:
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"Install the current LTS version of Node.js:
nvm install --lts
nvm alias default nodeCheck the installation:
node -v
npm -vAfter this setup:
- the runtime user
userexists; - password-based login for
useris disabled; - administrative access is available through
sudo -iu user; usercan run Docker containers;- required system packages are installed;
nvmis installed under theuseraccount;- Node.js LTS is installed under the
useraccount; - npm is available under the
useraccount.