# Manual installation

This guide explains how to manually install and host Zenith using a web server.

The example server used here is **Caddy** because it has the easiest SSL-setup, but any web server (Nginx, Apache, etc.) will work.

---

# 1. Requirements

You need:

- A Linux server
- Root or sudo access
- A domain or IP address
- Basic terminal knowledge

Install the required tools:

Debian/Ubuntu:
```bash
sudo apt update
sudo apt install git curl
````

---

# 2. Install Caddy

Install Caddy using the official repository.

```bash
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | \
  sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg

curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | \
  sudo tee /etc/apt/sources.list.d/caddy-stable.list

sudo apt update
sudo apt install caddy
```

Check if it works:

```bash
caddy version
```

---

# 3. Download the Project

Clone the repository.

```bash
git clone https://git.crystalsky.dev/CrystalSky/zenith.git
cd zenith
```

Your project should look like this:

```
Dockerfile
images.txt
index.html
README.md
script.js
stylesheet.css
```

---

# 4. Move the Files to the Web Directory

Create a directory for the website.

```bash
sudo mkdir -p /var/www/zenith
```

Copy the files:

```bash
sudo cp -r * /var/www/zenith
```

Set permissions:

```bash
sudo chown -R caddy:caddy /var/www/zenith
```

---

# 5. Configure Caddy

Edit the Caddy configuration:

```bash
sudo nano /etc/caddy/Caddyfile
```

Example configuration:

```
example.com {
    root * /var/www/zenith
    file_server
}
```

If you don't have a domain yet, you can also use:

```
:80 {
    root * /var/www/zenith
    file_server
}
```

Save the file. (`Ctrl+X`, `y` then `enter`)

---

# 6. Restart Caddy

Reload the configuration:

```bash
sudo systemctl reload caddy
```

Or restart:

```bash
sudo systemctl restart caddy
```

Check the status:

```bash
systemctl status caddy
```

---

# 7. Open the Website

Open your browser and visit:

```
http://your-server-ip
```

or

```
https://your-domain
```

You should now see Zenith.

---

# 8. Updating the Site

To update the site:

```bash
cd zenith
git pull
sudo cp -r * /var/www/zenith
```

---

# Notes

* All files are served as static content.
* No build step is required.
* The `Dockerfile` not relevant for manual installation.