{"id":2051,"date":"2025-11-26T08:58:59","date_gmt":"2023-07-19T12:16:17","guid":{"rendered":""},"modified":"2025-02-02T00:46:18","modified_gmt":"2025-02-01T23:46:18","slug":"how-to-install-wiki-js-with-apache2-reverse-proxy-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-wiki-js-with-apache2-reverse-proxy-on-ubuntu-22-04\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 Wiki.js with Apache2 Reverse Proxy on Ubuntu 22.04"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<article>\n<p><strong>Wiki.js<\/strong> is a powerful, open-source wiki engine that supports Markdown and offers a user-friendly interface for managing documentation and collaboration. In this guide, we will show you how to install Wiki.js on <strong>Ubuntu 22.04<\/strong> and configure Apache2 as a reverse proxy. Hosting your Wiki.js instance on a  provides the necessary resources and performance required to run a high-traffic wiki, offering enhanced control, scalability, and security with a <strong>VPS server<\/strong>.<\/p>\n<h2>Step 1: Update Your VPS Server<\/h2>\n<p>Before starting the installation process, make sure your <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a> is updated. Run the following commands to ensure your system is up to date:<\/p>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<p>By hosting your Wiki.js instance on a <strong>Windows VPS<\/strong>, you can take advantage of dedicated resources that ensure a smooth and fast experience for your users.<\/p>\n<h2>Step 2: Install Node.js<\/h2>\n<p>Wiki.js is built on Node.js, so you need to install it before setting up Wiki.js. Install Node.js by running the following commands:<\/p>\n<pre><code>\r\ncurl -fsSL https:\/\/deb.nodesource.com\/setup_18.x | sudo -E bash -\r\nsudo apt install nodejs -y\r\n<\/code><\/pre>\n<p>After the installation, verify that Node.js is installed correctly by checking the version:<\/p>\n<pre><code>node -v<\/code><\/pre>\n<h2>Step 3: Install MongoDB<\/h2>\n<p>Wiki.js uses MongoDB to store its data. Install MongoDB using the following commands:<\/p>\n<pre><code>\r\nsudo apt install mongodb -y\r\nsudo systemctl enable mongodb --now\r\n<\/code><\/pre>\n<p>To verify that MongoDB is running, use the following command:<\/p>\n<pre><code>sudo systemctl status mongodb<\/code><\/pre>\n<h2>Step 4: Install Wiki.js<\/h2>\n<p>Now that the dependencies are installed, you can proceed with the installation of Wiki.js. First, create a directory for Wiki.js and navigate to it:<\/p>\n<pre><code>sudo mkdir -p \/var\/www\/wiki &amp;&amp; cd \/var\/www\/wiki<\/code><\/pre>\n<p>Download and extract the latest version of Wiki.js:<\/p>\n<pre><code>\r\nwget https:\/\/github.com\/Requarks\/wiki\/releases\/latest\/download\/wiki-js.tar.gz\r\ntar xzf wiki-js.tar.gz\r\nrm wiki-js.tar.gz\r\n<\/code><\/pre>\n<p>Next, configure Wiki.js by creating the configuration file:<\/p>\n<pre><code>cp config.sample.yml config.yml<\/code><\/pre>\n<p>Edit the <code>config.yml<\/code> file to set up your MongoDB connection and any other necessary configurations. Use the following command to open the file:<\/p>\n<pre><code>sudo nano config.yml<\/code><\/pre>\n<p>Once the configuration is set, start Wiki.js using the following command:<\/p>\n<pre><code>node server<\/code><\/pre>\n<h2>Step 5: Set Up Apache2 as a Reverse Proxy<\/h2>\n<p>To access Wiki.js via a domain or IP address, configure Apache2 as a reverse proxy. First, install Apache2:<\/p>\n<pre><code>sudo apt install apache2 -y<\/code><\/pre>\n<p>Enable the necessary Apache modules:<\/p>\n<pre><code>\r\nsudo a2enmod proxy\r\nsudo a2enmod proxy_http\r\nsudo a2enmod rewrite\r\n<\/code><\/pre>\n<p>Next, create a new virtual host configuration file for Wiki.js:<\/p>\n<pre><code>sudo nano \/etc\/apache2\/sites-available\/wiki.conf<\/code><\/pre>\n<p>Add the following configuration, replacing <code>your-domain.com<\/code> with your actual domain or server IP address:<\/p>\n<pre><code>\r\n\r\n    ServerAdmin admin@your-domain.com\r\n    ServerName your-domain.com\r\n\r\n    ProxyPass \/ http:\/\/localhost:3000\/\r\n    ProxyPassReverse \/ http:\/\/localhost:3000\/\r\n\r\n    ErrorLog ${APACHE_LOG_DIR}\/wiki-error.log\r\n    CustomLog ${APACHE_LOG_DIR}\/wiki-access.log combined\r\n\r\n<\/code><\/pre>\n<p>Enable the virtual host and restart Apache:<\/p>\n<pre><code>\r\nsudo a2ensite wiki.conf\r\nsudo systemctl restart apache2\r\n<\/code><\/pre>\n<h2>Step 6: Access Wiki.js<\/h2>\n<p>Once the configuration is complete, you can access Wiki.js by navigating to <code>http:\/\/your-domain.com<\/code> in your web browser. You will be taken to the initial setup screen where you can configure the admin account, connect to MongoDB, and finalize your Wiki.js setup.<\/p>\n<h2>Step 7: Secure Wiki.js with SSL (Optional)<\/h2>\n<p>For better security, it&#8217;s a good idea to secure your Wiki.js instance with SSL using Let&#8217;s Encrypt. Install Certbot by running:<\/p>\n<pre><code>sudo apt install certbot python3-certbot-apache -y<\/code><\/pre>\n<p>Run the following command to obtain and configure an SSL certificate for your domain:<\/p>\n<pre><code>sudo certbot --apache -d your-domain.com<\/code><\/pre>\n<p>Follow the on-screen instructions to complete the SSL setup. Once finished, your Wiki.js site will be accessible via HTTPS.<\/p>\n<h2>Step 8: Optimize Your VPS Server for Wiki.js<\/h2>\n<p>To ensure that your Wiki.js instance performs optimally, hosting it on a  is the best option. A <strong>VPS server<\/strong> offers dedicated resources, allowing your wiki to handle high traffic, serve content quickly, and scale as needed. A VPS also provides you with full control over your server, enabling you to tailor it to your specific project requirements.<\/p>\n<h2>Conclusion<\/h2>\n<p>Installing Wiki.js with Apache2 reverse proxy on Ubuntu 22.04 provides a powerful and efficient solution for managing your documentation and collaboration needs. By hosting your Wiki.js installation on a , you gain enhanced performance, scalability, and security, ensuring that your wiki can grow as your needs evolve.<\/p>\n<p>For more information on VPS hosting and optimizing your Wiki.js setup, visit  today.<\/p>\n<\/article>\n<footer>\n<p>\u00a9 2024 Windows VPS &#8211; All Rights Reserved<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Wiki.js is a powerful, open-source wiki engine that supports Markdown and offers a user-friendly interface for managing documentation and collaboration. In this guide, we will show\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-2051","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2051"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2051\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}