A comprehensive toolkit for migrating Personal Data Servers (PDS) in the AT Protocol/Bluesky ecosystem. This project provides both a desktop GUI application and a web service API for seamless PDS migration operations.
This toolkit enables users to migrate their data between Personal Data Servers in the AT Protocol network. It consists of three main packages:
pdsmigration-common: Core library containing migration logic, cryptographic utilities, and shared API functionspdsmigration-gui: Cross-platform desktop GUI application built with egui/eframepdsmigration-web: HTTP web service built with Actix-Web, featuring background job processing and Prometheus metrics
- Language: Rust (1.97.0 toolchain required)
- GUI Framework: egui/eframe with both glow and wgpu rendering backends
- Web Framework: Actix-Web
- Cryptography: secp256k1, multibase encoding
- Data Formats: IPLD, CBOR, JSON
- Metrics: Prometheus
- Testing: Standard Rust testing with mockall, wiremock
- Rust Toolchain: 1.97.0 channel with
rustfmtandclippycomponents - Platform Support:
- Native: Windows, macOS, Linux
# Install Rust 1.97.0 (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install 1.97.0
rustup component add rustfmt clippyEach release on the Releases page contains the following prebuilt binaries:
pdsmigration-gui.exefor Windows- a
.debpackage for Debian, Ubuntu and related distributions - an
.rpmpackage for Fedora, RHEL, openSUSE and related distributions - an
.AppImageto run on other Linux distributions without installation pdsmigration-gui-linux-x86_64, a plain binary for other Linux distributions
To build from source, continue with the steps below.
# Clone the repository
git clone https://github.com/NorthskySocial/pds-migration.git
cd pds-migration
# Build all packages
cargo build --release
# Run GUI application
cargo run -p pdsmigration-gui
# Run web service (requires environment setup)
cargo run -p pdsmigration-web# Build and run native GUI
cargo run -p pdsmigration-gui
# Release build
cargo build -p pdsmigration-gui --release# Run web service (development)
cargo run -p pdsmigration-web
# Build for production
cargo build -p pdsmigration-web --release
# Docker deployment
docker build -t pdsmigration .
docker run -p 9090:9090 --env-file .env pdsmigration# Build library
cargo build -p pdsmigration-common
# Run library tests
cargo test -p pdsmigration-common| Variable | Required | Default | Description |
|---|---|---|---|
PLC_DIRECTORY |
No | https://plc.directory |
PLC directory service URL |
SERVER_PORT |
No | 9090 |
HTTP server port |
WORKER_COUNT |
No | 2 |
Number of worker threads |
CONCURRENT_TASKS_PER_JOB |
No | 3 |
Max concurrent blob processes per job |
JOB_RETENTION_SECS |
No | 3600 |
How long finished jobs are kept in memory before being pruned |
ARTIFACT_RETENTION_SECS |
No | 86400 |
How long local blob directories and repo CAR files are kept before being deleted |
ARTIFACT_GC_INTERVAL_SECS |
No | 3600 |
How often the local artifact garbage collector runs |
MIGRATION_LIMIT |
No | -1 |
Maximum distinct ongoing migrations; -1 means capacity is unlimited |
MIGRATION_TTL_SECS |
No | 1800 |
Seconds before an inactive migration lease expires |
PDS_RATE_LIMIT_BYPASS_KEY |
No | Key to bypass PDS rate limits; sent in the x-ratelimit-bypass header on PDS requests |
SERVER_PORT=9090
WORKER_COUNT=4
CONCURRENT_TASKS_PER_JOB=3
PLC_DIRECTORY=https://plc.directoryThe web service provides the following HTTP POST endpoints for migration:
/service-auth- Service authentication/create-account- Create new account on target PDS/export-repo- Export repository data/import-repo- Import repository data/export-blobs- Export blob data/upload-blobs- Upload blobs to target PDS/migrate-preferences- Migrate user preferences/request-token- Request authentication token/migrate-plc- Migrate PLC (Personal Data License)/activate-account- Activate migrated account/deactivate-account- Deactivate old account
Additional endpoints:
/health- Health check endpoint/migrations- Migrations capacity status/metrics- Prometheus metrics
# Run all tests
cargo test --workspace
# Run tests for specific package
cargo test -p pdsmigration-common
cargo test -p pdsmigration-gui
cargo test -p pdsmigration-web
# Run tests with output
cargo test --workspace -- --nocapture- All code must pass
cargo fmt --check - All code must pass
cargo clippy - Warnings are treated as errors in CI
- Use
#[tracing::instrument]for debugging critical functions
- Native: Standard desktop platforms
- Docker: Production containerized deployment
GitHub Actions automatically:
- Runs comprehensive tests
- Checks code formatting and linting
- Builds Docker containers
- Publishes to GitHub Container Registry
- Publishes desktop application releases
A release workflow runs every Monday and Thursday from the state of main.
If there are new commits that touch pdsmigration-common, pdsmigration-gui or the workspace
manifests, it builds the Windows executable and the Linux binary, .deb and .rpm packages and
AppImage, and a new GitHub release is published with the related commit messages as release notes.
Every release is tagged with the major and minor workspace version and the build date as the patch number.
- Ensure you have Rust 1.97.0 installed
- Format code:
cargo fmt - Run tests:
cargo test --workspace - Check linting:
cargo clippy - Build all targets:
cargo build --workspace