Instructions for Installing Wiki.js on Ubuntu 24.4 LTS
Ubuntu 24.04, with its support for containerised workflows and cloud-native deployments, offers an ideal environment for hosting a modern, open-source documentation and knowledge base system like Wiki.js. This article provides a concise guide on how to install and configure Wiki.js on Ubuntu 24.04 LTS.
1. **Update system and install dependencies:**
Start by updating your system and installing the necessary dependencies:
```bash sudo apt update && sudo apt upgrade -y sudo apt install curl gnupg build-essential -y ```
2. **Install Node.js:**
Wiki.js requires Node.js (LTS version recommended, e.g., 18.x). Install it from nodesource:
```bash curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install nodejs -y ```
3. **Install PostgreSQL:**
```bash sudo apt install postgresql postgresql-contrib -y ```
Create a PostgreSQL database and user for Wiki.js:
```bash sudo -i -u postgres psql CREATE DATABASE wikijs; CREATE USER wikijs WITH ENCRYPTED PASSWORD 'your_secure_password'; GRANT ALL PRIVILEGES ON DATABASE wikijs TO wikijs; \q ```
4. **Download and install Wiki.js:**
Create a system user for Wiki.js, switch to it, and download the Wiki.js release (for example, v2.x):
```bash sudo adduser --system --group wikijs sudo mkdir /var/wiki sudo chown wikijs:wikijs /var/wiki sudo -u wikijs bash cd /var/wiki curl -sSL https://wiki.js.org/install.sh | bash ```
Alternatively, you can download the Wiki.js package manually from their GitHub releases and extract it.
5. **Configure Wiki.js:**
Copy the sample config and edit it to connect to your PostgreSQL database:
```bash cp config.sample.yml config.yml nano config.yml ```
In `config.yml`, set the database connection details:
```yaml db: type: 'postgres' host: 'localhost' port: 5432 user: 'wikijs' pass: 'your_secure_password' db: 'wikijs' ```
Configure binding address if necessary (`bindAddress: "0.0.0.0"` to allow external connections).
6. **Run Wiki.js:**
Start the app as the wikijs user:
```bash node server ```
Or better, create a systemd service for Wiki.js to manage it in the background.
7. **(Optional) Setup Nginx as a reverse proxy:**
Install Nginx:
```bash sudo apt install nginx -y ```
Configure Nginx to proxy requests to Wiki.js (default port 3000) and secure it with Let's Encrypt SSL:
```nginx server { listen 80; server_name wiki.yourdomain.com;
location / { proxy_pass http://localhost:3000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } ```
Then obtain SSL certificate with Certbot and configure HTTPS.
This process aligns with the Debian 12 Wiki.js installation approach documented in June 2025, which should work properly on Ubuntu 24.04 as well. For detailed commands and configurations, adapt Debian instructions for Ubuntu.
For those seeking a containerized approach, Docker on Ubuntu 24.04 may be considered, but this article focuses on direct installation.
[1] Documentation link: https://wiki.js.org/installation/ubuntu-24.04-lts
- Furthermore, to enhance your home-and-garden lifestyle, consider automating your greenhouse using technology. You can use various home automation tools and sensors to monitor and control temperature, humidity, and light levels, ensuring optimal growing conditions.
- In addition to a modern lifestyle, keeping your data and cloud computing services secure is essential. Implementing the latest technology, such as artificial intelligence and machine learning algorithms, can help detect and prevent cyber threats, ensuring your data remains protected.