---
title: Self-Hosted Sync Overview
description: Learn about Ascently's optional sync server for cross-device data synchronization
---

Run your own sync server to keep your data in sync across devices. The server is lightweight and easy to set up with Docker.

## How It Works

The server stores your data in a single `ascently.json` file and images in a directory. It's simple: last write wins. Authentication is a static bearer token you set.

## Features

- **Delta sync**: Only syncs changed data
- **Image sync**: Automatically syncs problem images
- **Conflict resolution**: Last-write-wins based on timestamps
- **Cross-platform**: Works with iOS and Android clients
- **Privacy**: Your data, your server, no analytics

## API Endpoints

- `GET /health` - Health check
- `GET /sync` - Download full dataset
- `POST /sync` - Upload full dataset
- `POST /sync/delta` - Sync only changes (recommended)
- `POST /images/upload?filename={name}` - Upload image
- `GET /images/download?filename={name}` - Download image

All endpoints require `Authorization: Bearer <your-token>` header.

See the [API Reference](/sync/api-reference/) for complete documentation.

## Getting Started

Check out the [Quick Start guide](/sync/quick-start/) to get your server running with Docker Compose.

You'll need:
- Docker and Docker Compose
- A secure authentication token
- A place to store your data

The server will be available at `http://localhost:8080` by default. Configure your Ascently apps with your server URL and auth token to start syncing.

## How Sync Works

1. **First sync**: Client uploads or downloads full dataset
2. **Subsequent syncs**: Client uses delta sync to only transfer changed data
3. **Conflicts**: Resolved automatically using timestamps (newer wins)
4. **Images**: Synced automatically with problem data

Active sessions are excluded from sync until completed.
