What Password Pusher does
Password Pusher is an open-source web application released under the Apache-2.0 license. The idea fits in one sentence: instead of writing a secret in a message, you store it in the application and send a link. That link carries two limits, a number of views and a number of days. As soon as either one is reached, the content is deleted and the link shows nothing but an expiry notice.
The recipient installs nothing and creates no account: they open the link, confirm that they want to see the secret, and copy it. On your side, a log shows when the link was viewed. If nobody has opened it, you can expire it yourself.
The application shares passwords and text, but also web addresses and QR codes. It provides a password generator and an API to create links from your own tools. Hosted on your server, it keeps your secrets with you, encrypted with a key that only you hold.
What you gain
- Secrets that no longer linger — once the deadline has passed, the message found in a mailbox contains only an expired link.
- Proof of access — each link's log tells you whether it was opened, and when.
- No account for the recipient — a client or a contractor opens the link from any browser.
- Your data stays with you — secrets are encrypted in the database on your VPS, not at a third-party service.
- A closed instance — only your team's accounts create links.
- An API — your scripts create links without going through the interface.
Password in an email vs. a Password Pusher link
Scroll the table
| Password in an email | Password Pusher link | |
|---|---|---|
| Lifetime of the secret | Open-ended, in two mailboxes | A few views or a few days |
| Backups and forwards | The secret is copied into them | Only the link appears in them |
| Knowing whether it was read | Impossible | Access log |
| Revoking after sending | Impossible | Manual expiry of the link |
| Storage | In plain text at the email provider | Encrypted on your server |
Prepare the server
Plan for an Ubuntu 24.04 VPS with 1 GB of RAM: the application uses about 300 MB at rest, database included. It fits in a single container and keeps its data in a SQLite database, with no database server to administer.
You also need a hostname that points to the server, for example push.example.com. This is not a detail: every generated link carries that address, and your recipients open it from outside. A secret must only ever travel over HTTPS.
Install Docker and nginx before you start:
apt update && apt install -y docker.io docker-compose-v2 nginx certbot python3-certbot-nginxInstall Password Pusher with Docker Compose
Prepare the directory and the keys
The
.envfile holds two secrets: the key that signs sessions and the key that encrypts your secrets in the database. Without the second one, the application uses a default key that everyone knows. Keep a copy of this file: without the encryption key, active links become unreadable.mkdir -p /opt/password-pusher && cd /opt/password-pusher cat > .env <<EOF DOMAIN=push.example.com SECRET_KEY_BASE=$(openssl rand -hex 32) ENCRYPTION_KEY_HEX64=$(openssl rand -hex 32) EOF chmod 600 .envWrite the docker-compose.yml file
A single service, the official image.
PWP__OVERRIDE_BASE_URLsets the address written into the links. The last two variables close the instance: no link creation without an account, no open sign-up. The port is published on the loopback interface only: nginx alone will be exposed to the Internet.services: pwpush: image: pglombardo/pwpush:2.17.4 restart: unless-stopped environment: SECRET_KEY_BASE: ${SECRET_KEY_BASE:?SECRET_KEY_BASE manquant} PWPUSH_MASTER_KEY: ${ENCRYPTION_KEY_HEX64:?ENCRYPTION_KEY_HEX64 manquant} PWP__HOST_DOMAIN: ${DOMAIN:?DOMAIN manquant} PWP__HOST_PROTOCOL: https PWP__OVERRIDE_BASE_URL: https://${DOMAIN:?DOMAIN manquant} PWP__ALLOW_ANONYMOUS: "false" PWP__DISABLE_SIGNUPS: "true" volumes: - pwpush-storage:/opt/PasswordPusher/storage ports: - "127.0.0.1:5100:5100" healthcheck: test: ["CMD", "curl", "-fsS", "http://localhost:5100/up"] interval: 10s timeout: 5s retries: 12 start_period: 40s volumes: pwpush-storage:Start and verify
--waitreturns once the health check passes. The/uppage must answer 200.docker compose up -d --wait curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:5100/upPublish behind nginx
The
X-Forwarded-Protoheader tells the application that the visitor arrived over HTTPS.server { server_name push.example.com; location / { proxy_pass http://127.0.0.1:5100; 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; } }Enable HTTPS
A secret must never travel in plain text. The home page redirects to the first-run setup screen as long as no account exists.
certbot --nginx -d push.example.com curl -s -o /dev/null -w '%{http_code} %{redirect_url}\n' https://push.example.com/
Don't leave the instance open to everyone
By default, Password Pusher accepts anonymous pushes and open sign-ups. On a public address, anyone can then use your server to store content on it and spread links under your domain name. The two variables PWP__ALLOW_ANONYMOUS and PWP__DISABLE_SIGNUPS in the file above close both doors. Your recipients, meanwhile, still open their links without an account.
Create the administrator account
On first access, the application shows a first-run setup screen. It asks for an email address, a password and a boot code: this code proves that you control the server, and prevents a visitor from creating the administrator account before you do.
First open https://push.example.com/ in your browser, then read the code on the server:
cd /opt/password-pusher
docker compose exec pwpush cat storage/first_run_boot_code.txtEnter it in the form. The account you create is an administrator, the code is destroyed immediately, and the first-run setup screen no longer appears. The admin dashboard, at /admin, lists the accounts and lets you promote or demote an administrator.
Send a secret and track its access
Paste the secret into the form, then set the two limits. For a password handed to a client, one or two views and one day are enough: if they open the link too late, you create another one.
Leave the confirmation step enabled: the recipient has to click to display the secret. Without it, the link preview that some messaging apps generate opens the page in their place and uses up a view.
Two habits round out the tool:
- send the link and the username through two different channels, so that the link alone is not enough to sign in;
- ask the recipient to change the password at first sign-in when the service allows it.
Each link's log shows when it was viewed. A link that is still active can be expired by hand from your dashboard.
Create links from a script
Every account has an API token, which you generate from the account menu. Store it in the secrets of your CI or your tool, never in a repository. The following call creates a link valid for one view and one day, and returns its address:
curl -s https://push.example.com/api/v2/pushes \
-H "Authorization: Bearer $PWPUSH_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"push":{"payload":"mot-de-passe-provisoire","expire_after_views":1,"expire_after_days":1}}' \
| jq -r .html_urlAn account-creation script can thus generate a password, push it, then write the link into the requester's ticket: the password appears in plain text neither in the ticket nor in the script's logs. Without a token, the same request answers 401.
Add colleagues, back up, update
Sign-ups are closed. To add a colleague, set PWP__DISABLE_SIGNUPS to "false", run docker compose up -d again, let them create their account, then close sign-ups again. The PWP__SIGNUP_EMAIL_REGEXP variable restricts the accepted addresses, for example to your domain. Each account can enable two-factor authentication in its settings.
The application's entire state lives in the pwpush-storage volume: the SQLite database and the uploaded files. Back up this volume and the .env file: the database cannot be read without the encryption key.
docker run --rm -v password-pusher_pwpush-storage:/data -v /root/backups:/backup alpine \
tar czf /backup/pwpush-$(date +%F).tar.gz -C /data .To update, change the image tag in docker-compose.yml, then run docker compose pull && docker compose up -d: database migrations run at startup.
Install Password Pusher in one click from the ServOrbit Marketplace
The ServOrbit Marketplace installs this same configuration on your VPS: official image, encryption key generated, anonymous creation disabled, sign-ups closed, nginx proxy and HTTPS certificate. The application installs on a subdomain of one of your domains or on the VPS's free subdomain: you don't need to buy a domain name.
The boot code is shown in your client area: all that's left is to open the address, create your administrator account and send your first link.
servorbit.com/ma-en/blog/self-host-password-pusher-vps-secrets


