Sharry 1.16
Overview
Sharry is a self-hosted file sharing application. You sign in, upload one or many files, and share them through public links that can be password protected and time limited. You can also request files from other people by sending them an upload link, so recipients send data to you without needing an account.
This SecureAnyCloud image runs Sharry 1.16 on Ubuntu 24.04 on Azure. Sharry is a Scala and JVM application, released under the GNU General Public License v3.0.
Sharry keeps its data on a dedicated data disk mounted at /var/lib/sharry. On first boot, sharry-firstboot.service writes the generated admin password to /root/sharry-credentials.txt.
What you get:
- Sharry 1.16 rest server (full distribution and web UI) from the official GitHub release, pinned and SHA-256 verified. The image installs version 1.16.0 at build time to
/opt/sharry - OpenJDK 21 JRE headless (Sharry requires Java 17 or newer)
- PostgreSQL 16, with its cluster relocated onto the dedicated data disk
sharry.servicesystemd unit running the server as the unprivilegedsharryuser- The Sharry HTTP listener bound to loopback only and fronted by nginx on port 80, so the only public surface is a single standard HTTP port
- nginx on port 80 reverse proxying to the loopback-bound Sharry HTTP listener, with an unauthenticated
/healthzfor load balancer probes sharry-firstboot.servicesystemd oneshot that generates a unique per-VM admin password, rotates the token signing secret and database password, starts the server and proves an authenticated round trip. It writes the admin password to/root/sharry-credentials.txt(mode 0600, root only). There is no default login baked into the image- Sharry web UI, the file sharing workbench, reachable at
http://<vm-ip>/ - PostgreSQL data and uploaded file blobs on a dedicated 30 GiB Azure data disk mounted at
/var/lib/sharry, independent of the OS disk and captured into the image so every VM is provisioned with it - Ubuntu 24.04 LTS base, patched at build time
- Azure Linux Agent for cloud integration and SSH key injection
- 24/7 SecureAnyCloud support with guaranteed 24 hour response SLA
Prerequisites
- An active Azure subscription, an SSH public key, and a VNet plus subnet in the target region
- A subscription to the Sharry 1.16 on Ubuntu 24.04 listing on Azure Marketplace
Recommended virtual machine size: Standard_B2s (2 vCPU, 4 GB RAM) for evaluation and small teams.
For heavier usage and larger uploads, use Standard_D2s_v5 (2 vCPU, 8 GB RAM) or larger. Raise the JVM heap in /etc/default/sharry, and resize the data disk to fit your file volumes.
Deploy from the Azure Portal
Search for Sharry in Marketplace, select the SecureAnyCloud publisher entry, then click Create.
Set the NSG rules to allow TCP 22 from your management IP and TCP 80 from your client IPs. The Sharry HTTP listener is bound to loopback, so only nginx on port 80 is exposed.
Do not expose port 80 to the public internet without a TLS-terminating reverse proxy in front, because file shares travel over this port.
Deploy from the Azure CLI
RG="sharry-prod"; LOCATION="eastus"; VM_NAME="sharry-01" IMAGE_URN="sac1647283583153:sharry-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION" az network vnet create -g "$RG" --name sh-vnet --address-prefix 10.80.0.0/16 --subnet-name sh-subnet --subnet-prefix 10.80.1.0/24 az network nsg create -g "$RG" --name sh-nsg az network nsg rule create -g "$RG" --nsg-name sh-nsg --name allow-ssh --priority 100 \
--source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 22 --access Allow --protocol Tcp az network nsg rule create -g "$RG" --nsg-name sh-nsg --name allow-http --priority 110 \
--source-address-prefixes "<your-client-cidr>" --destination-port-ranges 80 --access Allow --protocol Tcp
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:sharry-ubuntu-24-04:default:latest
az vm create -g "$RG" --name "$VM_NAME" --image "$IMAGE_URN" \
--size Standard_B2s --storage-sku StandardSSD_LRS \
--admin-username azureuser --ssh-key-values "$SSH_KEY" \
--vnet-name sh-vnet --subnet sh-subnet --nsg sh-nsg --public-ip-sku StandardConnect via SSH
ssh azureuser@<vm-ip>sharry.service, nginx.service and postgresql.service start automatically once sharry-firstboot.service has generated the per-VM admin password on first boot.
Verify the Sharry Service
sudo systemctl is-active sharry.service nginx.service postgresql.service
sudo test -f /var/lib/sac/data/sharry-firstboot.done && echo FIRSTBOOT_DONE
sudo systemctl status sharry.service --no-pager | head -8All three services report active, and the first-boot sentinel is present.
Inspect the Listeners
Check the listeners. The Sharry HTTP listener is bound to 127.0.0.1:9090 and PostgreSQL to 127.0.0.1:5432. nginx serves Sharry on port 80, and nothing but nginx listens on a public interface.
sudo ss -tln | grep -E ':9090|:80 |:5432'Retrieve the Admin Password
The per-VM admin password is generated at first boot and stored in a root-only file:
sudo cat /root/sharry-credentials.txtThe file shows the admin user, the per-VM password and the endpoint URLs:
SHARRY_ADMIN_USER=admin SHARRY_ADMIN_PASSWORD=<SHARRY_ADMIN_PASSWORD> SHARRY_URL=http://<vm-ip>/ SHARRY_API_URL=http://<vm-ip>/api/v2/ SHARRY_LOCAL_HTTP=http://127.0.0.1:9090/ SHARRY_SIGNUP_INVITE_PASSWORD=<generated at first boot>Verify the REST API
Sharry exposes a full REST API. Extract the password into a shell variable, obtain an authentication token, and list your shares:
PW=$(sudo grep '^SHARRY_ADMIN_PASSWORD=' /root/sharry-credentials.txt | cut -d= -f2-)
TOKEN=$(curl -s -H 'Content-Type: application/json' -X POST http://127.0.0.1/api/v2/open/auth/login \
-d "{\"account\":\"admin\",\"password\":\"$PW\"}" | sed -n 's/.*"token":"\([^"]*\)".*/\1/p')
curl -s -H "Sharry-Auth: $TOKEN" 'http://127.0.0.1/api/v2/sec/share/search?q='The first call authenticates the admin account and returns a token. The second lists the shares owned by that account. On a fresh VM it returns an empty items array until you create your first share.
Sign in to the Sharry Web UI
Open http://<vm-ip>/ from your workstation. The NSG must allow TCP 80. The sign-in page asks for a username and password:
Sign in with user admin and the per-VM password from /root/sharry-credentials.txt.
Send Files
Choose Create Share. Drop files onto the upload area or use Select Files, and add an optional description that supports Markdown. The upload screen shows the queued files and their sizes:
Press Submit to create the share and upload the files.
Publish and Share the Link
Open a share and select the Share Link tab. Press Publish to make it publicly available, then copy the generated link or scan the QR code. Anyone with the link can download the files until the validity time or maximum view count is reached:
Manage Your Shares
The Your Shares list shows every share you own, with its published state, number of files, size and creation time. Use it to open, edit, unpublish or delete a share:
Server Components
- Server home: /opt/sharry
- Start script: /opt/sharry/bin/sharry-restserver
- Server config: /etc/sharry/sharry.conf
- Launcher environment: /etc/default/sharry
- PostgreSQL data directory: /var/lib/sharry/pgdata (dedicated data disk)
- Uploaded file store: /var/lib/sharry/files (dedicated data disk)
- Systemd unit: /etc/systemd/system/sharry.service
- First-boot script: /usr/local/sbin/sharry-firstboot.sh
- First-boot service: /etc/systemd/system/sharry-firstboot.service
- Credentials file: /root/sharry-credentials.txt (mode 0600)
- First-boot sentinel: /var/lib/sac/data/sharry-firstboot.done
- nginx site: /etc/nginx/sites-available/sac-sharry
Managing the Sharry Service
sudo systemctl status sharry.service --no-pager | head -6 sudo journalctl -u sharry.service --no-pager | tail -5To restart the service after a configuration change, run sudo systemctl restart sharry.service.
Security Recommendations
- Rotate the admin password by editing
/etc/default/sharry(the-Dsharry.restserver.backend.auth.fixed.passwordoption) and restarting the service. Store the new password in your secrets manager. - Set the base URL to your real hostname in
/etc/default/sharry(-Dsharry.restserver.base-url=https://files.example.com), so that public share links and the sign-in cookie are correct. - Keep the HTTP listener on loopback as shipped. Expose only nginx on port 80, and put TLS in front of it with Azure Application Gateway, or with nginx and a real certificate.
- Restrict the NSG so that port 80 only reaches trusted client networks, never the public internet without TLS.
- Choose the signup mode in
/etc/default/sharry(inviteas shipped, orclosed), and control who can create accounts. - Back up the data disk at
/var/lib/sharry, which holds the PostgreSQL cluster and the uploaded files, or take Azure disk snapshots. - Patch the OS monthly with
sudo apt-get update && sudo apt-get upgrade && sudo reboot.
Support and Licensing
Sharry is licensed under the GNU General Public License v3.0. There are no per-node, per-CPU or per-GB fees.
SecureAnyCloud produces this image, which is not affiliated with, endorsed by, or sponsored by the Sharry project. Sharry is a trademark of its respective owner and is used here only to describe the software included in the image.
SecureAnyCloud provides commercial support for this image separately from the upstream project.
Email: sales@secureanycloud.com
Website: secureanycloud.com
Support hours: 24/7 with guaranteed 24 hour response SLA
Deploy on Azure
Launch Sharry 1.16 Secure File Sharing on Ubuntu 24.04 with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Deploy on Azure
Launch Sharry 1.16 Secure File Sharing 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