Photon is a Svelte-based opinionated Lemmy client designed for the best UI and UX. Every feature is carefully considered and placed.
🌟
A stunning UI🪄
Lots of customization options📱
Built for desktop & mobile🌎
Multi-language support👥
Save multiple accounts🚀
Made with Svelte 5Jump to:
You selfhost a Photon frontend server for your Lemmy instance, or independently for any instance.
The images are at ghcr.io/xyphyn/photon
. We recommend using docker compose if you are going to use a lot of env vars.
[!NOTE] If you encounter strange issues running the default images (using a Bun server), you can use the alternative Node server by appending
-node
to the image version. For example:ghcr.io/xyphyn/photon:v2.0.0-node
To run an unconfigured Photon instance on port 8080
:
docker run -p 8080:3000 ghcr.io/xyphyn/photon:latest
Clone the repo:
git clone https://github.com/xyphyn/photon && cd photon
Then to build and run:
bun install
ADAPTER=bun bun run build
# run the built server
bun build/index.js
npm install
ADAPTER=node npm run build
node build/index.js
Photon lets you configure the default client settings and more.
[!NOTE] Configuration environment variables are prefixed with PUBLIC to allow clients to use them. No sensitive data can be leaked.
If you're hosting Photon for a Lemmy instance, you' ll almost definitely want to set these:
PUBLIC_INSTANCE_URL
string
: The domain which the browser will send API requests to.
PUBLIC_INSTANCE_URL=fedi.phtn.app
PUBLIC_SSR_ENABLED
boolean
: When enabled, will make page requests be rendered server side first, which allows search engine indexing, and basic non-js usage.
PUBLIC_INTERNAL_INSTANCE
string
: Only relevant if PUBLIC_SSR_ENABLED=true
. This is the domain that the server will make API requests to.
PUBLIC_MIGRATE_COOKIE
boolean
: Useful if moving from lemmy-ui. This will automatically migrate the logins for the users, making them not have to login again.
PUBLIC_THEME
JSON
: If you'd like, you can export a theme from Photon and paste it here, which will become the default theme for users.
Photon has extensive user configuration options, and you can set the defaults for them with the environment variables found at src/lib/settings.ts
, by looking at the defaultSettings
object.
[!TIP] It's recommended to setup some script to pull the latest docker image version or update some other way. Photon is constantly updated with fixes and improvements, and using heavily outdated versions can tarnish the reputation! So please keep it mostly up to date :)
[!TIP] If you'd like to let users pick any instance they want, set the environment variable
PUBLIC_LOCK_TO_INSTANCE=false
.
[!TIP] Photon supports nearly everything lemmy-ui does, so you can use it as a drop in replacement as the primary frontend. However, the instance must have already been setup.
Want your instance added here? Make a GitHub issue or make a PR. (this is for general purpose Photon instances.) If your instance stays out of date for a while, it will be removed.
phtn.app is the official instance and will get updates instantly.
Instance | Location | Contact |
---|---|---|
phtn.app (Official) | 🇺🇸 US West | [email protected] |
ph.opnxng.com | 🇸🇬 Singapore | about.opnxng.com |
p.darrennathanael.com | 🇮🇩 ID West | [email protected] |
p.lemmy.ohaa.xyz | 🇦🇹 Austria | (???) |
phtn.ngn.tf | 🇹🇷 Turkey | [email protected] |
I've put my best effort into developing and maintaining this open source app. If you'd like to support ongoing development, you can donate, or just recommend this client to others! Buy me a Coffee