docs: add Spanish README, local docker-compose build and .env.example
- Rewrite README entirely in Spanish referencing paste.es / cloudhost.es - Update docker-compose to build from local Dockerfile, use .env file, mount data/ volumes and respect PORT env var - Add .env.example with full commented reference for all supported HEMMELIG_* variables (analytics disabled by default for privacy) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
119
.env.example
Normal file
119
.env.example
Normal file
@@ -0,0 +1,119 @@
|
||||
# =============================================================================
|
||||
# paste.es — Fichero de configuración de entorno
|
||||
# Copia este fichero a .env y ajusta los valores antes de arrancar.
|
||||
# Genera secretos seguros con: openssl rand -base64 32
|
||||
# =============================================================================
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# REQUERIDO — Sin estos valores el servicio no arrancará correctamente
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Ruta a la base de datos SQLite (no cambiar si usas Docker Compose)
|
||||
DATABASE_URL=file:/app/database/paste.db
|
||||
|
||||
# Clave secreta para firmar las sesiones de autenticación (mínimo 32 caracteres)
|
||||
# Genera una con: openssl rand -base64 32
|
||||
BETTER_AUTH_SECRET=cambia-esto-por-una-clave-segura-de-al-menos-32-chars
|
||||
|
||||
# URL pública de tu instancia (necesaria para cookies y OAuth)
|
||||
BETTER_AUTH_URL=https://paste.es
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# SERVIDOR
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
NODE_ENV=production
|
||||
|
||||
# Puerto en el que escucha el servidor (por defecto 3000)
|
||||
HEMMELIG_PORT=3000
|
||||
|
||||
# URL pública de la instancia (requerida si usas OAuth social)
|
||||
HEMMELIG_BASE_URL=https://paste.es
|
||||
|
||||
# Origen adicional de confianza para CORS (opcional)
|
||||
# HEMMELIG_TRUSTED_ORIGIN=https://paste.es
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# IDENTIDAD DE LA INSTANCIA
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
HEMMELIG_INSTANCE_NAME=paste.es
|
||||
HEMMELIG_INSTANCE_DESCRIPTION=Comparte secretos de forma segura y efímera
|
||||
# Logo personalizado: URL pública de una imagen (png, svg, webp)
|
||||
# HEMMELIG_INSTANCE_LOGO=https://paste.es/logo.png
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# REGISTRO Y SEGURIDAD
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Permitir que nuevos usuarios se registren (true/false)
|
||||
HEMMELIG_ALLOW_REGISTRATION=true
|
||||
|
||||
# Permitir secretos protegidos con contraseña
|
||||
HEMMELIG_ALLOW_PASSWORD_PROTECTION=true
|
||||
|
||||
# Permitir restricción de acceso por IP
|
||||
HEMMELIG_ALLOW_IP_RESTRICTION=true
|
||||
|
||||
# Permitir subida de archivos adjuntos (solo usuarios autenticados)
|
||||
HEMMELIG_ALLOW_FILE_UPLOADS=true
|
||||
|
||||
# Desactivar registro con email/contraseña (solo login social) — false por defecto
|
||||
HEMMELIG_DISABLE_EMAIL_PASSWORD_SIGNUP=false
|
||||
|
||||
# Tamaño máximo de payload cifrado en KB (por defecto 1024 = 1 MB)
|
||||
HEMMELIG_MAX_ENCRYPTED_PAYLOAD_SIZE=1024
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ANALÍTICAS — Desactivadas por defecto para máxima privacidad
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# paste.es no usa analíticas por defecto. Actívalas solo si las necesitas.
|
||||
HEMMELIG_ANALYTICS_ENABLED=false
|
||||
|
||||
# Secreto HMAC para anonimizar IDs de visitantes (se genera automáticamente si está vacío)
|
||||
# HEMMELIG_ANALYTICS_HMAC_SECRET=
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# LOGIN SOCIAL (OAuth) — Opcional
|
||||
# Descomenta y rellena los proveedores que quieras activar.
|
||||
# Callback URL: https://paste.es/api/auth/callback/<provider>
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# GitHub
|
||||
# HEMMELIG_AUTH_GITHUB_ID=tu-github-client-id
|
||||
# HEMMELIG_AUTH_GITHUB_SECRET=tu-github-client-secret
|
||||
|
||||
# Google
|
||||
# HEMMELIG_AUTH_GOOGLE_ID=tu-google-client-id
|
||||
# HEMMELIG_AUTH_GOOGLE_SECRET=tu-google-client-secret
|
||||
|
||||
# Microsoft / Azure AD
|
||||
# HEMMELIG_AUTH_MICROSOFT_ID=tu-microsoft-client-id
|
||||
# HEMMELIG_AUTH_MICROSOFT_SECRET=tu-microsoft-client-secret
|
||||
# HEMMELIG_AUTH_MICROSOFT_TENANT_ID=common
|
||||
|
||||
# Discord
|
||||
# HEMMELIG_AUTH_DISCORD_ID=tu-discord-client-id
|
||||
# HEMMELIG_AUTH_DISCORD_SECRET=tu-discord-client-secret
|
||||
|
||||
# GitLab
|
||||
# HEMMELIG_AUTH_GITLAB_ID=tu-gitlab-app-id
|
||||
# HEMMELIG_AUTH_GITLAB_SECRET=tu-gitlab-app-secret
|
||||
|
||||
# OAuth genérico (Authentik, Keycloak, Authelia, etc.)
|
||||
# HEMMELIG_AUTH_GENERIC_OAUTH='[{"providerId":"authentik","discoveryUrl":"https://auth.tu-dominio.com/.well-known/openid-configuration","clientId":"client-id","clientSecret":"secret","scopes":["openid","profile","email"]}]'
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# WEBHOOKS — Opcional
|
||||
# Configurable también desde el panel de administración tras el primer arranque.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# (Los webhooks se configuran desde el panel de administración en /dashboard/instance)
|
||||
220
README.md
220
README.md
@@ -1,135 +1,169 @@
|
||||
<div align="center">
|
||||
<img src="banner.png" alt="hemmelig" />
|
||||
</div>
|
||||
# paste.es — Compartición de secretos cifrados
|
||||
|
||||
<h1 align="center">Hemmelig - Encrypted Secret Sharing</h1>
|
||||
Servicio de compartición de secretos efímeros y cifrados para el público hispanohablante, alojado y patrocinado por [cloudhost.es](https://cloudhost.es).
|
||||
|
||||
<p align="center">
|
||||
Share sensitive information securely with client-side encryption and self-destructing messages.
|
||||
</p>
|
||||
> Basado en [Hemmelig](https://github.com/HemmeligOrg/Hemmelig.app) v7 — arquitectura de cifrado de conocimiento cero.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://hemmelig.app">Try it online</a> •
|
||||
<a href="https://terces.cloud">Deploy to terces.cloud</a> •
|
||||
<a href="#quick-start">Quick Start</a> •
|
||||
<a href="docs/docker.md">Docker Guide</a> •
|
||||
<a href="docs/env.md">Configuration</a>
|
||||
</p>
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<a href="https://hub.docker.com/r/hemmeligapp/hemmelig"><img src="https://img.shields.io/docker/pulls/hemmeligapp/hemmelig" alt="Docker pulls" /></a>
|
||||
<a href="https://terces.cloud"><img src="https://img.shields.io/badge/Deploy%20to-terces.cloud-269B91" alt="Deploy to terces.cloud" /></a>
|
||||
<a href="https://ko-fi.com/bjarneoeverli"><img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Ko--fi-FF5E5B?logo=ko-fi&logoColor=white" alt="Buy Me a Coffee" /></a>
|
||||
</p>
|
||||
## Cómo funciona
|
||||
|
||||
## How It Works
|
||||
1. Escribe tu secreto en [paste.es](https://paste.es)
|
||||
2. Configura la expiración, límite de vistas y contraseña opcional
|
||||
3. Comparte el enlace generado con el destinatario
|
||||
4. El secreto se elimina automáticamente tras ser leído o al expirar
|
||||
|
||||
1. Enter your secret on [hemmelig.app](https://hemmelig.app) or your self-hosted instance
|
||||
2. Set expiration time, view limits, and optional password
|
||||
3. Share the generated link with your recipient
|
||||
4. The secret is automatically deleted after being viewed or expired
|
||||
**Arquitectura de conocimiento cero:** Todo el cifrado ocurre en tu navegador. El servidor solo almacena datos cifrados y nunca ve tus secretos ni las claves de descifrado. Los datos son completamente efímeros.
|
||||
|
||||
**Zero-knowledge architecture:** All encryption happens in your browser. The server only stores encrypted data and never sees your secrets or encryption keys.
|
||||
---
|
||||
|
||||
## Features
|
||||
## Características
|
||||
|
||||
- **Client-side AES-256-GCM encryption** - Your data is encrypted before leaving your browser
|
||||
- **Self-destructing secrets** - Configurable expiration and view limits
|
||||
- **Password protection** - Optional additional security layer
|
||||
- **IP restrictions** - Limit access to specific IP ranges
|
||||
- **File uploads** - Share encrypted files (authenticated users)
|
||||
- **Rich text editor** - Format your secrets with styling
|
||||
- **QR codes** - Easy mobile sharing
|
||||
- **Multi-language support** - Available in multiple languages
|
||||
- **Webhook notifications** - Get notified when secrets are viewed or burned ([docs](docs/webhook.md))
|
||||
- **Cifrado AES-256-GCM del lado del cliente** — tus datos se cifran antes de salir del navegador
|
||||
- **Secretos autodestructivos** — expiración configurable y límite de vistas
|
||||
- **Sin recopilación de datos** — sin analíticas, sin registros de IP, sin rastreo
|
||||
- **Protección por contraseña** — capa de seguridad adicional opcional
|
||||
- **Restricción por IP** — limita el acceso a rangos de IP específicos
|
||||
- **Subida de archivos** — comparte archivos cifrados (usuarios autenticados)
|
||||
- **Editor de texto enriquecido** — da formato a tus secretos
|
||||
- **Códigos QR** — compartición fácil desde móvil
|
||||
- **Soporte multiidioma** — interfaz disponible en 10 idiomas (español por defecto)
|
||||
- **Notificaciones webhook** — recibe notificaciones cuando se ven o eliminan secretos
|
||||
|
||||
## Quick Start
|
||||
---
|
||||
|
||||
### Docker (Recommended)
|
||||
## Inicio rápido
|
||||
|
||||
### Docker Compose (recomendado)
|
||||
|
||||
```bash
|
||||
git clone https://devops.cloudhost.es/Malin/paste.es.git
|
||||
cd paste.es
|
||||
|
||||
# Copia y edita el fichero de entorno
|
||||
cp .env.example .env
|
||||
# Edita .env con tus valores (ver sección Configuración)
|
||||
|
||||
# Construye y arranca
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
El servicio quedará disponible en `http://localhost:3000`.
|
||||
|
||||
### Docker (imagen directa)
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name hemmelig \
|
||||
--name paste-es \
|
||||
-p 3000:3000 \
|
||||
-v hemmelig-data:/app/database \
|
||||
-v hemmelig-uploads:/app/uploads \
|
||||
-e DATABASE_URL="file:/app/database/hemmelig.db" \
|
||||
-v paste-data:/app/database \
|
||||
-v paste-uploads:/app/uploads \
|
||||
-e DATABASE_URL="file:/app/database/paste.db" \
|
||||
-e BETTER_AUTH_SECRET="$(openssl rand -base64 32)" \
|
||||
-e BETTER_AUTH_URL="https://your-domain.com" \
|
||||
hemmelig/hemmelig:v7
|
||||
-e BETTER_AUTH_URL="https://paste.es" \
|
||||
-e HEMMELIG_INSTANCE_NAME="paste.es" \
|
||||
ghcr.io/cloudhost-es/paste.es:latest
|
||||
```
|
||||
|
||||
### Docker Compose
|
||||
---
|
||||
|
||||
## Configuración
|
||||
|
||||
Copia `.env.example` a `.env` y ajusta los valores:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/HemmeligOrg/Hemmelig.app.git
|
||||
cd Hemmelig.app
|
||||
|
||||
# Edit docker-compose.yml with your settings
|
||||
docker compose up -d
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
See [Docker Guide](docs/docker.md) for detailed deployment instructions.
|
||||
### Variables requeridas
|
||||
|
||||
### CLI
|
||||
| Variable | Descripción |
|
||||
|----------------------|------------------------------------------------------|
|
||||
| `DATABASE_URL` | Ruta a la base de datos SQLite |
|
||||
| `BETTER_AUTH_SECRET` | Clave secreta para las sesiones (mín. 32 caracteres) |
|
||||
| `BETTER_AUTH_URL` | URL pública de tu instancia |
|
||||
|
||||
Create secrets directly from the command line:
|
||||
### Generar secretos seguros
|
||||
|
||||
```bash
|
||||
# Download the binary (recommended for CI/CD)
|
||||
curl -L https://github.com/HemmeligOrg/Hemmelig.app/releases/download/cli-v1.0.1/hemmelig-linux-amd64 -o hemmelig
|
||||
chmod +x hemmelig
|
||||
|
||||
# Or install via npm
|
||||
npm install -g hemmelig
|
||||
|
||||
# Create a secret
|
||||
hemmelig "my secret message"
|
||||
|
||||
# With options
|
||||
hemmelig "API key: sk-1234" -t "Production API Key" -e 7d -v 3
|
||||
openssl rand -base64 32
|
||||
```
|
||||
|
||||
See [CLI Documentation](docs/cli.md) for all platforms and CI/CD integration examples.
|
||||
Consulta [docs/env.md](docs/env.md) para la referencia completa de variables de entorno.
|
||||
|
||||
## Documentation
|
||||
---
|
||||
|
||||
- [Docker Deployment](docs/docker.md) - Complete Docker setup guide
|
||||
- [Helm Chart](docs/helm.md) - Kubernetes deployment with Helm
|
||||
- [Environment Variables](docs/env.md) - All configuration options
|
||||
- [Managed Mode](docs/managed.md) - Configure instance settings via environment variables
|
||||
- [CLI](docs/cli.md) - Command-line interface for automation and CI/CD
|
||||
- [Encryption](docs/encryption.md) - How client-side encryption works
|
||||
- [Social Login](docs/social-login.md) - OAuth provider setup (GitHub, Google, etc.)
|
||||
- [Secret Requests](docs/secret-request.md) - Request secrets from others securely
|
||||
- [Webhooks](docs/webhook.md) - Webhook notifications for secret events
|
||||
- [Health Checks](docs/health.md) - Liveness and readiness probes for container orchestration
|
||||
- [Prometheus Metrics](docs/metrics.md) - Monitor your instance with Prometheus
|
||||
- [API Documentation](docs/api.md) - REST API reference and OpenAPI spec
|
||||
- [SDK Generation](docs/sdk.md) - Generate client SDKs from OpenAPI spec
|
||||
- [E2E Testing](docs/e2e.md) - End-to-end testing with Playwright
|
||||
- [Upgrading from v6](docs/upgrade.md) - Migration guide for v6 to v7
|
||||
|
||||
## Development
|
||||
## Desarrollo local
|
||||
|
||||
```bash
|
||||
# Instalar dependencias
|
||||
npm install
|
||||
npm run dev
|
||||
npm run dev:api
|
||||
|
||||
# Iniciar el servidor de desarrollo (API + cliente en terminales separadas)
|
||||
npm run dev:api # Terminal 1 — API en :3000
|
||||
npm run dev # Terminal 2 — cliente Vite con HMR
|
||||
```
|
||||
|
||||
## Deploy to terces.cloud
|
||||
---
|
||||
|
||||
Want a hassle-free managed Hemmelig instance? [terces.cloud](https://terces.cloud) offers fully managed Hemmelig hosting for **$20/month**. Get your own private instance with automatic updates, backups, and zero maintenance overhead.
|
||||
## Despliegue en producción
|
||||
|
||||
<a href="https://terces.cloud"><img src="https://img.shields.io/badge/Deploy%20to-terces.cloud-269B91?style=for-the-badge" alt="Deploy to terces.cloud" /></a>
|
||||
### Detrás de un proxy inverso (Nginx / Caddy)
|
||||
|
||||
## Hetzner Cloud Referral
|
||||
El servicio escucha en el puerto `3000`. Configura tu proxy para que apunte a él:
|
||||
|
||||
Hemmelig is proudly hosted on [Hetzner Cloud](https://hetzner.cloud/?ref=Id028KbCZQoD). Hetzner provides reliable and scalable cloud solutions, making it an ideal choice for hosting secure applications like Hemmelig. By using our [referral link](https://hetzner.cloud/?ref=Id028KbCZQoD), you can join Hetzner Cloud and receive €20/$20 in credits. Once you spend at least €10/$10 (excluding credits), Hemmelig will receive €10/$10 in Hetzner Cloud credits. This is a great opportunity to explore Hetzner's services while supporting Hemmelig.
|
||||
**Nginx:**
|
||||
```nginx
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name paste.es;
|
||||
|
||||
## License
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
O'Saasy License Agreement - Copyright © 2025, Bjarne Øverli.
|
||||
**Caddy:**
|
||||
```caddyfile
|
||||
paste.es {
|
||||
reverse_proxy localhost:3000
|
||||
}
|
||||
```
|
||||
|
||||
This project is licensed under a modified MIT license that prohibits using the software to compete with the original licensor as a hosted SaaS product. See [LICENSE](LICENSE) for details.
|
||||
### Primer uso — crear cuenta de administrador
|
||||
|
||||
Tras el primer arranque, visita `https://paste.es/setup` para crear la cuenta de administrador y configurar la instancia.
|
||||
|
||||
---
|
||||
|
||||
## Documentación
|
||||
|
||||
- [Variables de entorno](docs/env.md) — referencia completa de configuración
|
||||
- [Docker](docs/docker.md) — guía de despliegue con Docker
|
||||
- [Helm / Kubernetes](docs/helm.md) — despliegue con Helm
|
||||
- [Cifrado](docs/encryption.md) — cómo funciona el cifrado del lado del cliente
|
||||
- [Login social](docs/social-login.md) — configuración de OAuth (GitHub, Google, etc.)
|
||||
- [Peticiones de secretos](docs/secret-request.md) — solicita secretos a otros de forma segura
|
||||
- [Webhooks](docs/webhook.md) — notificaciones de eventos
|
||||
- [Health checks](docs/health.md) — sondas de disponibilidad para orquestación
|
||||
- [Métricas Prometheus](docs/metrics.md) — monitorización con Prometheus
|
||||
- [API REST](docs/api.md) — referencia de la API y especificación OpenAPI
|
||||
- [CLI](docs/cli.md) — interfaz de línea de comandos para automatización
|
||||
- [Tests E2E](docs/e2e.md) — pruebas end-to-end con Playwright
|
||||
|
||||
---
|
||||
|
||||
## Alojamiento y patrocinio
|
||||
|
||||
paste.es está alojado y patrocinado por **[CloudHost.es](https://cloudhost.es)**, empresa española de alojamiento web comprometida con la privacidad y la seguridad de los datos.
|
||||
|
||||
---
|
||||
|
||||
## Créditos
|
||||
|
||||
paste.es está basado en [Hemmelig](https://github.com/HemmeligOrg/Hemmelig.app) por Bjarne Øverli, publicado bajo la O'Saasy License Agreement. Consulta [LICENSE](LICENSE) para más detalles.
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
services:
|
||||
hemmelig:
|
||||
image: hemmeligapp/hemmelig:v7
|
||||
container_name: hemmelig
|
||||
paste-es:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: paste-es
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./database:/app/database
|
||||
- ./uploads:/app/uploads
|
||||
environment:
|
||||
- DATABASE_URL=file:/app/database/hemmelig.db
|
||||
- BETTER_AUTH_SECRET=change-this-to-a-secure-secret-min-32-chars
|
||||
- BETTER_AUTH_URL=https://secrets.example.com
|
||||
- NODE_ENV=production
|
||||
- HEMMELIG_BASE_URL=https://secrets.example.com
|
||||
- ./data/database:/app/database
|
||||
- ./data/uploads:/app/uploads
|
||||
ports:
|
||||
- '3000:3000'
|
||||
- '${PORT:-3000}:3000'
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
@@ -27,4 +25,4 @@ services:
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
start_period: 15s
|
||||
|
||||
Reference in New Issue
Block a user