> ## Content Index
> Fetch the complete content index at: https://blog.esadax.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# ntfy
- URL: https://blog.esadax.com/it/ntfy-it-2/
- Published: 2026-11-15T05:13:46.000Z
- Updated: 2026-11-15T05:13:46.000Z
- Author: Esadax 
- Tags: #tr-apps-03-catalog-ntfy, #it, #mdx-imported, Apps

# Guida all'installazione di ntfy Server

Questa guida fornisce le istruzioni per l'installazione del server **ntfy** su varie distribuzioni Linux, così come altri sistemi operativi. ntfy è un semplice servizio di notifica pub-sub basato su HTTP.

## Prerequisiti

- Un sistema Linux (o un altro sistema operativo supportato)
- Accesso root o privilegi sudo
- Una connessione internet per scaricare binari e pacchetti

---

## 1\. Installazione manuale dai sorgenti (tarball binari)

Questo metodo funziona su qualsiasi distribuzione Linux che supporti l'architettura specifica del tuo sistema.

### Passaggio 1: identifica la tua architettura

Esegui `uname -m` per controllare la tua architettura:

- `x86_64` o `amd64`
- `armv7` o `armhf`
- `arm64` (aarch64)
- `armv6`

### Passaggio 2: scaricare ed estrarre il binario

**Esempio per x86\_64/amd64:**

```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.28.0/ntfy_2.28.0_linux_amd64.tar.gz
tar zxvf ntfy_2.28.0_linux_amd64.tar.gz

```

**Esempio per armv7/armhf:**

```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.28.0/ntfy_2.28.0_linux_armv7.tar.gz
tar zxvf ntfy_2.28.0_linux_armv7.tar.gz

```

**Esempio per arm64:**

```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.28.0/ntfy_2.28.0_linux_arm64.tar.gz
tar zxvf ntfy_2.28.0_linux_arm64.tar.gz

```

### Passaggio 3: installare i file binari e di configurazione

```bash
# Copy the binary to /usr/bin
sudo cp -a <architecture>/ntfy /usr/bin/ntfy

# Create config directory and copy files
sudo mkdir -p /etc/ntfy
sudo cp <architecture>/client/client.yml /etc/ntfy/
sudo cp <architecture>/server/server.yml /etc/ntfy/

```

### Passaggio 4: avviare il server

```bash
sudo ntfy serve

```

---

## 2\. Installazione come servizio di sistema (Systemd)

Se si desidera che il server si avvii automaticamente all'avvio, utilizzare systemd.

### Prerequisiti

- Assicurarsi che il sistema operativo utilizzi systemd (`systemctl --version`).
- È necessario aver installato i file binari e di configurazione nel passaggio 1 precedente.

### Fasi

**Verificare lo stato:**

```bash
sudo systemctl status ntfy

```

**Ricarica Systemd e avvia il servizio:**

```bash
sudo systemctl daemon-reload
sudo systemctl enable ntfy
sudo systemctl start ntfy

```

**Copia il file Service Unit:**

```bash
# Replace <architecture> with your system's architecture (e.g., amd64, armv7)
sudo mv <architecture>/server/ntfy.service /etc/systemd/system/
sudo chmod 644 /etc/systemd/system/ntfy.service

```

---

## 3\. Installazione come servizio di sistema (OpenRC)

Per i sistemi che usano OpenRC (ad esempio, Alpine Linux, Gentoo).

### Fasi

**Aggiungi al livello di esecuzione predefinito (per avviare all'avvio):**

```bash
sudo rc-update add ntfy default

```

**Avvia il servizio:**

```bash
sudo rc-service ntfy start

```

**Copia lo script di servizio:**

```bash
# Replace <architecture> with your system's architecture
sudo mv <architecture>/server/ntfy.openrc /etc/init.d/ntfy
sudo chmod 755 /etc/init.d/ntfy

```

---

## 4\. Installazione tramite repository di pacchetti

### Debian/Ubuntu

**Nota:** A partire dalla fine del 2025, il repository ufficiale è stato spostato su `archive.ntfy.sh`. Il vecchio (`heckel.io`) è deprecato.

#### Usare APT (raccomandato)

```bash
# Add keyring
sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/ntfy.gpg https://archive.ntfy.sh/apt/keyring.gpg
sudo apt install apt-transport-https

# Add repository
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/ntfy.gpg] https://archive.ntfy.sh/apt stable main" | sudo tee /etc/apt/sources.list.d/ntfy.list

# Update and Install
sudo apt update
sudo apt install ntfy

```

#### Installazione manuale.deb

```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.28.0/ntfy_2.28.0_linux_amd64.deb
sudo dpkg -i ntfy_*.deb
sudo systemctl enable ntfy
sudo systemctl start ntfy

```

### Fedora/RHEL/CentOS

```bash
# Install RPM
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.28.0/ntfy_2.28.0_linux_amd64.rpm

# Enable and Start
sudo systemctl enable ntfy
sudo systemctl start ntfy

```

### Distribuzioni di Arch Linux

#### Usare AUR Helper (raccomandato)

```bash
paru -S ntfysh-bin

```

#### Manuale di installazione

```bash
curl https://aur.archlinux.org/cgit/aur.git/snapshot/ntfysh-bin.tar.gz | tar xzv
cd ntfysh-bin
makepkg -si

```

### NixOS / Nix

- **Configurazione NixOS:** Aggiungi `services.ntfy-sh.enable = true;` al tuo `/etc/nixos/configuration.nix` ed esegui `nixos-rebuild switch`.
- **Utente Ambiente:** `nix-env -iA ntfy-sh`

### FreeBSD

```bash
pkg install go-ntfy

```

---

## \- Cinque. Installazione di macOS

macOS supporta la CLI (`ntfy publish`, `ntfy subscribe`) ma **non supporta il server** tramite pacchetti ufficiali.

### Installazione manuale CLI

```bash
curl -L https://github.com/binwiederhier/ntfy/releases/download/v2.28.0/ntfy_2.28.0_darwin_all.tar.gz > ntfy.tar.gz
tar zxvf ntfy.tar.gz
sudo cp -a ntfy_2.28.0_darwin_all/ntfy /usr/local/bin/ntfy
mkdir ~/Library/Application\ Support/ntfy
cp ntfy_2.28.0_darwin_all/client/client.yml ~/Library/Application\ Support/ntfy/client.yml

```

> **Nota:** Per eseguire il server su macOS, è necessario compilarlo manualmente utilizzando Go (vedere [Istruzioni di compilazione](https://github.com/binwiederhier/ntfy/blob/master/CONTRIBUTING.md?ref=blog.esadax.com#building)).

---

## 6\. Installazione di Homebrew

```bash
brew install ntfy

```

Questo installa solo la CLI. L'installazione del server richiede passaggi manuali.

---

## Sette. Installazione di Windows

### Come programma utente

1. Scarica lo ZIP da GitHub Releases.
2. Estrai e posiziona `ntfy.exe` nel tuo `%Path%` (ad esempio, `C:\Program Files\`).

Eseguire comandi come:

```bash
ntfy.exe -h

```

### Come servizio Windows

1. Apri un prompt dei comandi **elevato**.

Avviare il servizio:

```cmd
sc start ntfy

```

Creare il servizio:

```cmd
sc create ntfy binPath="C:\path\to\ntfy.exe serve" start=auto

```

---

## 8, pag. Installazione di Docker

### Uso di base (nessuna cache persistente)

```bash
docker run -p 80:80 -it binwiederhier/ntfy serve

```

### Con cache persistente

```bash
docker run \
  -v /var/cache/ntfy:/var/cache/ntfy \
  -p 80:80 \
  -it \
  binwiederhier/ntfy \
  serve \
  --cache-file /var/cache/ntfy/cache.db

```

### Con configurazione personalizzata (utente non root)

```bash
docker run \
  -v /etc/ntfy:/etc/ntfy \
  -e TZ=UTC \
  -p 80:80 \
  -u UID:GID \
  -it \
  binwiederhier/ntfy \
  serve

```

### Esempio di Docker Compose

```yaml
version: '3'
services:
  ntfy:
    image: binwiederhier/ntfy
    container_name: ntfy
    command: ["serve"]
    environment:
      - TZ=UTC
    user: "1000:1000" # Replace with your UID/GID
    volumes:
      - /var/cache/ntfy:/var/cache/ntfy
      - /etc/ntfy:/etc/ntfy
    ports:
      - "80:80"
    healthcheck:
      test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
      interval: 60s
      timeout: 10s
      retries: 3
      start_period: 40s
    restart: unless-stopped
    init: true

```

---

## 9, pag. Distribuzione di Kubernetes (K8s)

### StatefulSet con cache persistente

```yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: ntfy
spec:
  serviceName: ntfy
  replicas: 1
  selector:
    matchLabels:
      app: ntfy
  template:
    metadata:
      labels:
        app: ntfy
    spec:
      containers:
        - name: ntfy
          image: binwiederhier/ntfy
          args: ["serve", "--cache-file", "/var/cache/ntfy/cache.db"]
          ports:
            - containerPort: 80
              name: http
          volumeMounts:
            - name: config
              mountPath: /etc/ntfy
              readOnly: true
            - name: cache
              mountPath: /var/cache/ntfy
      volumes:
        - name: config
          configMap:
            name: ntfy
        - name: cache
          persistentVolumeClaim:
            claimName: ntfy-cache
---
apiVersion: v1
kind: Service
metadata:
  name: ntfy
spec:
  selector:
    app: ntfy
  ports:
    - port: 80
      targetPort: 80
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: ntfy-cache
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

```

---

## Risoluzione dei problemi

- **Servizio non avviato:** Controllare i log con `sudo journalctl -u ntfy` (systemd) o `sudo rc-service ntfy status` (OpenRC).
- **Permission Denied:** Assicurati che i file binari e di configurazione siano di proprietà di root o di un utente specifico se eseguito come non root.
- **Porta già in uso:** Cambia la porta in `server.yml` o nel comando di esecuzione di Docker (`-p 8080:80`).

---

## File di configurazione

- **Client Config:** `/etc/ntfy/client.yml` (o `~/.config/ntfy/client.yml` per i non-root).
- **Configurazione server:** `/etc/ntfy/server.yml`.

Modifica questi file per personalizzare impostazioni come il fuso orario, la dimensione massima dei messaggi o i criteri di conservazione.

---

## Note sulla sicurezza

- Eseguire sempre ntfy come utente non root in produzione, se possibile (configurare tramite flag `user` in Docker o servizio systemd).
- Assicurati che l'interfaccia utente Web sia accessibile solo tramite reti attendibili se esposta pubblicamente.
- Aggiorna regolarmente la tua installazione per correggere le vulnerabilità di sicurezza.

---

Per ulteriori dettagli, visitare il [ntfy GitHub Repository](https://github.com/binwiederhier/ntfy?ref=blog.esadax.com).

## Parametri di configurazione

Dopo aver acquistato questa applicazione su **Esadax**, ti verrà richiesto di fornire i parametri di configurazione qui sotto. Esadax aggiunge le variabili fornite al deployment in modo che l'applicazione possa essere lanciata con la configurazione richiesta.

| Parametri       | Descrizione                                            |
| --------------- | ------------------------------------------------------ |
| ADMIN\_USERNAME | Valore fornito alla distribuzione per ADMIN\_USERNAME. |
| ADMIN\_PASSWORD | Valore fornito alla distribuzione per ADMIN\_PASSWORD. |

Una volta configurati i valori, fare clic su **Distribuisci** per avviare l'applicazione. L'applicazione acquistata utilizzerà i valori di configurazione forniti, incluse le credenziali come nomi utente e password quando vengono forniti tali parametri.