# Installation via installer (GNU/Linux)

> Source: https://ferron.sh/docs/v2/installation/installer-linux

Ferron can be installed on GNU/Linux systems using an installer script. This guide will walk you through the installation process.

## Installation steps

### 1. Run the installer

To install Ferron web server, run the following command:

```bash
sudo bash -c "$(curl -fsSL https://get.ferron.sh/v2)"
```

You will be prompted to choose the installation type. You might be also prompted whether to install Ferron using a package manager (if packages are available).

### 2. Access the web server

By default, Ferron serves content from the `/var/www/ferron` directory. Open a web browser and navigate to `http://localhost` to check if the server is running and serving the default `index.html` file.

If you see a "Ferron is installed successfully!" message on the page, the web server is installed successfully and is up and running.

## File structure

Ferron installed via the installer for GNU/Linux has following file structure:

- _/usr/sbin/ferron_ - Ferron web server
- _/usr/sbin/ferron-passwd_ - Ferron user password generation tool
- _/usr/sbin/ferron-precompress_ - Ferron static files precompression tool
- _/usr/sbin/ferron-yaml2kdl_ - Ferron configuration conversion tool
- _/var/log/ferron/access.log_ - Ferron access log in Combined Log Format
- _/var/log/ferron/error.log_ - Ferron error log
- _/var/www/ferron_ - Ferron's web root
- _/etc/ferron.kdl_ - Ferron configuration

## Updating Ferron

You can update Ferron to the latest version using the `ferron-updater` command.

## Upgrading from Ferron 1.x to Ferron 2

To upgrade Ferron from 1.x to 2.x, run the following command:

```bash
sudo bash -c "$(curl -fsSL https://get.ferron.sh/v1-to-v2)"
```

## Managing the Ferron service

### Stopping the service

To stop the Ferron service, run:

```sh
sudo /etc/init.d/ferron stop # For non-systemd systems
sudo systemctl stop ferron # For systemd systems
```

### Restarting the service

To restart the service:

```sh
sudo /etc/init.d/ferron restart # For non-systemd systems
sudo systemctl restart ferron # For systemd systems
```

### Reloading the configuration

To reload the configuration without restarting the service:

```sh
sudo /etc/init.d/ferron reload # For non-systemd systems
sudo systemctl reload ferron # For systemd systems
```