Deployment guide

MicroBin

Overview

MicroBin is a tiny, feature-rich, self-hosted pastebin and file-sharing web application. From one web interface you can paste text such as code, notes and logs, upload files, shorten URLs and generate QR codes. Uploads can be public, unlisted or private, can expire automatically or after a set number of reads, and can be encrypted on the server or in the browser.

This SecureAnyCloud image serves MicroBin 2.1.0 behind an nginx reverse proxy on a hardened Ubuntu 24.04 LTS base, patched at build time. MicroBin listens only on the loopback interface (127.0.0.1:8080), and nginx serves it on port 80.

MicroBin includes a built-in admin panel. Instead of its well-known default admin login, each VM generates a unique administrator password on first boot and records it in a protected file. No shared or default credential ships in the image.

What you get:

  • MicroBin 2.1.0 served behind nginx, managed by systemd
  • The MicroBin web UI for pastes, file uploads and URL shortening on :80
  • A per-VM administrator password generated on first boot, never a baked-in default
  • A built-in JSON datastore, with no separate database to run
  • The server bound to 127.0.0.1:8080 only, never exposed directly to the network
  • A dedicated Azure data disk at /var/lib/microbin for the paste store, uploaded files and the database
  • microbin.service and nginx.service as enabled systemd units
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a sensible starting size. Choose a larger size for busier instances or larger uploads.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the web UI. MicroBin serves plain HTTP on port 80, so for production terminate TLS in front of it with your own domain. The server listens on 127.0.0.1:8080 only, so port 8080 stays off the network.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for MicroBin by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:microbin-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name microbin \
  --image sac1647283583153:microbin-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Open port 80 for the web UI:

az vm open-port --resource-group <your-rg> --name microbin --port 80

Step 3 - Confirm the services are running

SSH in as azureuser and confirm that MicroBin and nginx are active. MicroBin listens only on 127.0.0.1:8080, while nginx serves the web UI on port 80.

systemctl is-active microbin nginx microbin-firstboot
sudo ss -tlnp | grep -E ':80 |:8080 ' | sed 's/ */ /g'

Step 4 - Retrieve the per-VM admin password

Each VM generates its own administrator password on first boot. The password and the site URL are written to a protected file that only root can read. Read it with sudo:

sudo cat /root/microbin-credentials.txt

The file records microbin.url, microbin.admin_username (which is admin) and microbin.admin_password (unique to this VM). Keep it safe. To change the password at any time, edit MICROBIN_ADMIN_PASSWORD in /etc/microbin/microbin.env and run sudo systemctl restart microbin.

To confirm the web UI is healthy, request the home page from the command line. It returns 200:

curl -s -o /dev/null -w 'GET / -> HTTP %{http_code}\n' http://127.0.0.1/

Step 5 - Open the web UI and create a paste

Browse to http://<vm-public-ip>/. The home page is the paste editor.

Type or paste your text into the large content box. Optionally set a filename for syntax highlighting, then choose the expiration and the privacy (public, unlisted, private or an encrypted secret). Select Save.

To share a file instead of text, attach it with the file control.

Step 6 - View and share the paste

After you save, MicroBin opens the upload view page. It shows the content with syntax highlighting, a short animal-name URL (for example /upload/tiny-red-fox) and a QR code. Controls let you view the Raw text, Download the content or Remove the upload.

Share the URL, or scan the QR code from a phone.

Step 7 - Read a paste back from the command line

Every upload has a matching raw endpoint at /raw/<id>, which is handy for scripts and configuration files. Run the command below to create a paste from the shell and read it straight back:

LOC=$(curl -s -D - -o /dev/null -F 'content=hello from sac' -F 'privacy=public' -F 'expiration=1hour' http://127.0.0.1/upload | awk 'tolower($1)=="location:"{v=$2} END{gsub(/\r/,"",v);print v}') SLUG=${LOC##*/upload/} curl -s http://127.0.0.1/raw/$SLUG; echo

Step 8 - Sign in to the admin panel

The admin panel lets you review and remove any upload on the instance. Browse to http://<vm-public-ip>/admin, which shows the admin login. Sign in with the username admin and the per-VM password from /root/microbin-credentials.txt.

Once you are signed in, the panel lists every upload with its size, creation time and read count. You can remove any of them from there.

To confirm the admin password from the command line, replace <MICROBIN_ADMIN_PASSWORD> with the value from /root/microbin-credentials.txt and run the command below. A correct password returns 200:

curl -s -o /dev/null -w 'admin auth -> HTTP %{http_code}\n' --form-string 'username=admin' --form-string 'password=<MICROBIN_ADMIN_PASSWORD>' http://127.0.0.1/admin

Step 9 - Verify the stack

Check the MicroBin version, confirm that the services are enabled, that the web UI responds through nginx, and that the dedicated data disk is mounted:

/usr/local/bin/microbin --version
systemctl is-enabled microbin nginx
curl -s -o /dev/null -w 'GET / -> HTTP %{http_code}\n' http://127.0.0.1/
findmnt -no SOURCE,TARGET,FSTYPE /var/lib/microbin

Step 10 - Where your data lives

The JSON database, every uploaded file and the public assets live on a dedicated Azure data disk mounted at /var/lib/microbin, separate from the OS disk. The disk is captured into the image and re-provisioned on every VM, and you can snapshot and resize it independently.

Confirm the mount and the free space:

df -h /var/lib/microbin | tail -1
sudo ls -la /var/lib/microbin

Security notes

  • Encrypt web traffic. MicroBin serves plain HTTP on port 80. For production, put it behind your own TLS-terminating reverse proxy or an Azure Application Gateway with a certificate for your domain, and restrict port 80 in the NSG to trusted networks. A common approach is certbot with your-domain on a front-end proxy.
  • Keep the server private. MicroBin listens on 127.0.0.1:8080 only and is never exposed directly. Only nginx on port 80 faces the network.
  • Protect the admin password. No default admin login ships. The per-VM administrator password is generated on first boot and stored in /root/microbin-credentials.txt, readable only by root. Keep it safe. To rotate it, edit MICROBIN_ADMIN_PASSWORD in /etc/microbin/microbin.env and restart the service.
  • Control who can upload. By default, anyone who can reach port 80 can create a paste. To require a password for uploads, set MICROBIN_UPLOADER_PASSWORD in /etc/microbin/microbin.env and restart the service, or restrict port 80 in the NSG.
  • Keep the VM patched. The image is patched at build time and ships with unattended security upgrades enabled.

Support

SecureAnyCloud images come with 24/7 support. For questions about this MicroBin image or help with your deployment, contact us through the SecureAnyCloud website.

Deploy on Azure

Launch MicroBin on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure