[[!meta title="Build a local copy of the website"]]

The website [[https://tails.boum.org/]] is built using
[Ikiwiki](https://ikiwiki.info) from source code that is available in
our main Git repository, along with the rest of the Tails code.

You can build a local copy of the website on your computer. Building the
website produces a set a HTML pages stored on your system that you can
open in your usual web browser even while working offline. Doing so is
useful for documentation writers and translators to see how their
changes will apply on the website.

[[!toc]]

Build the website in Linux
==========================

1. Update the list of available packages:

       sudo apt-get update

2. Install the required packages:

       sudo apt-get install libyaml-perl libyaml-libyaml-perl po4a \
        perlmagick libyaml-syck-perl ikiwiki

   Note that in order to enable Ikiwiki with RTL language support,
   you'll need to install ikiwiki version 3.20140227 or newer.
   In Debian this version is currently available in Jessie.

3. Clone our main [[Git repository|git]]:

       git clone https://git-tails.immerda.ch/tails

[[!inline pages="contribute/build/website/src.inline" raw="yes"]]

4. Build the website:

       cd tails
       ./build-website

[[!inline pages="contribute/build/website/languages.inline" raw="yes"]]

5. You can now browse your local copy of the website in the following folder:

   <span class="filename">config/chroot_local-includes/usr/share/doc/tails/website/</span>

<a id="tails"></a>

Build the website in Tails
==========================

1. [[Create and configure|doc/first_steps/persistence/configure]] a persistent volume and activate the following features:

   - Personal Data
   - APT Packages
   - APT Lists

2. Restart Tails, [[enable the persistence|doc/first_steps/persistence/use]], and [[set up an administration password|doc/first_steps/startup_options/administration_password]].

3. Update the list of available packages:

       sudo apt-get update

4. Install the required packages:

       sudo apt-get install libyaml-perl libyaml-libyaml-perl po4a \
        perlmagick libyaml-syck-perl ikiwiki

5. Clone our main [[Git repository|git]] in the <span class="filename">Persistent</span> folder:

       cd ~/Persistent/
       git clone https://git-tails.immerda.ch/tails

[[!inline pages="contribute/build/website/src.inline" raw="yes"]]

6. Build the website:

       cd tails
       ./build-website --set destdir="/home/amnesia/Persistent/Tor Browser/tails" "$@"

[[!inline pages="contribute/build/website/languages.inline" raw="yes"]]

7. You can now visit the following link in <span class="application">Tor Browser</span> to browse your local copy of the website:

   [[file:///home/amnesia/Persistent/Tor Browser/tails/index.en.html]]
