The way to an own clowd (part 6) - Frameworks for the cloud environment

Before starting the installation of individual services, it is worthwhile to prepare the most important development frameworks. Many open-source projects require certain programming languages or tools for their installation or further extension.

This chapter shows how to install the latest versions of Node.js, PHP, Go, and Rust on a fresh Debian server.

Node.js

Node.js is a modern runtime environment for many web applications, such as Wiki.js.

Since Debian often ships only older versions, you get the latest version directly via the NodeSource repository:

curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -

Then, install Node.js and the npm package manager:

sudo apt-get install -y nodejs

Verify the successful installation with:

node -v
npm -v

PHP

Many web applications – for example, Nextcloud – use PHP as a backend language.

To get the latest PHP version, add the Sury repository:

sudo apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common

sudo wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

Afterwards, update the package list and install PHP with common modules:

sudo apt update

sudo apt-get install -y php php-cli php-fpm php-zip php-xml php-mbstring php-curl php-gd php-pgsql

Check the installed version:

php -v

Go

Many modern server tools (e.g., Gitea) are written in Go. As with Node, Debian usually only provides outdated versions. Therefore, it is recommended to get Go directly from the official website (current version: 1.25.5, update if necessary):

wget https://go.dev/dl/go1.25.5.linux-amd64.tar.gz

Unpack and install Go globally:

sudo rm -rf /usr/local/go

sudo tar -C /usr/local -xzf go1.25.5.linux-amd64.tar.gz

Add Go to your PATH:

echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile

source ~/.profile

Check the installation:

go version

Rust

Rust is essential for some modern tools or plugins and stands out for its safety and performance.

As with Node.js, there is a convenient remote installer script:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Load the Rust environment into your profile and make it permanent:

source $HOME/.cargo/env

echo 'source $HOME/.cargo/env' >> ~/.profile

Check the installation:

rustc --version
cargo --version

Quick & Dirty

# Node.js
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs

# PHP
sudo apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common
sudo wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt-get update
sudo apt-get install -y php php-cli php-fpm php-zip php-xml php-mbstring php-curl php-gd php-pgsql

# Go
sudo apt-get remove -y golang-go
wget https://go.dev/dl/go1.25.5.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.25.5.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
source ~/.profile

# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env

Conclusion

With these few steps, you have laid the foundation to install and run almost any modern open-source project under Debian Bookworm, whether backend, web application, or CLI tool.