Skip to content

Run your own server

Synara's server is open source under GPL-2.0 and ships as a Docker image. Start with one container and SQLite. Add Postgres, a Redis cluster and the trained recommendation model when you want them.

What you need

  • Docker with Compose

    Any machine you control: a home server, a spare PC or a rented VPS.

  • Storage for your library

    Lossless files are large. Put the data volume on a disk with room to grow.

  • A reachable address

    Port 8080 on your network, or a reverse proxy with HTTPS for listening on the go.

Set it up

  1. Write a compose file

    Save it as compose.yaml in an empty folder. Change every change-me value before the first start.

    Setup
    Image

    One container. The database is a SQLite file in the data volume, which is fine for personal libraries.

    No stable server image yet, so this file uses the dev images (ghcr.io/dertyp7214/synara:latest-dev).

    compose.yaml (SQLite)
    services:
      synara:
        image: ghcr.io/dertyp7214/synara:latest-dev
        ports:
          - "8080:8080"
        environment:
          CLIENT_ID: admin                          # initial admin user (first run)
          CLIENT_SECRET: change-me                  # initial admin password
          JWT_SECRET: change-me-to-a-long-random-string
          DB_URL: jdbc:sqlite:/data/synara.db           # SQLite database file inside the data volume
          # CREDENTIALS_ENCRYPTION_KEY: ""          # openssl rand -base64 32
        volumes:
          - synara_data:/data
          - synara_config:/home/appuser/.config
          - synara_tiddl:/home/appuser/.tiddl
          - synara_backups:/backups
        restart: unless-stopped
    
    volumes:
      synara_data:
      synara_config:
      synara_tiddl:
      synara_backups:
    
  2. Start it

    The server listens on port 8080. Follow the log until it's ready.

    Terminal
    docker compose up -d
    docker compose logs -f synara
  3. Connect an app

    Use the admin account from your compose file. Get the apps.

    1. Install the app from the download page and open it.
    2. Enter your server's address, for example http://192.168.1.20:8080 or your HTTPS domain.
    3. Log in with the CLIENT_ID and CLIENT_SECRET from your compose file.

Good to know

/data is Synara’s own folder
/data holds Synara’s data root (/data/Synara/…). Lossless files you already have can go into /data/Synara/other, which Synara indexes.
Owned by UID and GID 1000
The image runs as user 1000. If you swap the named volumes for bind mounts, make the folders writable for it: sudo chown -R 1000:1000 ./data.
SQLite or Postgres
SQLite needs no extra service, but search is simpler on it. Postgres is recommended for larger libraries and enables the full search index.
Redis has to be a cluster
Redis is optional. Leave REDIS_HOST empty to run without it. Synara connects to Redis in cluster mode only. Pointed at a plain standalone Redis, the server fails to start, so use synara-redis-cluster as in the full file.
Behind an HTTPS proxy
Set SERVER_SSL_SUPPORTED: "true" if your HTTPS reverse proxy doesn’t send X-Forwarded-Proto, so apps know to use https/wss.
Upgrading from 0.0.1 or older
Run ghcr.io/dertyp7214/synara:0.0.1-dev until the log shows Finished custom migration FillAlbumReleaseDates, then update.

Key settings

The environment variables you're most likely to touch.

All environment variables
Key environment variables
VariableWhat it doesDefault
CLIENT_ID, CLIENT_SECRETUsername and password of the initial admin. Created at startup if no user with that name exists. Changing them later does not change the password.none
JWT_SECRETSigns login tokens. Set a long random string.changeme
DB_URLJDBC URL. Use an absolute path for SQLite: jdbc:sqlite:/data/synara.db.none
DB_DRIVERorg.postgresql.Driver for Postgres.org.sqlite.JDBC
DB_USER, DB_PASSWORDDatabase credentials (Postgres).none
CREDENTIALS_ENCRYPTION_KEYEncrypts credentials stored in admin settings. Generate with openssl rand -base64 32 and keep it with your backups. If unset, Synara generates a key and stores it in the config volume.none
SERVER_SSL_SUPPORTEDSet to true if your HTTPS reverse proxy doesn’t send X-Forwarded-Proto, so apps know to use https/wss.false
REDIS_HOST, REDIS_PORTOptional Redis. Leave REDIS_HOST empty to run without it. Cluster mode only: pointed at a plain standalone Redis, the server fails to start.none
AUDIO_EMBED_URLAudio embedding service. Empty disables it.none
RECSYS_DATA_DIRDirectory shared with the recommendation service. Empty disables it.none
PORTPort the server listens on.8080

Run your own server

Synara's server is open source under GPL-2.0 and ships as a Docker image. Start with one container and SQLite. Add Postgres, a Redis cluster and the trained recommendation model when you want them.

What you need

  • Docker with Compose

    Any machine you control: a home server, a spare PC or a rented VPS.

  • Storage for your library

    Lossless files are large. Put the data volume on a disk with room to grow.

  • A reachable address

    Port 8080 on your network, or a reverse proxy with HTTPS for listening on the go.

1. Write a compose file

Setup
compose.yaml (SQLite)
services:
  synara:
    image: ghcr.io/dertyp7214/synara:latest-dev
    ports:
      - "8080:8080"
    environment:
      CLIENT_ID: admin                          # initial admin user (first run)
      CLIENT_SECRET: change-me                  # initial admin password
      JWT_SECRET: change-me-to-a-long-random-string
      DB_URL: jdbc:sqlite:/data/synara.db           # SQLite database file inside the data volume
      # CREDENTIALS_ENCRYPTION_KEY: ""          # openssl rand -base64 32
    volumes:
      - synara_data:/data
      - synara_config:/home/appuser/.config
      - synara_tiddl:/home/appuser/.tiddl
      - synara_backups:/backups
    restart: unless-stopped

volumes:
  synara_data:
  synara_config:
  synara_tiddl:
  synara_backups:

One container. The database is a SQLite file in the data volume, which is fine for personal libraries.

No stable server image yet, so this file uses the dev images (ghcr.io/dertyp7214/synara:latest-dev).

Save it as compose.yaml in an empty folder. Change every change-me value before the first start.

2. Start it

Terminal
docker compose up -d
docker compose logs -f synara

The server listens on port 8080. Follow the log until it's ready.

3. Connect an app

  1. Install the app from the download page and open it.

  2. Enter your server's address, for example http://192.168.1.20:8080 or your HTTPS domain.

  3. Log in with the CLIENT_ID and CLIENT_SECRET from your compose file.

Use the admin account from your compose file. Get the apps.

Good to know

  • /data is Synara’s own folder

    /data holds Synara’s data root (/data/Synara/…). Lossless files you already have can go into /data/Synara/other, which Synara indexes.

  • Owned by UID and GID 1000

    The image runs as user 1000. If you swap the named volumes for bind mounts, make the folders writable for it: sudo chown -R 1000:1000 ./data.

  • SQLite or Postgres

    SQLite needs no extra service, but search is simpler on it. Postgres is recommended for larger libraries and enables the full search index.

  • Redis has to be a cluster

    Redis is optional. Leave REDIS_HOST empty to run without it. Synara connects to Redis in cluster mode only. Pointed at a plain standalone Redis, the server fails to start, so use synara-redis-cluster as in the full file.

  • Behind an HTTPS proxy

    Set SERVER_SSL_SUPPORTED: "true" if your HTTPS reverse proxy doesn’t send X-Forwarded-Proto, so apps know to use https/wss.

  • Upgrading from 0.0.1 or older

    Run ghcr.io/dertyp7214/synara:0.0.1-dev until the log shows Finished custom migration FillAlbumReleaseDates, then update.

Key settings

  • CLIENT_ID, CLIENT_SECRET

    Username and password of the initial admin. Created at startup if no user with that name exists. Changing them later does not change the password.

  • JWT_SECRET

    Signs login tokens. Set a long random string.

    Default: changeme

  • DB_URL

    JDBC URL. Use an absolute path for SQLite: jdbc:sqlite:/data/synara.db.

  • DB_DRIVER

    org.postgresql.Driver for Postgres.

    Default: org.sqlite.JDBC

  • DB_USER, DB_PASSWORD

    Database credentials (Postgres).

  • CREDENTIALS_ENCRYPTION_KEY

    Encrypts credentials stored in admin settings. Generate with openssl rand -base64 32 and keep it with your backups. If unset, Synara generates a key and stores it in the config volume.

  • SERVER_SSL_SUPPORTED

    Set to true if your HTTPS reverse proxy doesn’t send X-Forwarded-Proto, so apps know to use https/wss.

    Default: false

  • REDIS_HOST, REDIS_PORT

    Optional Redis. Leave REDIS_HOST empty to run without it. Cluster mode only: pointed at a plain standalone Redis, the server fails to start.

  • AUDIO_EMBED_URL

    Audio embedding service. Empty disables it.

  • RECSYS_DATA_DIR

    Directory shared with the recommendation service. Empty disables it.

  • PORT

    Port the server listens on.

    Default: 8080

The environment variables you're most likely to touch. All environment variables

Go further in the docs