sandyk
EN RU KY

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

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

  1. Open Settings → Add-ons → Add-on Store, tap ⋮ in the top right and choose Repositories.
  2. Add https://github.com/Keremet-DEV/sandyk-ha-addon.
  3. 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.

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:

  1. Sign in to the server as the admin.
  2. Open Settings → Access from the internet.
  3. 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.

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.