Install Ollama, Codex, OpenCode, Openclaw

Install Ollama

You will need sudo, then

To add Ollama as a startup service

Create a service file in /etc/systemd/system/ollama.service:

Then start the service:

Then add Qwen

Ref [1]

Add Gemma

Ref [1]

Install OpenAI Codex

The cleanest is installing Node and global npm packages via nvm so no sudo or APT conflicts are involved.

Install Node.js using nvm (recommended)

Run once:

Verify installation:

Expected:

Install global packages (no sudo required)

Now you can install global packages without sudo:

Verify:

Expected:

Where packages are installed

With nvm, everything is installed inside your home directory:

Executables are available automatically via PATH:

Important note if you previously used ~/.npm-global

If you previously configured npm like this:

that setup should be removed before using nvm, otherwise global installs may go to the wrong place and tools such as codex may fail to find node.

You can clean up old entries like this:

If you added ~/.npm-global/bin to your PATH in ~/.bashrc, remove that old line as well.

Why this is better

* No sudo needed
* No broken APT dependencies
* No conflict between Ubuntu and NodeSource packages
* No conflict with old ~/.npm-global prefix settings
* Clean, isolated environment per user

This works because nvm installs Node and npm entirely in your home directory, avoiding system-level package conflicts and permission issues.

OpenCode

Install:

Quick setup:

To configure without launching:

Add a configuration block to ~/.config/opencode/opencode.json:

 

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x