Your own server
How to run the Sandyk server yourself and connect your phone to it.
You can keep the server at home on a NAS, an old computer or a Raspberry Pi, or on a rented VPS. Your photos and files then stay with you; we neither store nor see them. If you'd rather not set anything up, use our server: it's "Cloud" in the app.
What you need
- A 64-bit computer (amd64 or arm64) with Docker. Synology, QNAP, Unraid, TrueNAS, Raspberry Pi 4 and 5, plain Linux, and Windows or macOS with Docker Desktop all work.
- 1 GB of memory or more, and disk space for your photos and videos.
- With Home Assistant you don't need Docker separately: there's an add-on, see below.
Install with Docker
One command:
docker run -d --name sandyk --restart unless-stopped \
-p 8080:8080 -v sandyk-data:/data \
ghcr.io/keremet-dev/sandyk
The server starts on port 8080, and the database and files go into the Docker volume sandyk-data.
With docker compose
Easier when you want to change settings. Save this as docker-compose.yml:
services:
sandyk:
image: ghcr.io/keremet-dev/sandyk
container_name: sandyk
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- sandyk-data:/data
environment:
# this computer's address on your home network
FM_LOCAL_URLS: http://192.168.1.10:8080
volumes:
sandyk-data:
Then run docker compose up -d.
Put the computer's address on your network in FM_LOCAL_URLS. At home the phone then talks to the server directly instead of over the internet, and backups go faster.
Files on another disk
Instead of the volume you can use a folder of your own, say on a big disk: -v /mnt/disk/sandyk:/data. The server doesn't run as root, so give it that folder once:
sudo chown -R 65532:65532 /mnt/disk/sandyk
Home Assistant
- Open Settings → Add-ons → Add-on Store, tap ⋮ in the top right and choose Repositories.
- Add
https://github.com/Keremet-DEV/sandyk-ha-addon. - Find Sandyk in the store, install it and start it.
Files go to /share/sandyk by default. To use an external disk, add it in Settings → System → Storage and set a path like /media/disk/sandyk in the add-on's options. The add-on finds its home address by itself.
First sign-in
While the server has no accounts, it writes a setup code to its log at every start, for example ABCD-EFGH. The first account can't be created without it; otherwise whoever reached a fresh server first could take it.
- Docker:
docker logs sandyk - Home Assistant: the add-on's Log tab
Then open http://computer-address:8080 in a browser and enter the code, your e-mail and a password. This account becomes the admin. You can do the same from the app: it asks for the code too.
The admin adds other people in the web app (Settings → Users) or in the phone app, and can give each of them a space limit.
Connect your phone
In the Sandyk app open Settings → Connect a Server → Own Server, enter the server's address, for example 192.168.1.10:8080, and sign in. If a server is already connected and you're adding a second one, it's Settings → Servers → Add a Server.
Away from home
At home the phone finds the server on your network. For backups to work on the road, the server needs an address on the internet. The easiest way is to get one in the app:
- Sign in to the server as the admin.
- Open Settings → Access from the internet.
- Pick a name and tap Get the address.
The server gets https://name.sandyk.cloud. No public IP or router setup is needed: the server keeps a connection to our relay itself. Encryption runs from the phone all the way to your server; the relay passes the data on but can't read it. This needs a Sandyk account, which means signing in with Apple or Google.
If you have a domain of your own and ports 80 and 443 open, you can skip the relay. Forward the ports to the server and add:
ports:
- "80:8080"
- "443:8443"
environment:
FM_DOMAIN: photos.example.com
FM_ACME_EMAIL: you@example.com
The server gets a Let's Encrypt certificate and renews it on its own. Tailscale and WireGuard work too: in the app you then enter the server's address in that network.
Where the files are
By default everything is in the volume or folder mounted at /data. The admin can move files to a NAS over SMB, to S3, SFTP or WebDAV in the app: Settings → Storage. The server checks it can write there and moves what's already uploaded in the background. The database stays in /data.
Backups
If the server is at home, it's the only place your photos are. Make sure there's a copy.
- The database (accounts, folders, albums, links) is copied by the server once a day; the last 7 copies are kept in
/data/backups. You can download a fresh one in the web app: Settings → Download a backup of the database. - Copy the files like any folder to another disk or another place: Hyper Backup on Synology, rsync, restic, whatever you use.
If both the server and the copy are lost, there's nothing to restore from. We don't keep a copy of your server.
Updating
Docker:
docker pull ghcr.io/keremet-dev/sandyk
docker rm -f sandyk
# then the same docker run command again
docker compose:
docker compose pull && docker compose up -d
Your data isn't touched. In Home Assistant updates arrive like for any add-on.
From a computer
The server's address in a browser opens the web app: photos, albums, files, trash, links. You can also mount the server as a network drive at http://address:8080/dav/ with the same e-mail and password.
If something doesn't work
Look at the log first: docker logs sandyk. If that doesn't help, write to support@sandyk.app and include the last lines of the log.