···11-# Instagram To Bluesky [](https://codecov.io/gh/marcomaroni-github/instagram-to-bluesky)
22-33-Import posts exported from Instagram to a Bluesky account.
44-55-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.
66-77-88-[**An example of an account used to import posts from Instagram**](https://bsky.app/profile/mm-instagram-arch.bsky.social)
99-1010-⚠️ We recommend creating a specific account to test the import and not using your main Bluesky account ⚠️
1111-1212-## Features
1313-1414-- Imports photos and videos from Instagram posts
1515-- Preserves original post dates and captions
1616-- Supports importing up to 4 images per post, splitting a post to incude all images and videos due to bluesky limits.
1717-- Test modes for verifying video and image imports
1818-- Simulation mode to estimate import time
1919-- Configurable date ranges for selective imports
2020-2121-## Testing
2222-2323-The project includes a test suite that can be run in several ways:
2424-2525-```bash
2626-# Run all tests
2727-npm test
2828-2929-# Run tests in watch mode (re-runs on file changes)
3030-npm run test:watch
3131-3232-# Run tests with coverage report
3333-npm run test:coverage
3434-```
3535-3636-## Prerequisites
3737-3838-- Node.js >= 20.12.0
3939- - .nvmrc exists, run `nvm use`.
4040-- Your Instagram archive in JSON format ([download your archive here](https://www.instagram.com/download/request))
4141-- A Bluesky account with an App Password
4242- - Verified email or videos will show up as not found.
4343-4444-## Getting Started
11+# Instagram To Bluesky
4524646-1. Install dependencies: `npm install`
4747-2. Copy `.env.dist` to `.env` and configure:
4848-4949-```shell
5050-# Your Bluesky username (e.g. "username.bsky.social")
5151-BLUESKY_USERNAME=username.bsky.social
5252-# App Password from Bluesky settings
5353-BLUESKY_PASSWORD=your-password
5454-# Path to your unzipped Instagram archive
5555-ARCHIVE_FOLDER=c:/download/instagram-username-2025-XX-XX-hash
5656-5757-# Optional settings
5858-SIMULATE=1 # Set to 1 to simulate import without posting
5959-TEST_VIDEO_MODE=0 # Set to 1 to test video imports
6060-TEST_IMAGE_MODE=0 # Set to 1 to test image imports
6161-TEST_IMAGES_MODE=1 # 5 images in a post (all 4 should upload, plus a second post with 1)
6262-TEST_MIXED_MEDIA_MODE=0 # many images and videos, single post split into 5, with a total of 10 media uploaded.
6363-MIN_DATE=2020-01-01 # Only import posts after this date
6464-MAX_DATE=2025-01-01 # Only import posts before this date
6565-LOG_LEVEL=debug # Set logging verbosity (debug, info, warn, error)
6666-```
6767-6868-## Running the Import
6969-7070-You can run the script in two ways:
7171-7272-- Standard output: `npm start`
7373-- With logging to file: `npm run start_log`
7474-7575-> 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.
7676-7777-### Test Modes
7878-7979-The project includes four test modes to verify imports:
8080-8181-- `TEST_VIDEO_MODE`: Tests video import functionality
8282-- `TEST_IMAGE_MODE`: Tests image import functionality
8383-- `TEST_IMAGES_MODE`: Tests max image per post split functionality.
8484-- `TEST_MIXED_MEDIA_MODE`: Tests posts with video and image formats splitting content to match Bluesky's limitations.
8585-8686-Enable these by setting the corresponding environment variable to 1. Note: You cannot enable both modes simultaneously.
8787-8888-### Simulation Mode
8989-9090-Set `SIMULATE=1` to run a dry-run that:
9191-- Counts posts that would be imported
9292-- Estimates import time
9393-- Validates media files
9494-- Does not create any posts
9595-9696-This is recommended before running an actual import.
9797-9898-## Limitations
9999-100100-- Maximum 4 images per post (Bluesky platform limit).
101101- - Splits posts adding a postfix `(Part 1/4)` ensuring no data loss.
102102-- Maximum video size of 100MB.
103103-- Rate limiting enforced between posts.
104104-- Stories, and likes can not be imported.
105105-- Mentions with URLs like @example.com will fail.
106106- - BlueSky Facets autodetects a possible self hosted PDS handle but fails to find it.
107107-108108-## Additional Resources
109109-110110-[BlueSky Post deleter web application](https://deleter.shiroyama.us/) `*Use at your own risk*`
111111-112112-## License
113113-114114-"Instagram To Bluesky" is published under the MIT license.
115115-116116-Copyright 2024 Marco Maroni
117117-118118-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:
119119-120120-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
121121-122122-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.
33+The project is no longer active here and has been moved to [Tangled](https://tangled.sh/@marcomaroni.it/instagram-to-bluesky)