Video coming soon…

📚 Setup Wiki.js — Self-Hosted Knowledge Base & Team Wiki

Deploy Wiki.js on Ubuntu with Docker and PostgreSQL — a powerful, extensible open-source wiki platform with Markdown editing, page versioning, LDAP authentication, and a beautiful modern UI.

⚠️ Always review any script before running it on your server. Test in a staging environment first.

📦 Resources & Setup Scripts

Before starting, please make sure to grab the required scripts from our GitHub repository to follow along with the video easily.

Automated install script — deploys Wiki.js with PostgreSQL, persistent storage, and a web UI on port 3000.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/refs/heads/main/tools/wikijs/wikijs-ubuntu.sh
chmod +x wikijs-ubuntu.sh
sudo bash wikijs-ubuntu.sh

Tutorial Steps

1 Download the Script

wget https://raw.githubusercontent.com/mhmdali94/Docker/refs/heads/main/tools/wikijs/wikijs-ubuntu.sh

2 Make it Executable

chmod +x wikijs-ubuntu.sh

3 Run the Installer

The script installs Docker, deploys a PostgreSQL container (postgres:15) and a Wiki.js container (requarks/wiki:2), creates a Docker network, and sets the required DB_TYPE=postgres, DB_HOST, DB_PORT=5432, DB_NAME, DB_USER, and DB_PASS environment variables.

sudo bash wikijs-ubuntu.sh

4 Access the Web UI

Open your browser and navigate to the Wiki.js setup wizard:

http://<your-server-ip>:3000

Ports Used

PortPurpose
3000Wiki.js Web UI (HTTP)
5432PostgreSQL (internal only)

Overview

Wiki.js is an open-source, feature-rich wiki platform built on Node.js and Vue.js. It uses PostgreSQL (or MySQL/SQLite) as a data backend and offers a beautiful modern interface for creating and managing documentation. Core features include Markdown editing with live preview, a WYSIWYG visual editor, full page revision history, permission-based access control, LDAP/SAML/OAuth2 single sign-on, full-text search via PostgreSQL or Elasticsearch, multilingual content, page commenting, and a rich administration panel. Wiki.js is suitable for teams, companies, and individuals who need a self-hosted knowledge base with enterprise-grade features.

Why Use It

Confluence and Notion charge per-user monthly fees that scale quickly for growing teams. Wiki.js is entirely free and self-hosted — pay only for your server. Its elegant UI makes it approachable for non-technical users, while its LDAP integration, API, and Elasticsearch support satisfy IT requirements. Page versioning and audit logs make it suitable for regulated environments where documentation history matters.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              Wiki.js uses port 3000 for the web UI. PostgreSQL on port 5432 should never be exposed publicly — it is used only on the internal Docker network between Wiki.js and the database. Restrict port 3000 to LAN or put it behind Nginx Proxy Manager with HTTPS and optionally HTTP Basic Auth. Firewall example: ufw allow from 192.168.1.0/24 to any port 3000.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    BookStack is a simpler, chapter/book-organised wiki popular for documentation without complex permissions. Outline is a modern Notion-like team wiki with real-time collaboration but requires more infrastructure. DokuWiki is a flat-file (no database) wiki ideal for simple setups. MediaWiki (Wikipedia's engine) is powerful but complex. Gitea/Forgejo wikis are suitable if your documentation lives alongside your code repository.

                    When Not to Use It

                    If you need real-time collaborative editing (Google Docs-style), Wiki.js is not designed for that — use Outline or Etherpad instead. For very simple flat-file documentation, DokuWiki has a much lower operational footprint. Wiki.js v3 is in development; the current stable v2 has known limitations with large page counts and may be slower on lower-end servers without proper PostgreSQL indexing.

                    PrismaTechWork Professional Help

                    PrismaTechWork provides end-to-end infrastructure services.

                      Contact Us

                      Frequently Asked Questions

                      What database does Wiki.js require?

                      Wiki.js supports PostgreSQL (recommended), MySQL/MariaDB, Microsoft SQL Server, and SQLite. PostgreSQL is strongly recommended for production as it provides the best performance and full-text search indexing capabilities via the built-in search engine.

                      Can Wiki.js import from Confluence or MediaWiki?

                      Yes. Wiki.js supports importing from Confluence (XML export), MediaWiki (XML dumps), DokuWiki, and plain Markdown files. The import tool is accessible from the Administration panel under Import/Export.

                      Does Wiki.js support LDAP or Active Directory login?

                      Yes. Wiki.js supports LDAP, Active Directory, SAML 2.0, OpenID Connect, GitHub, Google, and local username/password authentication. Multiple strategies can be enabled simultaneously from Administration → Authentication.

                      How do I enable full-text search in Wiki.js?

                      Wiki.js supports the built-in database search (uses PostgreSQL full-text search), Elasticsearch, AWS CloudSearch, and Algolia. Configure the search engine in Administration → Search Engine. PostgreSQL full-text search works out of the box with no additional services.

                      What editors does Wiki.js support?

                      Wiki.js provides a Markdown editor with live preview, a visual WYSIWYG editor (ProseMirror-based), a code editor for raw HTML, and an AsciiDoc editor. Users can switch between editors per-page from the page settings.