- Minimalist Instagram UI clone
- Server-side rendered using EJS
- No tracking, no nonsense
- Easy to self-host
0gram requires active session headers from a dedicated Instagram account to function correctly.
It is crucial that you do not use your personal or primary Instagram account.
- Account Safety: To avoid having your main account flagged or banned by Instagram, create a new, separate account exclusively for 0gram.
- Verification: The new account must be verified with both an email address and a phone number. Instagram may restrict accounts that it detects as bots. You can use online phone verification services for this step if needed.
Once your dedicated account is created and you are logged in via a web browser:
- Navigate to any Instagram profile page (e.g.,
https://instagram.com/ichisansfw
). - Open your browser's Developer Tools (
Ctrl+Shift+I
on Windows/Linux,Cmd+Shift+I
on Mac). - Select the Network tab.
- Refresh the page to capture network requests.
- In the filter/search bar of the Network tab, search for the text
query
. - Right-click on the resulting request, navigate to Copy, and select Copy as Node.js fetch.
- Paste the copied code into a temporary text editor. You will only need the
headers
object from this code block.
-
In the root directory of the 0gram project, create a new file and name it
.headers.js
. -
Copy the
headers
object you extracted and paste it into this file, following the format below.const headers = { // Paste all the header key-value pairs here. For example: accept: "text/html,application/xhtml+xml,xml;q=0.9,image/webp,*/*;q=0.8", "accept-language": "en-US,en;q=0.5", "sec-fetch-dest": "document", // ... and all other headers from the copied data }; module.exports = headers;
-
Save the file. Your configuration is now complete.
Choose one of the following methods to install and run the application.
Run the application directly on your machine using Node.js.
# Install pnpm, a fast and efficient package manager
npm install -g pnpm
# Install project dependencies
pnpm install
# Start the application
node .
The application will be available at http://localhost:3000.
Use Docker to run 0gram in an isolated container.
# 1. Build the Docker image from the Dockerfile
docker build -t 0gram .
# 2. Run the image in a new container
docker run -it -p 3000:3000 0gram
The application will be available at http://localhost:3000.
Pull requests are welcome! Feel free to open an issue or submit a PR.
This project is licensed under the AGPLv3 License β see the LICENSE file for details.