Home Wiki.js Install Wiki.js Using Podman And Docker Compose In Debian 12

Install Wiki.js Using Podman And Docker Compose In Debian 12

By sk
507 views

Wiki.js is a modern and powerful open-source wiki software. It is lightweight, fast, and supports Markdown. In this guide, we will show you how to install Wiki.js using Podman and Docker Compose on Debian Linux 12.

Prerequisites

  1. Debian Linux 12 installed and running.
  2. Podman Desktop installed in rootless mode.
  3. Podman Compose or Docker Compose installed.

Step 1: Enable Podman Socket

Before running Docker Compose commands, enable the Podman socket for compatibility:

Start the Podman socket service:

systemctl --user enable --now podman.socket

Verify the socket is running:

systemctl --user status podman.socket

Export the Docker Host environment variable:

echo 'export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock' >> ~/.bashrc
source ~/.bashrc

Step 2: Create a Wiki.js Compose File

Create a file named docker-compose.yml and copy the following content into it:

version: "3"

services:
  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: wiki
      POSTGRES_PASSWORD: wikijsrocks
      POSTGRES_USER: wikijs
    logging:
      driver: "none" # Logs disabled
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data

  wiki:
    image: ghcr.io/requarks/wiki:2
    depends_on:
      - db
    environment:
      DB_TYPE: postgres
      DB_HOST: db
      DB_PORT: 5432
      DB_USER: wikijs
      DB_PASS: wikijsrocks
      DB_NAME: wiki
    restart: unless-stopped
    ports:
      - "8081:3000" 

volumes:
  db-data:

Save and close the file.

Step 3: Start Wiki.js with Podman

  1. Open a terminal.
  2. Navigate to the directory where you saved the docker-compose.yml file.
  3. Run the following command:
podman-compose up -d

This command will start the Wiki.js and PostgreSQL containers in detached mode.

Step 4: Access Wiki.js in Your Browser

Open your web browser and navigate to http://localhost:8081 from your address bar. Now the actual installation of Wiki.js will start.

Enter administration Email id, login password for Wiki.js admin user, your wiki site URL and click INSTALL. The Email id will be the username.

Install Wiki.js
Install Wiki.js

This will take a moment to setup WIki.js. Once the installation is complete, you will be redirected to the Wiki.js login page. Enter your Email id and the password that you have provided in the previous step.

Login to Wiki.js
Login to Wiki.js

    That's it. You can now start designing your home page or enter into the administration page and from there you can create all necessary pages.

    Wiki.js Welcome Page
    Wiki.js Welcome Page

    This is how Wiki.js Administration section looks like.

    Wiki.js Administration Page

    For get started with Wiki.js, visit the Wiki.js documentation.

    Step 5: Manage Containers

    Check running containers:

    podman ps

    Stop containers:

     podman-compose down

    View logs:

    podman logs <container-id>

    Conclusion

    You have successfully installed Wiki.js using Podman and Docker Compose on Debian Linux 12. This setup uses PostgreSQL as the database and runs in rootless mode, making it secure and efficient.

    Leave a Comment

    * By using this form you agree with the storage and handling of your data by this website.

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

    This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More