Deployment guide

Wiki.js

Overview

Wiki.js is a modern, open source wiki and documentation platform built on Node.js. This SecureAnyCloud image installs Wiki.js 2.5.314 (AGPL-3.0 licensed) to /opt/wikijs on Ubuntu 24.04 on Azure. It runs Wiki.js as a hardened systemd service behind an nginx reverse proxy on port 80, backed by a local PostgreSQL 16 database bound to loopback.

The image completes the first-run setup for you with a unique administrator account, generated on the first boot of every VM. There is no setup wizard to click through, so the wiki is ready to sign in to. SecureAnyCloud supports the image 24/7.

What you get:

  • Wiki.js 2.5.314 in /opt/wikijs, running on Node.js 18.
  • A local PostgreSQL 16 database bound to loopback (127.0.0.1:5432) and never exposed publicly.
  • nginx on :80 as a reverse proxy to the loopback Wiki.js backend on 127.0.0.1:3000.
  • A per-VM administrator account and fresh JWT signing certificates, generated on first boot.
  • A dedicated Azure data disk at /var/lib/wikijs that holds the PostgreSQL data directory (all pages, assets and history).
  • postgresql@16-main.service, wikijs.service and nginx.service as systemd units, enabled and active.
  • 24/7 SecureAnyCloud support.

Prerequisites

  • An active Azure subscription, an SSH key pair, and a VNet and subnet in the target region.
  • Standard_B2ms (2 vCPU / 8 GiB RAM) as a starting VM size.
  • Network Security Group inbound rules that allow 22/tcp from your management network and 80/tcp.

Wiki.js serves plain HTTP on port 80. For production, terminate TLS in front of it with your own domain (Step 11).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Wiki.js by SecureAnyCloud, and select Create.

  • On Basics, pick your subscription, resource group, region and size.
  • Under Administrator account, choose SSH public key and paste your key.
  • Under Inbound port rules, allow SSH (22) and HTTP (80).
  • On the Disks tab, review the dedicated data disk.

Then choose Review + create and Create.

Step 2 - Deploy from the Azure CLI

Accept the Marketplace terms, create the VM and open port 80:

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:wikijs-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name wikijs \
  --image sac1647283583153:wikijs-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name wikijs --port 80 --priority 1010

Step 3 - Connect to your VM

Connect to the VM over SSH as the administrator user:

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services and data disk

Wiki.js runs as wikijs.service, the Node.js app bound to loopback. It is backed by postgresql@16-main.service, the local database, which is also loopback-only. nginx.service is the public reverse proxy on port 80.

The PostgreSQL data directory holds every page, asset and revision. It lives on a dedicated Azure data disk mounted at /var/lib/wikijs. Check the services, the mount and the Node.js version:

systemctl is-active postgresql@16-main.service wikijs.service nginx.service findmnt -no SOURCE,TARGET,FSTYPE /var/lib/wikijs node --version

All three services report active, the data disk is mounted as ext4, and Node.js reports v18.x. PostgreSQL (5432) and Wiki.js (3000) are bound to 127.0.0.1 only. The sole public listener is nginx on :80.

Step 5 - Retrieve your admin password

First boot generates the administrator password uniquely for your VM and writes it to a root-only file. Read the file, and confirm that the health endpoint answers through nginx on port 80:

sudo cat /root/wikijs-credentials.txt curl -s -o /dev/null -w 'health HTTP %{http_code}\n' http://localhost/health

The file contains WIKIJS_ADMIN_EMAIL (admin@sac.local), WIKIJS_ADMIN_PASSWORD (your unique password) and WIKIJS_URL. The health endpoint needs no authentication and returns HTTP 200. Store the password somewhere safe.

Step 6 - Sign in to the web UI

Browse to http://<vm-public-ip>/ and select Login, or go straight to http://<vm-public-ip>/login. Sign in with admin@sac.local and the password from Step 5, using the Local authentication provider.

After you sign in, you land on your wiki's home view. On a new wiki, this view invites you to create your home page or open the administration area.

Step 7 - Create your first page

Select Create Home Page, or navigate to any new path and choose to create it. Pick the Markdown editor, give the page a title and path, and start writing. Wiki.js shows a live rendered preview beside the editor. When the page is ready, select Create to save and publish it.

Step 8 - Open the administration area

The administration area is at http://<vm-public-ip>/a. Its dashboard shows page, user and group counts and confirms that you are running the latest Wiki.js version. Use the sections on the left to configure your wiki:

  • General for the site name and host.
  • Locale, Navigation and Theme for language, menus and appearance.
  • Users and Groups for access control.
  • Authentication to add Azure AD, Google, SAML, LDAP and more.
  • Storage for Git sync and backups.
  • Search for the search engine.

Step 9 - Use the GraphQL login API

Wiki.js exposes a GraphQL API at /graphql. The authentication.login mutation (with strategy: "local") returns a signed JWT that you can use as a bearer token for scripting and integration. The request carries your admin password, so run it from a trusted shell and read the password from the root-only credentials file instead of typing it inline.

First, read the password into a shell variable with PW=$(sudo grep '^WIKIJS_ADMIN_PASSWORD=' /root/wikijs-credentials.txt | cut -d= -f2-). Then POST the login mutation to http://localhost:3000/graphql with the JSON body {"query":"mutation($u:String!,$p:String!){authentication{login(username:$u,password:$p,strategy:\"local\"){jwt responseResult{succeeded}}}}","variables":{"u":"admin@sac.local","p":"<your-password>"}}.

On success, the response contains a jwt and "succeeded":true. A wrong password returns no jwt.

Step 10 - Find where your data lives

The local PostgreSQL database stores all wiki content: pages, assets, uploads, history and the search index. Its data directory sits on the dedicated Azure data disk at /var/lib/wikijs. This keeps your content independent of the OS disk and lets you resize or snapshot it on its own. Check the mount and the data size:

findmnt -no SOURCE,TARGET,FSTYPE /var/lib/wikijs
sudo du -sh /var/lib/wikijs/postgresql

The PostgreSQL cluster lives under /var/lib/wikijs/postgresql/16/main. The database listens on 127.0.0.1:5432 only. To connect a local psql or a GUI, open an SSH tunnel from your workstation with ssh -L 5432:127.0.0.1:5432 azureuser@<vm-public-ip>. Never expose 5432 to the internet without TLS.

Step 11 - Enable HTTPS

Wiki.js is served as plain HTTP on port 80. For production, put your own domain in front and terminate TLS. For example, install certbot and an nginx TLS server block, or place the VM behind an Azure Application Gateway or Front Door with a managed certificate.

After you enable HTTPS, set your site host to the https:// address in Administration, General so generated links use it.

Maintenance

  • Restart the app: sudo systemctl restart wikijs.service
  • View logs: sudo journalctl -u wikijs.service -e
  • Database: the backing cluster is postgresql@16-main.service. Connect locally with sudo -u postgres psql wikijs.
  • OS updates: unattended-upgrades is enabled. Apply the latest security updates with sudo apt-get update && sudo apt-get -y upgrade, and reboot if a new kernel is installed.
  • Back up: snapshot the /var/lib/wikijs data disk, or run a pg_dump of the wikijs database while the service is quiet.

Support

SecureAnyCloud maintains this image and supports it 24/7. Wiki.js is licensed under AGPL-3.0. "Wiki.js" is a trademark of its respective owners. SecureAnyCloud provides this image, which is not endorsed by or affiliated with the Wiki.js project.

Deploy on Azure

Launch Wiki.js on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure