Skip to content

Installing Wiki.js on Debian 12: A Step-by-Step Guide

Master the process of setting up Wiki.js on Debian 12, a robust, contemporary wiki solution. Dive into this comprehensive guide for a hassle-free installation.

Instructions for Setting Up Wiki.js on Debian 12
Instructions for Setting Up Wiki.js on Debian 12

Installing Wiki.js on Debian 12: A Step-by-Step Guide

In this article, we will walk you through the essential steps to install and configure Wiki.js on a Debian 12 Virtual Private Server (VPS). Wiki.js, an open-source, modern wiki software, is built on Node.js and backed by a PostgreSQL database.

1. **Prepare your system:** Begin by updating and upgrading your system: ```bash sudo apt update sudo apt upgrade -y ```

2. **Install dependencies:** Install the necessary packages, including Node.js, PostgreSQL, and Nginx (for serving Wiki.js over HTTP/HTTPS): ```bash sudo apt install -y curl gnupg postgresql postgresql-contrib nginx curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs ```

3. **Set up the PostgreSQL database and user:** Switch to the PostgreSQL user and create a database and user for Wiki.js: ```bash sudo -i -u postgres psql CREATE DATABASE wikijs; CREATE USER wikijsuser WITH ENCRYPTED PASSWORD 'your_secure_password'; GRANT ALL PRIVILEGES ON DATABASE wikijs TO wikijsuser; \q exit ```

4. **Download and install Wiki.js:** Download the latest stable Wiki.js release or clone the repository: ```bash mkdir /var/wiki cd /var/wiki curl -sSo- https://wiki.js.org/install.sh | bash ``` Alternatively: ```bash git clone https://github.com/Requarks/wiki.git cd wiki npm install ```

5. **Configure Wiki.js:** Start Wiki.js for the first time using: ```bash node server ``` It will guide you through the initial configuration in your browser (typically http://your-server-ip:3000). Enter your database details, admin user info, and other settings.

6. **Set up Wiki.js as a systemd service:** Create a `wikijs.service` file under `/etc/systemd/system/`: ``` [Unit] Description=Wiki.js After=network.target

[Service] Type=simple User=your_user Group=your_user WorkingDirectory=/var/wiki ExecStart=/usr/bin/node server Restart=always

[Install] WantedBy=multi-user.target ``` Enable and start the service: ```bash sudo systemctl daemon-reload sudo systemctl enable wikijs sudo systemctl start wikijs ```

7. **Configure Nginx as a reverse proxy (optional but recommended):** Set up Nginx to proxy requests to Wiki.js on localhost:3000 and enable HTTPS using Certbot or your preferred SSL manager.

By following these steps, you will have successfully installed and configured Wiki.js on a Debian 12 VPS. Wiki.js offers a range of features, including a responsive Markdown-first editor, real-time search, custom themes, and multi-language support. For more advanced integrations like Git, Google Drive, S3, etc., explore Wiki.js's modular architecture with over 30 available integrations.

When you access Wiki.js and create the administrator user, you can start using it for internal IT documentation, developer wikis, academic or research teams, customer-facing knowledge bases, and project documentation. Wiki.js on Debian 12 is also suitable for enterprise documentation systems due to its modular design and LDAP/SAML support.

When choosing a VPS plan, ensure it has at least 2 CPUs, 2 GB RAM, and 20 GB SSD to provide a smooth user experience. Happy wiki-ing!

  1. Embrace modern lifestyle: With your new Debian 12 VPS running Wiki.js, organize and streamline your home-and-garden data using this open-source wiki software.
  2. Technology advancements for a digitally organized home: Leverage data-and-cloud-computing to manage and utilize Wiki.js's features such as custom themes, real-time search, and multi-language support, creating a more technologically integrated home-and-garden environment.

Read also:

    Latest