# Pangolin Install Guide

Pangolin is

Most of the guide is from their doc page, however, there is a part missing for making proxy redirect work properly.

[Pangolin Quick Install Guide](https://docs.digpangolin.com/self-host/quick-install)

[VPS Hardening Security Guide](https://docs.cyberpaw.org/books/ssh-commands-and-guides/page/linux-server-hardening-vps)

#####  

##### Pangolin Install Guide

This will resolve an issue of [https://pangolin.cyberpaw.org/auth/initial-setup](https://pangolin.cyberpaw.org/auth/initial-setup) site not being reachable, or getting Invalid ssl cert error.

1. Login trough SSH to VPS server that is preset with necessary security steps
2. Download the installer

```bash
curl -fsSL https://digpangolin.com/get-installer.sh | bash
```

3. Run the installer

```bash
sudo ./installer
```

4. Once installer is finished Configure basic Settings from prompts. The installer will prompt you for essential configuration: 
    1. Base Domain: Enter your root domain without subdomains (e.g., example.com)
    2. Dashboard Domain: Press Enter to accept the default pangolin.example.com or enter a custom domain
    3. Let’s Encrypt Email: Provide an email for SSL certificates and admin login
    4. Tunneling: Choose whether to install Gerbil for tunneled connections (default: yes). You can run Pangolin without tunneling. It will function as a standard reverse proxy.
    5. Email Configuration: Say no, if you don't have SMTP server set up
    6. CrowdSec: say Yes to install and self manager CrowdSec
5. Once installer is ready try to go to:

```
https://pangolin.example.com/auth/initial-setup
```

If you get Invalid SSL Certificate error or Site can't be reached continue with steps below

##### Traefik dynamic\_config.yml Change

1. Navigate to Traefik Config Directory

```bash
cd /config/traefik
```

2. Backup existing file

```bash
cp dynamic_config.yml dynamic_config.yml.bak
```

3. Edit yml

```bash
nano dynamic_config.yml
```

4. Add new line in router part

```yaml
    setup-router:
      rule: "Host(`pangolin.cyberpaw.org`) && PathPrefix(`/auth`)"
      service: api-service
      entryPoints:
        - websecure
      tls:
        certResolver: letsencrypt
```

5. Save and Exit
6. Restart traefik container

```bash
docker restart <traefik_container_name>
```

Now try to go to initial setup and follow initial steps.