---
title: Quick Start
description: Get your Ascently sync server running with Docker Compose
---

Get your sync server running in minutes with Docker Compose.

## Prerequisites

- Docker and Docker Compose installed
- A server or computer to host the sync service

## Setup

1. Create a `docker-compose.yml` file:

```yaml
version: '3.8'

services:
  ascently-sync:
    image: git.atri.dad/atridad/ascently-sync:latest
    ports:
      - "8080:8080"
    environment:
      - AUTH_TOKEN=${AUTH_TOKEN}
      - DATA_FILE=/data/ascently.json
      - IMAGES_DIR=/data/images
    volumes:
      - ./ascently-data:/data
    restart: unless-stopped
```

2. Create a `.env` file in the same directory:

```env
AUTH_TOKEN=your-super-secret-token-here
```

Replace `your-super-secret-token-here` with a secure random token (see below).

3. Start the server:

```bash
docker-compose up -d
```

The server will be available at `http://localhost:8080`.

## Generate a Secure Token

Use this command to generate a secure authentication token:

```bash
openssl rand -base64 32
```

Copy the output and paste it into your `.env` file as the `AUTH_TOKEN`.

Keep this token secret and don't commit it to version control.

## Configure Your Apps

Open Ascently on your iOS or Android device:

1. Go to **Settings**
2. Scroll to **Sync Configuration**
3. Enter your **Server URL**: `http://your-server-ip:8080`
4. Enter your **Auth Token**: (the token from your `.env` file)
5. Tap **Test Connection** to verify it works
6. Enable **Auto Sync**
7. Tap **Sync Now** to perform your first sync

Repeat this on all your devices to keep them in sync.

## Verify It's Working

Check the server logs:

```bash
docker-compose logs -f ascently-sync
```

You should see logs like:

```
Delta sync from 192.168.1.100: lastSyncTime=2024-01-15T10:00:00.000Z, gyms=1, problems=5, sessions=2, attempts=10, deletedItems=0
```

## Remote Access

To access your server remotely:

### Option 1: Port Forwarding

1. Forward port 8080 on your router to your server
2. Find your public IP address
3. Use `http://your-public-ip:8080` as the server URL

### Option 2: Domain Name (Recommended)

1. Get a domain name and point it to your server
2. Set up a reverse proxy (nginx, Caddy, Traefik)
3. Enable HTTPS with Let's Encrypt
4. Use `https://sync.yourdomain.com` as the server URL

Example nginx config with HTTPS:

```nginx
server {
    listen 443 ssl http2;
    server_name sync.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/sync.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/sync.yourdomain.com/privkey.pem;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
```

## Updating

Pull the latest image and restart:

```bash
docker-compose pull
docker-compose up -d
```

Your data is stored in `./ascently-data` and persists across updates.

## Troubleshooting

### Connection Failed

- Check the server is running: `docker-compose ps`
- Verify the auth token matches on server and client
- Check firewall settings and port forwarding
- Test locally first with `http://localhost:8080`

### Sync Errors

- Check server logs: `docker-compose logs ascently-sync`
- Verify your device has internet connection
- Try disabling and re-enabling sync
- Perform a manual sync from Settings

### Data Location

All data is stored in `./ascently-data/`:

```
ascently-data/
├── ascently.json    # Your climb data
└── images/          # Problem images
```

You can back this up or move it to another server.

## Next Steps

- Read the [API Reference](/sync/api-reference/) for advanced usage
- Set up automated backups of your `ascently-data` directory
- Configure HTTPS for secure remote access
- Monitor server logs for sync activity