This repository contains a compose file for running an instance of Piped, based on the official version. Changes from upstream:
- Removed reverse proxy configs,
- Moved configuration to
env_files, removed the configure script, - Added personal patches - permissions fix for running in Podman on Openwrt and ability to host subservices on the same domain with different base URLs.
This configuration requires the use of custom Piped builds from this repo. For a configuration compatible with official images, check out the no-patches branch.
All the services need to communicate with some of the other ones, and for that they need their addresses / URLs. This is the one thing that needs setting in every deployment.
In addition to that, the backend has a few optional settings, but the defaults should work fine.
The configuration for the backend is stored in config.properties. Make sure to set the URLs of the various services:
PROXY_PART,API_URL,FRONTEND_URL.
The frontend is only configured using environment variables. The compose sets up the container to read them from frontend.env (default config) and frontend.env.local - instance-specific config, for you to create and override the default values with.
Once again, the only required change is the URLs, but in this case of all services:
BASE_URLshould point to itself (thefrontendservice),- For example, for a reverse proxy server on running on
https://kavin.rockswith a route/piped/proxying the request to thefrontendcontainer, setBASE_URL=https://kavin.rocks/piped - For a reverse proxy sending all requests for domain
piped.kavin.rocksto the container setBASE_URL=https://piped.kavin.rocks
- For example, for a reverse proxy server on running on
BACKEND_URLshould point to thepiped(backend) service, as above, full URLs are required and the service may be accessible on a subpath (e.g./piped-backend) rather than on the root (/),PROXY_URLshould point to theproxyservice,- (optional)
INSTANCES_URLshould point to a service providing the list of public instances (not included in the compose, default should work fine).
Just like the frontend service, this one is configurable with environment files, postgres.env and postgres.env.local. This allows to change the DB name, username and password. This step is not required as there is a default username and password set and using them is arguably not insecure as the DB server should not be reachable from outside the containers' internal network.
If you do change them, don't forget to also reflect the change in config.properties (DB name at the end of hibernate.connection.url, username & password in hibernate.connection.username & hibernate.connection.password), otherwise the backend will attempt to use wrong credentials when communicating with the DB.