Files
weshare/die_README.md_nur_für_pingvin.md
T

229 lines
3.9 KiB
Markdown
Raw Normal View History

2025-12-17 09:44:02 +00:00
<img src="https://r2cdn.perplexity.ai/pplx-full-logo-primary-dark%402x.png" style="height:64px;margin-right:32px"/>
# die README.md nur für pingvin
Hier ist eine angepasste `README.md` nur für Pingvin Share:
```markdown
# Pingvin Share SelfHosted File Sharing
Dieses Projekt stellt eine schlanke, selbst gehostete Umgebung für den sicheren Datenaustausch bereit.
Pingvin Share ist eine WeTransfer‑ähnliche Lösung mit moderner Weboberfläche, ideal für gelegentliche große Dateiübertragungen hinter einem ApacheReverseProxy.
---
## Inhalt
- Voraussetzungen
- Verzeichnisstruktur
- Konfiguration (.env & docker-compose.yml)
- ApacheReverseProxy
- Erststart
- HTTPS (Lets Encrypt)
- Administration & Updates
- Sicherheitshinweise
---
## Voraussetzungen
- Ubuntu Server (z.B. 22.04 LTS) mit:
- Docker und Docker Compose
- Apache Webserver (`apache2`)
- DNSEintrag für:
- `pingvin.deinedomain.tld`
- Root oder sudoRechte
---
## Verzeichnisstruktur
Empfohlene Struktur auf dem Host:
```
/opt/
pingvin/
docker-compose.yml
.env
data/
images/
```
---
## Konfiguration
### .env
Datei: `/opt/pingvin/.env`
```
PINGVIN_VERSION=latest
PINGVIN_HTTP_PORT=3000
PINGVIN_DATA_PATH=/opt/pingvin/data
PINGVIN_TIMEZONE=Europe/Vienna
PINGVIN_BEHIND_PROXY=true
PINGVIN_PUID=1000
PINGVIN_PGID=1000
```
### docker-compose.yml
Datei: `/opt/pingvin/docker-compose.yml`
```
version: "3.8"
services:
pingvin-share:
image: stonith404/pingvin-share:\${PINGVIN_VERSION}
container_name: pingvin-share
restart: unless-stopped
environment:
TZ: \${PINGVIN_TIMEZONE}
PUID: \${PINGVIN_PUID}
PGID: \${PINGVIN_PGID}
PINGVIN_BEHIND_PROXY: \${PINGVIN_BEHIND_PROXY}
volumes:
- \${PINGVIN_DATA_PATH}:/opt/app/backend/data
- ${PINGVIN_DATA_PATH}/images:/opt/app/frontend/public/img
networks:
- pingvin_net
# nur lokal binden Zugriff über Apache
ports:
- "127.0.0.1:${PINGVIN_HTTP_PORT}:3000"
networks:
pingvin_net:
driver: bridge
```
### Datenverzeichnisse vorbereiten
```
sudo mkdir -p /opt/pingvin/data/images
sudo chown -R 1000:1000 /opt/pingvin
```
---
## ApacheReverseProxy
### Module aktivieren
```
sudo a2enmod proxy proxy_http headers
sudo systemctl restart apache2
```
### vHost für Pingvin Share
Datei: `/etc/apache2/sites-available/pingvin.conf`
```
<VirtualHost *:80>
ServerName pingvin.deinedomain.tld
ErrorLog ${APACHE_LOG_DIR}/pingvin_error.log
CustomLog ${APACHE_LOG_DIR}/pingvin_access.log combined
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ProxyTimeout 600
Timeout 600
LimitRequestBody 0
RequestHeader set X-Forwarded-Proto "http"
RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s"
</VirtualHost>
```
Sites aktivieren:
```
sudo a2ensite pingvin.conf
sudo systemctl reload apache2
```
---
## Erststart
```
cd /opt/pingvin
docker compose up -d
```
Aufruf im Browser:
- `http://pingvin.deinedomain.tld`
Beim ersten Aufruf richtest du im WebInterface den AdminBenutzer und grundlegende Einstellungen ein.
---
## HTTPS (Lets Encrypt)
Optional: HTTPS mit Certbot und Apache einrichten:
```
sudo apt-get install certbot python3-certbot-apache
sudo certbot --apache -d pingvin.deinedomain.tld
```
Certbot passt die vHostKonfiguration an und richtet automatische Zertifikatserneuerung ein.
---
## Administration & Updates
### Logs ansehen
```
docker logs pingvin-share
journalctl -u apache2
```
### Container aktualisieren
```
cd /opt/pingvin
docker compose pull
docker compose up -d
```
---
## Sicherheitshinweise
- Zugriff aus dem Internet möglichst nur über HTTPS bereitstellen.
- Starke, eindeutige Passwörter für AdminKonten verwenden.
- UploadGrößen und Ablaufzeiten in Pingvin Share passend konfigurieren.
- Regelmäßig DockerImages und Apache aktualisieren.
```