DO NOT upgrade from
1.0.xusing these instructions! Use the Migrate from Wiki.js v1.x instructions instead. These instructions are for
While upgrades are generally safe and it's very unlikely that it would result in data loss, it's your responsibility to have a proper backup of your database before performing an upgrade. Note that it's not possible to go back to a previous version of Wiki.js once the database schema has been upgraded.
Select your platform:
Upgrading is simply a matter of recreating the container with the latest image version:
# Stop and remove container named "wiki" docker stop wiki docker rm wiki # Pull latest image of Wiki.js docker pull requarks/wiki:2 # Create new container of Wiki.js based on latest image docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_TYPE=mysql" -e "DB_HOST=db" -e "DB_PORT=3306" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" requarks/wiki:2
Check out the Docker installation guide for all the possible options when creating a Wiki.js container.
The following commands will pull the latest image and recreate the containers defined in the docker-compose file:
docker-compose pull wiki docker-compose up --force-recreate
The commands below assume an installation within a subfolder named
cp wiki/config.yml ~/config.yml.bak
rm -rf wiki/*
tar xzf wiki-js.tar.gz -C ./wiki cd wiki
cp ~/config.yml.bak ./config.yml
The commands below assume an installation at folder location
Copy-Item "C:\wiki\config.yml" -Destination "C:\config.yml.bak"
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://github.com/Requarks/wiki/releases/download/2.5.170/wiki-js-windows.tar.gz" -OutFile "wiki-js.tar.gz"
tar xzf wiki-js.tar.gz -C "C:\wiki" cd C:\wiki
The tar utility is only available on Windows 10. On earlier versions, you'll need a 3rd-party utility like 7-zip to extract the file.
config.ymlbackup file back to it's original location.
Copy-Item "C:\config.yml.bak" -Destination "C:\wiki\config.yml"
Read the transfer between servers guide to learn how to move an existing 2.x Wiki.js installation to a new server.
Note that the new server Wiki.js version doesn't need to match the old server. The installation will automatically be updated to the latest version upon restore. For example, it's perfectly safe to migrate a 2.2 installation on the old server to 2.5 on the new server.