Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host Pixelfed on a VPS (Complete Guide)

Learn how to easily self-host Pixelfed on a VPS with our detailed, step-by-step installation guide tailored for developers and homelab enthusiasts.

How to Self-Host Pixelfed on a VPS (Complete Guide)

Pixelfed is a decentralized image sharing platform that offers a unique alternative to traditional social media networks. If youโ€™re a developer or a homelabber looking to self-host Pixelfed, this guide will walk you through the entire process of setting it up on a VPS. By self-hosting Pixelfed, you gain control over your data, customization options, and can create a community that aligns with your values.

Prerequisites

Before diving into the installation process, ensure you have the following:

  1. A VPS Provider: You can choose from various providers with competitive pricing. Here is a quick comparison:
ProviderPrice (per month)Location Options
Contabo VPS5.99 EUREurope
Hetzner Cloud4.15 EUREurope
DigitalOcean6 USDGlobal
Vultr6 USDGlobal
Linode (Akamai)5 USDGlobal

Choose and get started with a VPS from your preferred provider, and refer to our full VPS comparison for more details.

  1. Linux Knowledge: Basic command-line knowledge is essential for navigating your server.

  2. Docker: This guide assumes youโ€™ll be using Docker to install Pixelfed.

  3. Domain Name: A domain name is necessary for accessing your Pixelfed instance.

Step 1: Setting Up Your VPS

  1. Create and Access Your VPS:

    • Sign up with your chosen VPS provider, select your required plan, and create your instance.
    • Connect to your VPS via SSH:
      ssh root@your_vps_ip
  2. Update the System:

    • Run the following command to update package lists:
      sudo apt update && sudo apt upgrade -y
  3. Install Docker:

    • Run the following commands to install Docker:
      sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
      sudo apt update
      sudo apt install docker-ce -y
    • After installation, ensure Docker is running:
      sudo systemctl start docker
      sudo systemctl enable docker

Step 2: Install Pixelfed Using Docker

  1. Clone Pixelfed Repository:

    • Navigate to a directory of your choice and clone the Pixelfed repository:
      git clone https://github.com/pixelfed/pixelfed.git
      cd pixelfed
  2. Set Up the Environment:

    • Copy the example environment configuration and edit it:
      cp .env.example .env
      nano .env
    • Configure your settings such as APP_URL, DB_HOST, and other necessary parameters.
  3. Build and Run the Docker Containers:

    • Use Docker Compose to build and run the containers:
      docker-compose up -d
  4. Database Setup:

    • Pixelfed requires a database. Make sure you have the necessary migration and seed data in place by running:
      docker-compose exec app php artisan migrate --seed

Step 3: Configuring Pixelfed

  1. Accessing Pixelfed:

    • Open your web browser and navigate to http://your_domain or http://your_vps_ip.
    • Follow the setup wizard to finish the installation.
  2. Customizing Your Instance:

    • Once installed, you may want to customize your Pixelfed instance. Explore the admin dashboard for settings like user management, theme settings, and more.

FAQs

How much does it cost to self-host Pixelfed on a VPS?

The cost of self-hosting Pixelfed largely depends on the VPS provider you choose. Providers like Hetzner Cloud start at only 4.15 EUR/mo, while DigitalOcean and Vultr have plans starting at about 6 USD/mo. Given that Pixelfed is resource-efficient, even the most basic plans are usually sufficient for small to medium instances. Always consider your expected user base and storage at the time of selection.

Can I run Pixelfed on shared hosting?

While theoretically possible, running Pixelfed on shared hosting is not recommended. Shared hosting typically imposes restrictions on resource usage and does not support Docker, which is essential for easy installation and scaling of applications like Pixelfed. A VPS offers dedicated resources and more control, which is especially important for managing data privacy and application performance.

Is Pixelfed secure when self-hosted?

Security is a critical consideration when self-hosting any application. Pixelfed can be relatively secure if you properly configure your server. It is recommended to use HTTPS for your Pixelfed instance, which can be easily set up using tools like Letโ€™s Encrypt. Regularly update your software, limit access with firewalls, and follow best practices for securing your VPS to enhance your security posture.

By now, you should have a fully operational Pixelfed instance on your VPS! Enjoy the benefits of self-hosting, and remember to actively participate in discussions on platforms like r/selfhosted or browse resources like awesome-selfhosted for more inspiration and tools.