Hosting PixivFE¶
This guide covers hosting PixivFE using Docker (recommended) or a pre-compiled binary.
Note
PixivFE requires a pixiv session cookie to authenticate with the API. See Authentication for the pixiv API for instructions.
Docker¶
Docker images are available from our Container Registry on GitLab for linux/amd64 and linux/arm64. The latest tag points to the most recent stable release, while next points to the latest development build.
To start, clone the repository and enter the deploy directory:
| Bash | |
|---|---|
Next, copy .env.example to .env and configure it. For more details, see Configuration options.
Set PIXIVFE_HOST for Docker
You must set PIXIVFE_HOST=0.0.0.0 in your .env file. This allows the application inside the container to be accessible to Docker's networking layer.
With the configuration ready, start the container. The host will listen on 127.0.0.1:8282 by default.
Warning
The Docker Compose command requires the Compose plugin.
You can view container logs with docker logs -f pixivfe.
Binary¶
You can run PixivFE directly using a pre-compiled binary. We recommend using Caddy as a reverse proxy, and downloading a pre-compiled version for your platform from our Package Registry on GitLab. Make sure the downloaded file is executable.
Alternatively, you can build it from source:
Next, you need to configure the application. Copy deploy/.env.example from the repository to a new .env file in the same directory as your binary. Edit the .env file as needed, referring to Configuration options.
Once configured, run the application.
| Bash | |
|---|---|
localhost:8282 by default.
For a production setup with HTTPS, install Caddy and create a Caddyfile to reverse proxy requests to PixivFE.
example.com with your domain and run caddy run.
Updating¶
Follow the instructions for your deployment method to update to the latest version.
Docker¶
If you are using Docker, first pull the latest image and any repository changes.
For Docker Compose, pull the image and restart the service:
For the Docker CLI, pull the image, then stop, remove, and recreate the container:
| Bash | |
|---|---|
Per recommendation from Go, you may set a memory limit for the container as follows:
| Bash | |
|---|---|
Binary¶
To update a binary installation, get the latest binary by downloading it from the Package Registry or by rebuilding from source.
Then, restart the PixivFE process.