···1-# Instagram To Bluesky [](https://codecov.io/gh/marcomaroni-github/instagram-to-bluesky)
2-3-Import posts exported from Instagram to a Bluesky account.
4-5-This utility reads an Instagram archive from your local disk and uses the official Bluesky TypeScript SDK to import posts into your configured Bluesky account.
6-7-8-[**An example of an account used to import posts from Instagram**](https://bsky.app/profile/mm-instagram-arch.bsky.social)
9-10-⚠️ We recommend creating a specific account to test the import and not using your main Bluesky account ⚠️
11-12-## Features
13-14-- Imports photos and videos from Instagram posts
15-- Preserves original post dates and captions
16-- Supports importing up to 4 images per post, splitting a post to incude all images and videos due to bluesky limits.
17-- Test modes for verifying video and image imports
18-- Simulation mode to estimate import time
19-- Configurable date ranges for selective imports
20-21-## Testing
22-23-The project includes a test suite that can be run in several ways:
24-25-```bash
26-# Run all tests
27-npm test
28-29-# Run tests in watch mode (re-runs on file changes)
30-npm run test:watch
31-32-# Run tests with coverage report
33-npm run test:coverage
34-```
35-36-## Prerequisites
37-38-- Node.js >= 20.12.0
39- - .nvmrc exists, run `nvm use`.
40-- Your Instagram archive in JSON format ([download your archive here](https://www.instagram.com/download/request))
41-- A Bluesky account with an App Password
42- - Verified email or videos will show up as not found.
43-44-## Getting Started
4546-1. Install dependencies: `npm install`
47-2. Copy `.env.dist` to `.env` and configure:
48-49-```shell
50-# Your Bluesky username (e.g. "username.bsky.social")
51-BLUESKY_USERNAME=username.bsky.social
52-# App Password from Bluesky settings
53-BLUESKY_PASSWORD=your-password
54-# Path to your unzipped Instagram archive
55-ARCHIVE_FOLDER=c:/download/instagram-username-2025-XX-XX-hash
56-57-# Optional settings
58-SIMULATE=1 # Set to 1 to simulate import without posting
59-TEST_VIDEO_MODE=0 # Set to 1 to test video imports
60-TEST_IMAGE_MODE=0 # Set to 1 to test image imports
61-TEST_IMAGES_MODE=1 # 5 images in a post (all 4 should upload, plus a second post with 1)
62-TEST_MIXED_MEDIA_MODE=0 # many images and videos, single post split into 5, with a total of 10 media uploaded.
63-MIN_DATE=2020-01-01 # Only import posts after this date
64-MAX_DATE=2025-01-01 # Only import posts before this date
65-LOG_LEVEL=debug # Set logging verbosity (debug, info, warn, error)
66-```
67-68-## Running the Import
69-70-You can run the script in two ways:
71-72-- Standard output: `npm start`
73-- With logging to file: `npm run start_log`
74-75-> Please note re-running an import will result in duplicates that will not display since BlueSky deduplicates via creation timestamp but will increment the post count. Please see [additional resources](#additional-resources) for a community suggested tool for deleting precvious migrations.
76-77-### Test Modes
78-79-The project includes four test modes to verify imports:
80-81-- `TEST_VIDEO_MODE`: Tests video import functionality
82-- `TEST_IMAGE_MODE`: Tests image import functionality
83-- `TEST_IMAGES_MODE`: Tests max image per post split functionality.
84-- `TEST_MIXED_MEDIA_MODE`: Tests posts with video and image formats splitting content to match Bluesky's limitations.
85-86-Enable these by setting the corresponding environment variable to 1. Note: You cannot enable both modes simultaneously.
87-88-### Simulation Mode
89-90-Set `SIMULATE=1` to run a dry-run that:
91-- Counts posts that would be imported
92-- Estimates import time
93-- Validates media files
94-- Does not create any posts
95-96-This is recommended before running an actual import.
97-98-## Limitations
99-100-- Maximum 4 images per post (Bluesky platform limit).
101- - Splits posts adding a postfix `(Part 1/4)` ensuring no data loss.
102-- Maximum video size of 100MB.
103-- Rate limiting enforced between posts.
104-- Stories, and likes can not be imported.
105-- Mentions with URLs like @example.com will fail.
106- - BlueSky Facets autodetects a possible self hosted PDS handle but fails to find it.
107-108-## Additional Resources
109-110-[BlueSky Post deleter web application](https://deleter.shiroyama.us/) `*Use at your own risk*`
111-112-## License
113-114-"Instagram To Bluesky" is published under the MIT license.
115-116-Copyright 2024 Marco Maroni
117-118-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
119-120-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
121-122-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
···1+# Instagram To Bluesky
000000000000000000000000000000000000000000023+The project is no longer active here and has been moved to [Tangled](https://tangled.sh/@marcomaroni.it/instagram-to-bluesky)
0000000000000000000000000000000000000000000000000000000000000000000000000000