📸 Setup Pixelfed — Self-Hosted Instagram Alternative
Federated photo sharing platform — deploy your own Instagram alternative with full ActivityPub federation and complete ownership of your photos.
📦 Resources & Setup Scripts
Grab the automated bash script from GitHub to follow along with the video.
Quick Install:
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/social/pixelfed/pixelfed-ubuntu.sh
chmod +x pixelfed-ubuntu.sh
sudo bash pixelfed-ubuntu.sh
Tutorial Steps
1 Download & Run Installer
The script installs Docker if needed, then pulls the Pixelfed, PostgreSQL, and Redis images and starts all containers. Pixelfed will be available on port 80 with a PostgreSQL database for persistent storage and Redis for queue processing.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/social/pixelfed/pixelfed-ubuntu.sh
chmod +x pixelfed-ubuntu.sh
sudo bash pixelfed-ubuntu.sh
2 Access Web UI & Create Admin
Open your browser and navigate to Pixelfed. Register the first account and then promote it to admin using the artisan command or through the admin panel. Configure your instance name, description, and contact email in the admin settings.
http://<your-server-ip>:80
3 Upload Your First Photos
Click the camera icon to create a new post. Upload one or more photos, add a caption, apply filters, add location tags if desired, and choose your audience (public, followers-only, or unlisted). Posts can include up to the configured maximum number of images per post. Your photos will appear in your profile grid and followers' feeds.
4 Enable Federation
In the admin panel, enable federation so your Pixelfed instance connects with the wider Fediverse. Once enabled, Mastodon users and other Fediverse users can follow your Pixelfed accounts directly using your full handle (@user@yourdomain.com). You can configure federation allowlists or blocklists to control which external instances can interact with yours.
Ports Used
| Port | Purpose |
|---|---|
| 80 | Pixelfed Web UI (HTTP) |
| 5432 | PostgreSQL (internal) |
| 6379 | Redis (internal) |
Overview
Pixelfed is a free and ethical image sharing platform federated with the Fediverse via ActivityPub. It provides an Instagram-like experience — photo albums, filters, explore page, stories, and follower feeds — self-hosted on your own server with no ads, no algorithmic timeline manipulation, and no data harvesting.
Why Use It
Pixelfed is the self-hosted alternative to Instagram. Your photos stay on your server, with no corporate data analysis. Federation means your followers on Mastodon and other Fediverse platforms can follow your Pixelfed account and see your photos in their timelines without joining your instance.
When You Need It
Who Should Use It
Real Use Cases
Main Features
How to Use After Installation
Security Best Practices
Ports and Firewall Notes
Pixelfed runs on port 80 inside the container. Serve it via HTTPS on port 443 using a reverse proxy. Media storage will grow quickly — consider using S3-compatible storage for large installations to keep server disk usage manageable.
Backup and Maintenance
Common Mistakes
Troubleshooting
Alternatives
Alternatives include Instagram (centralized, ads, algorithm), Mastodon (microblogging with image support), Chevereto (self-hosted, not federated), and Glass (photography community, paid). Choose Pixelfed for an Instagram-like experience that federates with the Fediverse.
When Not to Use It
Avoid Pixelfed if you need a professional portfolio with custom design — a static portfolio site gives more visual flexibility. Also avoid for very high-volume public instances without significant storage and bandwidth, as high-resolution photos accumulate quickly.
PrismaTechWork Professional Help
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
Frequently Asked Questions
Can Mastodon users follow a Pixelfed account?
Yes. Pixelfed implements ActivityPub, the same protocol as Mastodon. A Mastodon user can search for a Pixelfed account by its full handle (e.g., @username@yourdomain.com) and follow it. New Pixelfed photo posts appear in the Mastodon follower's timeline as image posts.
Is there a mobile app for Pixelfed?
Yes. The official Pixelfed app is available for iOS and Android. It supports uploading photos, viewing your feed, discovering content, and managing your account. Third-party Mastodon apps like Ivory and Tusky can also display Pixelfed content since it speaks ActivityPub.
How much storage do I need for Pixelfed?
Storage depends on how many users and photos your instance hosts. Each high-resolution photo can be 2 to 10 MB plus thumbnails. A small community of 50 active users could easily generate 100 GB of media. Configure S3-compatible storage for scalable, cost-effective media hosting.
Can I set my Pixelfed instance to private?
Yes. Set OPEN_REGISTRATION=false in your .env file to prevent public sign-ups. Use invitation codes for new users. You can also restrict federation to only allowed instances. This makes your instance a private photography community.
Does Pixelfed have photo filters?
Yes. Pixelfed includes built-in Instagram-style photo filters applied at upload time. Users can choose from various filters to adjust the look of their photos before posting. The unmodified original is also stored.
Can I import my Instagram photos to Pixelfed?
Not directly via an automated tool currently. You can download your Instagram data archive from Instagram settings, which includes all your photos. Then manually upload them to Pixelfed. Community-built migration tools may be available — check the Pixelfed GitHub issues for the latest status.
What is Laravel Horizon and why does Pixelfed need it?
Laravel Horizon is a queue worker manager for PHP Laravel applications. Pixelfed uses it to process background jobs: federating posts to other instances, sending email notifications, processing image thumbnails, and running scheduled cleanup tasks. Without Horizon running, these tasks accumulate and never execute.
Can I run Pixelfed alongside Mastodon on the same server?
Yes, but they need separate domains and ports. Use a reverse proxy to serve each on its own domain with HTTPS. Both require PostgreSQL or MySQL and Redis, which can be shared instances to reduce overhead. Ensure sufficient RAM — both are resource-intensive applications.