PixivFE is a privacy-respecting alternative front-end for Pixiv that can be installed using various methods. This guide covers installation using Docker (recommended for production) and using a binary with a Caddy reverse proxy.
PixivFE requires a Pixiv account token to access the API. Refer to the How to get the cookie (PIXIVFE_TOKEN) guide for detailed instructions.
Docker lets you run containerized applications. Containers are loosely isolated environments that are lightweight and contain everything needed to run the application, so there's no need to rely on what's installed on the host.
There are no pre-built Docker images for PixivFE, so you'll need to build your own. PixivFE supports amd64
and arm64
platforms.
Deploying PixivFE using Docker Compose requires the Compose plugin to be installed. Follow these instructions on the Docker Docs on how to install it.
Go to the root directory of this repo with cd
.
Copy the PHPSESSID
cookie value into docker/pixivfe_token.txt
. This file will be used as a Docker secret .
Copy .env.example
to .env
and configure the variables as needed. Refer to Environment Variables.go
for more information.
Run docker compose up -d
to start PixivFE. It will be accessible at localhost:8282
.
To view the container logs, run docker logs -f pixivfe
.
Deploying PixivFE using Docker CLI may be easier than Docker Compose, but requires a slightly different setup.
Furthermore, the buildx
Docker plugin needs to be installed. Follow these instructions on the Docker buildx
repo on how to install it.
Go to the root directory of this repo with cd
.
For amd64
platforms:
docker buildx build --platform linux/amd64 -t vnpower/pixivfe:latest --load .
For arm64
platforms:
docker buildx build --platform linux/arm64 -t vnpower/pixivfe:latest-arm64 --load .
Copy .env.example
to .env
and configure the variables as needed. Refer to Environment Variables.go
for more information.
Run the following command to deploy PixivFE:
Note:
If using an
arm64
platform, use thevnpower/pixivfe:latest-arm64
image.
docker run -d --name pixivfe -p 8282:8282 --env-file .env vnpower/pixivfe:latest
To use a different host port (e.g., 8080):
docker run -d --name pixivfe -p 8080:8282 --env-file .env vnpower/pixivfe:latest
When using a reverse proxy, prefix the host port with 127.0.0.1
to make PixivFE listen only on the local host port (e.g., 127.0.0.1:8080:8282
).
Go to the root directory of this repo with cd
.
Copy .env.example
to .env
and configure the variables as needed. Refer to Environment Variables.go
for more information.
Run env $(cat .env | xargs) go run main.go
to start PixivFE. It will be accessible at localhost:8282
.
Caddy is a great alternative to NGINX, because it is written in Go but also easy to config.
Install Caddy using your package manager.
In the PixivFE directory, create a Caddyfile
with the following content:
example.com {
reverse_proxy localhost:8282
}
Replace example.com
with your domain and 8282
with the PixivFE port if you changed it.
Run caddy run
to start Caddy.