The Webcoast
Back to Pixelfed

Setting up Pixelfed

Pixelfed is a full Laravel application, so this setup has more moving parts than most of the rest of this Library: expect to spend a bit more time on it than something like Immich.

  1. 1

    Clone the repo and copy the Docker env file

    Pixelfed ships a Docker-oriented .env template separate from its regular one. Copy it as a starting point rather than writing the configuration from scratch.

    git clone https://github.com/pixelfed/pixelfed.git
    cd pixelfed
    cp .env.docker.example .env
  2. 2

    Set the app URL and database credentials

    In .env, set APP_URL to wherever this instance will actually be reached, along with DB_DATABASE, DB_USERNAME, and DB_PASSWORD for the database container defined in the compose file.

  3. 3

    Build and start the containers

    This builds the app image locally rather than pulling a prebuilt one, so the first run takes a while.

    docker compose up -d --build
  4. 4

    Generate the app key and run migrations

    Run these inside the app container to finish the setup: generate the encryption key Laravel needs, then create the database tables.

    docker compose exec app php artisan key:generate
    docker compose exec app php artisan migrate --force
  5. 5

    Create the first account

    Either register normally through the web UI, or promote an existing account to admin from the command line.

    docker compose exec app php artisan user:admin <username>

Further reading

  • Pixelfed on GitHub

    Source and the Docker-specific setup notes; the most current reference since Docker isn't Pixelfed's most polished install path.