You can share photos privately from a self-hosted gallery by creating a share link that is protected with a password, an expiry date and download limits, or by inviting specific user accounts instead of exposing the whole library. The exact labels vary by gallery software, but the pattern is the same: keep the server off the public internet except through a secure tunnel or reverse proxy with HTTPS, then use the gallery's own sharing controls rather than sending raw file URLs. This guide covers the general workflow that works for the common self-hosted galleries (Immich, PhotoPrism, Nextcloud Photos, Piwigo and similar) and the safety details that matter most.
What You'll Need
- A working self-hosted gallery with your photos already indexed and visible in the web interface.
- Admin or owner access to that gallery so you can create shares and manage users.
- A domain name and a valid TLS certificate (Let's Encrypt is fine) if anyone outside your home network will open the link.
- A reverse proxy or tunnel such as Caddy, Nginx, Traefik or Cloudflare Tunnel, unless your gallery already handles HTTPS itself.
- Access to your router's admin page if you plan to forward a port, and a static or dynamic DNS address.
- A password manager to generate and store share passwords.
Step-by-Step
- Confirm the gallery is reachable over HTTPS. Open your gallery's address in a browser and check for the padlock. If you only reach it by an internal IP address like 192.168.x.x, set up a reverse proxy with a certificate first. Sharing a plain HTTP link over the internet exposes both the photos and any passwords typed into the login form.
- Decide between a share link and a user account. A share link is best for one-off albums sent to family or friends who do not want an account. A user account is better for someone who will return repeatedly, because you can revoke it in one place and see what they accessed. Most galleries support both; pick per recipient rather than defaulting to links for everyone.
- Create an album or selection first. In the gallery, select the photos you want to share and add them to a new album. Sharing an album rather than individual files keeps the link stable and makes it easy to add or remove photos later without resending the link.
- Open the album's share menu. Look for a share icon on the album page, or open the album's options menu and choose the sharing entry. Labels differ slightly between versions, devices and regions, so if you do not see "Share" look for "Link," "Publish" or a chain-link icon.
- Turn on password protection. In the share dialog, enable the password option and generate a long random password in your password manager. Send the link and the password through two different channels, for example the link by email and the password by text message, so a single intercepted message is not enough to open the album.
- Set an expiry date. Choose the shortest period that works, such as seven or thirty days. Expiry is the single most effective control because it limits the damage if a link is forwarded or leaked later.
- Limit downloads and other permissions where offered. Many galleries let you allow viewing only, hide the download button, or disable original-file downloads while still permitting a compressed preview. Turn off anything the recipient does not need, especially the ability to re-share.
- Copy the link and test it in a private browser window. Open the link while logged out of your own account. Confirm the password prompt appears, that the album loads, and that the download button is hidden if you disabled it. Testing logged out is the only way to see what the recipient actually sees.
- Send the link and password separately. Include a short note explaining when the link expires and asking the recipient not to forward it. For a group, send individual links rather than one link to a group chat, so you can revoke access per person.
- Review active shares periodically. Open the gallery's sharing or admin section and look at the list of active links and users. Delete anything you no longer need. Old links that were never revoked are the most common cause of private photos becoming public.
Common Mistakes
- Sharing the raw file URL instead of using the gallery's share feature. A direct file link often bypasses passwords and expiry entirely.
- Leaving the default "no expiry" setting on. Links get forwarded, pasted into group chats and archived.
- Sending the password in the same message as the link, which defeats the purpose of having one.
- Exposing the gallery to the internet without HTTPS, or opening router ports for the database or admin panel as well as the web interface.
- Forgetting that anyone with the link and password can usually download the photos and re-upload them elsewhere; a share link is not DRM.
- Using the admin account for sharing. Create a limited user instead, so a leaked credential cannot change settings or delete the library.
Tips
- Name shares descriptively ("Grandma – birthday, expires 30 days") so the active-shares list stays readable.
- Keep the gallery software updated. Share features and security fixes ship in point releases, and old versions are a common entry point.
- Put the gallery behind a VPN such as WireGuard or Tailscale if only a few trusted people need access; then nothing is exposed to the public internet at all.
- Use a separate, non-admin account for uploads from phones, so a stolen phone cannot wipe the library.
- Check local recording and privacy laws before sharing photos of other people, especially images with audio or of children; rules differ by country and region.
Troubleshooting
If the recipient sees a "not found" or certificate warning, the problem is almost always the address: confirm the public URL works in your own browser first, then check the reverse proxy and certificate. If the password prompt never appears, the share may have been created without protection, or the recipient is opening a cached or direct file link; recreate the share and resend the new link. If photos fail to load but the album page opens, check that the reverse proxy is passing large files and that the gallery's storage volume is mounted and readable. If the recipient cannot download despite the button being visible, the download permission is still enabled in the share settings. If a link stops working early, check the expiry date and whether the album was moved or deleted. After any change to the proxy, certificate or gallery version, retest one share logged out before telling anyone the problem is fixed.
Frequently Asked Questions
Can the recipient forward my share link?
Yes, unless the gallery supports email-bound or single-recipient links. A password and short expiry are the practical defences; treat any link as forwardable.
Is a self-hosted gallery more private than a cloud service?
It can be, because you control the server and the data. It is only as private as your configuration: HTTPS, updates, strong passwords and revoked old links matter more than the hosting choice.
Do I need a domain name to share photos?
Only if people outside your home network need to open the link. For local sharing, an internal address or a VPN works without one.
What happens to shared photos if I delete the album?
The share breaks immediately because the link points to the album. Remove the share first if you want to notify recipients, then delete.
Can I see who opened a share link?
Some galleries log access and some do not. Check the admin or activity section; if there is no access log, assume you cannot tell who viewed it.
Should I use the admin account to create shares?
No. Create a limited user for sharing so a leaked password cannot alter settings or delete the library.