MediaBridge: Self-Hosted S3 File Management for Teams

What MediaBridge is a self-hosted file management layer over AWS S3. It gives teams a proper interface for uploading, browsing, and sharing files across multiple S3 buckets without AWS console access and without distributing IAM credentials to individuals. It runs in production managing 33 S3 buckets. Backend: github.com/sagarnayak/mediabridgeBackend-public Frontend: github.com/sagarnayak/mediabridgeFrontend-public Why The access problem Content teams upload files constantly: images for a web app, PDFs for client portals, videos for a dashboard. Those files need to live in S3 and they need URLs. The question is how the team gets them there. ...

February 1, 2026 · 6 min · 1079 words · Sagar Nayak

Deploying PurelyManage: systemd, nginx, and S3 Frontend

Part of the PurelyManage series. This is the end-to-end deployment guide for PurelyManage. The backend runs as a Node.js process managed by systemd. The frontend is a static React build served from S3 via CloudFront. nginx handles TLS termination and reverse proxying for the backend. Both repos are on GitHub: Backend: github.com/sagarnayak/purelymanageBackend-public Frontend: github.com/sagarnayak/purelymanageFrontend-public Prerequisites Ubuntu (or any Linux with systemd) Node.js 18 or later PostgreSQL (any recent version, local or remote) nginx certbot (for TLS) imapsync (only if you need the migration feature, see the previous post) Backend Setup Clone the repo and install dependencies: ...

January 26, 2026 · 4 min · 751 words · Sagar Nayak

imapsync Setup and the Async Job Architecture

Part of the PurelyManage series. Installing imapsync imapsync is a Perl script. The version in most Linux package managers is years out of date and will fail on modern IMAP servers with current TLS requirements. Install it from the GitHub source instead. First install the Perl dependencies via apt: sudo apt-get install -y \ libauthen-ntlm-perl libcgi-pm-perl libcrypt-openssl-rsa-perl \ libdata-uniqid-perl libdigest-hmac-perl libdist-checkconflicts-perl \ libfile-copy-recursive-perl libfile-tail-perl libio-compress-perl \ libio-socket-inet6-perl libio-socket-ssl-perl libio-tee-perl \ libjson-webtoken-perl liblockfile-simple-perl libmail-imapclient-perl \ libmodule-scandeps-perl libnet-ssleay-perl libpar-packer-perl \ libreadonly-perl libregexp-common-perl libsys-meminfo-perl \ libterm-readkey-perl libtest-mockobject-perl libtest-pod-perl \ libunicode-string-perl liburi-perl libwww-perl Then download imapsync directly from GitHub and make it executable: ...

January 20, 2026 · 5 min · 879 words · Sagar Nayak

Running IMAP Migration Jobs in PurelyManage

Part of the PurelyManage series. The migration system in PurelyManage wraps imapsync and adds a job queue, a UI, and a few quality-of-life features on top. This post covers the job system from the user side: how jobs are created, run, monitored, and managed. The imapsync installation and the async job architecture under the hood are covered in the next post. Server Configuration Before running any migration you need to add IMAP server definitions. A server definition stores only the connection details: host, port, and whether to use SSL. Credentials are entered per-job, not per-server, so you can reuse the same server config across many migrations without re-entering connection details each time. ...

January 14, 2026 · 5 min · 944 words · Sagar Nayak

Collecting IMAP Credentials Without Storing Plaintext

Part of the PurelyManage series. The Problem Migrating an organization’s email means moving every mailbox from the old provider into PurelyMail. Each mailbox requires the source IMAP credentials: the email address and password the user logs in with on the old system. The naive way to collect these is to email everyone a spreadsheet and ask them to fill in their passwords. That spreadsheet then sits in someone’s inbox or a shared drive, plaintext, accessible to anyone who can read it. It is also error-prone: users mistype passwords, the admin has no way to know if a credential is correct until the migration job fails. ...

January 8, 2026 · 5 min · 1017 words · Sagar Nayak