A web interface for viewing GMail backups created by Got-Your-Back (GYB)
- Multi-Account Support
- Switch between multiple GMail accounts seamlessly
- Labels Management
- Support for GMail labels
- Label counts and organization
- Safe Rendering
- Secure email content rendering (enabled by default)
- Protection against malicious content
- Sanitized HTML display
- Email Management
- View original email source
- Download emails in EML format
- Multi-platform support (amd64,arm64,armv7)
- Under Development
- Attachment handling
- Improved UX and responsiveness
- Search Feature
docker pull davidedg/webgyb
docker run -d -p 3000:3000 -v "/path/to/gyb/accounts:/app/accounts" davidedg/webgybWhere /path/to/gyb/accounts is the path to a directory structure like this:
accounts/
└── {account1}/
├── msg-db.sqlite
└── {email_folders}/
└── {account2}/
├── msg-db.sqlite
└── {email_folders}/
...
The application will be available at http://localhost:3000
Warning
WebGYB has no built-in authentication. Anyone who can reach its port can read and download every email in the mounted backups. Do not expose it to untrusted networks or to the Internet. Either:
- publish the port on the loopback interface only (
"127.0.0.1:3000:3000"instead of"3000:3000"), or - put it behind a reverse proxy that enforces authentication (e.g. Basic Auth, OAuth2 proxy, Authelia), or
- restrict access with a firewall / VPN.
services:
webgyb:
image: davidedg/webgyb
container_name: webgyb
init: true
user: "1000:1000"
ipc: private
security_opt:
- no-new-privileges=true
cap_drop:
- ALL
ports:
- "3000:3000"
volumes:
- /path/to/gyb/accounts:/app/accounts:ro
- /path/to/a/standalone/account1:/app/accounts/account1:ro
- /path/to/a/standalone/account2:/app/accounts/account2:ro
environment:
- PUID=1000
- PGID=1000
- NODE_ENV=production
- HOST=0.0.0.0
- PORT=3000
- GYB_ACCOUNTS_DIR=/app/accounts
#- BASE_PATH=/webgyb # uncomment for subfolder reverse proxy (see Reverse Proxy section)
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10sThe application will be available at http://localhost:3000
WebGYB can be deployed behind a reverse proxy in two configurations.
No extra configuration needed — just proxy all traffic to the container.
Nginx:
server {
listen 80;
server_name webgyb.domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Nginx Proxy Manager: create a Proxy Host pointing to localhost:3000. No custom configuration required.
Two requirements:
- Set the
BASE_PATHenvironment variable in the container to the desired prefix (e.g./webgyb). - Configure the proxy to strip the prefix before forwarding to the container (nginx
proxy_passwith a trailing slash does this automatically).
Docker Compose with BASE_PATH:
services:
webgyb:
image: davidedg/webgyb
environment:
- BASE_PATH=/webgyb # must match the proxy location path
# ... other env varsNginx:
# The trailing slash in proxy_pass strips the /webgyb prefix.
location /webgyb/ {
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Nginx Proxy Manager — in the Proxy Host, open the Advanced tab and add:
location /webgyb/ {
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}How it works: at runtime the app injects a
<base href="/webgyb/">tag into every HTML response and rewrites Astro's internal asset paths to be relative, so the browser resolves all requests — JS bundles, API calls, links — through the correct subfolder. No image rebuild is required to change the prefix.
-
Clone the repository:
git clone https://github.com/davidedg/webgyb.git cd webgyb -
Install dependencies:
npm install
-
Start the application in development mode:
npm run dev
The application will be available at http://localhost:4321
Create a production build:
npm run buildThe built files will be in the dist directory.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you find WebGYB useful, please consider supporting it:

