self-hosting BucketLens

// for teams running on internal infrastructure
// read the security section before changing any defaults
BucketLens binds to 127.0.0.1 by default.
Exposing it on a network without authentication means anyone on that network can delete your S3 objects.
Do not change the bind address until auth is configured.
single user — the simple case
git clone https://github.com/vishukamble/bucketlens cd bucketlens pip install flask boto3 python app.py # → http://127.0.0.1:8080
team deployment — internal server
# server requirements python 3.8+ nginx or caddy aws credentials or IAM role on the server
01
clone and install
git clone https://github.com/vishukamble/bucketlens /opt/bucketlens cd /opt/bucketlens && pip install flask boto3
02
systemd service
/etc/systemd/system/bucketlens.service
[Unit] Description=BucketLens S3 Browser After=network.target [Service] Type=simple User=bucketlens WorkingDirectory=/opt/bucketlens Environment=BucketLens_PORT=8080 Environment=AWS_PROFILE=default ExecStart=/usr/bin/python3 app.py Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
sudo systemctl enable bucketlens sudo systemctl start bucketlens
03
nginx reverse proxy
server { listen 80; server_name bucketlens.internal; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; client_max_body_size 500M; } }
04
minimal IAM policy
{ "Version": "2012-10-17", "Statement": [{ "Sid": "BucketLensAccess", "Effect": "Allow", "Action": [ "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::your-bucket-name", "arn:aws:s3:::your-bucket-name/*" ] }] }
Replace your-bucket-name. Never use Resource: * in production.
auth — interim options
Team auth is on the roadmap. Until then:
htpasswd -c /etc/nginx/.htpasswd yourusername # in nginx location block: auth_basic "BucketLens"; auth_basic_user_file /etc/nginx/.htpasswd;
Tailscale or WireGuard is cleaner —
VPN-only access with zero nginx config.
updating
cd /opt/bucketlens git pull sudo systemctl restart bucketlens
environment variables
BucketLens_PORT 8080 port to bind
AWS_PROFILE default credentials profile
AWS_DEFAULT_REGION us-east-1 region override