The official docs aren't clear on this - if you only want to host CyberChef and have no plans of doing any development work, simple download the pre-build zip file and host it on a web server.
Run these same steps to upgrade. Make sure to clear out the web root before upgrading.
Download the zip
wget https://github.com/gchq/CyberChef/releases/download/v10.0.0/CyberChef_v10.0.0.zip
Unzip and move to web root
unzip CyberChef_v10.0.0.zip -d /var/www/cyberchef
Change the name of the index.html file
mv /var/www/cyberchef/CyberChef_v10.0.0.html /var/www/cyberchef/index.html
Change ownership
chown www-data:www-data -R /var/www/cyberchef
The webserver config is very basic, here is what I'm using
<VirtualHost *:80>
DocumentRoot /var/www/cyberchef
DirectoryIndex index.html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Install Git
apt install git
Install Node.js. It's currently recommended to use v17 of Node and v8 of npm - I used v16 of Node.
Follow this Node.js installation guide
Install Grunt
npm install -g grunt-cli
Clone the project onto the server
mkdir /var/www/cyberchef
git clone https://github.com/gchq/CyberChef.git /var/www/cyberchef
Change ownership of the files
chown www-data:www-data -R /var/www/cyberchef
Move into the installation directory
cd /var/www/cyberchef
Use NPM to install
npm install
Create a production build of CyberChef. This will lint, test, compile and compress the source file and create a production-ready build in build/prod/
npm run build
The webserver config is very basic, here is what I'm using
<VirtualHost *:80>
DocumentRoot /var/www/cyberchef/build/prod
DirectoryIndex index.html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>