Home

Awesome

Photon

Jump to:

A better, more intuitive way to use Lemmy, with a cleaner UI, more features, and snappier usage.

It is designed for all features to have an appealing and intuitive design, while being fast.

Screenshots

desktop-default-dark desktop-default-light

Self-hosting

Put Photon on your own domain for easier onboarding.

Running from image

# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
docker run -p 8080:3000 -e PUBLIC_INSTANCE_URL=example.com ghcr.io/xyphyn/photon:latest

Running from repo

More unstable but latest features

Clone the repo:

git clone https://github.com/Xyphyn/photon && cd photon

and run the docker container:

docker build -t photon .

# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
docker run -p 8080:3000 -it photon:latest

There you go, you now have an instance of Photon running.

Configuring default settings

The most common settings you'll use are PUBLIC_INSTANCE_URL. Some selfhosters with PUBLIC_SSR_ENABLED set to true might want the instance url to be different for the server. You can use the PUBLIC_INTERNAL_INSTANCE variable for that.

PUBLIC_MIGRATE_COOKIE is useful if you want to switch Photon to your default frontend. It'll convert the logged in cookie from lemmy-ui to a Photon account. It will only work if you have PUBLIC_INSTANCE_URL set, and it will login with that instance.

PUBLIC_SSR_ENABLED will have the initial load be rendered by the server, before the client router is loaded. This can lead to a faster feeling load initally, and will allow your instance to be better indexed by search bots, and allow users with JavaScript disabled to view Photon with a basic view.

These are the most important environment variables that you can change:

VariableValuesDefault Value
PUBLIC_INSTANCE_URLURLlemmy.ml
PUBLIC_INTERNAL_INSTANCEURLValue of PUBLIC_INSTANCE_URL
PUBLIC_LOCK_TO_INSTANCEbooltrue if PUBLIC_INSTANCE_URL is set
PUBLIC_FAVICONURL`/img/logo-background.svg
PUBLIC_SSR_ENABLEDboolfalse
PUBLIC_MIGRATE_COOKIEboolfalse
PUBLIC_THEMEJSONPhoton's default colors
PUBLIC_COLORSCHEMEsystem|dark|lightsystem
PUBLIC_EXPANDABLE_IMAGESbooltrue
PUBLIC_MARK_READ_POSTSbooltrue
PUBLIC_DEFAULT_FEED_SORTSortTypeActive
PUBLIC_DEFAULT_FEEDListingTypeLocal
PUBLIC_DEFAULT_COMMENT_SORTCommentSortTypeHot
PUBLIC_HIDE_DELETEDbooltrue
PUBLIC_HIDE_REMOVEDbooltrue
PUBLIC_NSFW_BLURbooltrue
PUBLIC_RANDOM_PLACEHOLDERSbooltrue
PUBLIC_REMOVE_CREDITboolfalse

There are more options available that you can see at src/lib/settings.ts, by looking at the defaultSettings object.

The values for SortType, ListingType, and CommentSortType are defined by the lemmy-js-client library.

Listing Type

https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/ListingType.ts

Sort Type

(case sensitive)

https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/SortType.ts

Comment Sort Type

https://github.com/LemmyNet/lemmy-js-client/blob/main/src/types/CommentSortType.ts values:

Public Instances

Want your instance added here? Make a GitHub issue or make a PR! (this is for general purpose Photon instances.)

phtn.app is the official instance and will get updates instantly.

InstanceLocationContact
phtn.app (Official)🇺🇸 US Westphoton@xylight.dev
ph.opnxng.com🇸🇬 Singaporeabout.opnxng.com
photon.thesanewriter.com🇺🇸 US Eastthesanewriter@lemmy.thesanewriter.com
p.darrennathanael.com🇮🇩 ID Westnoc@darrennathanael.com
p.lemmy.ohaa.xyz🇦🇹 Austria(???)
photon.zhenyapav.com (Has not updated since v1.9.2)🇮🇸 Icelandzhenyapav@zhenyapav.com
ph.buckodr.ink (Has not updated since v1.21.1)🇺🇸 US Eastadmin@buckodr.ink
phtn.ngn.tf🇹🇷 Turkeyservices@ngn.tf
lm.sudovanilla.org🇺🇸 US Easthello@sudovanilla.org

Donate

You can donate at Buy me a Coffee

<a href="https://www.buymeacoffee.com/xylight"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=xylight&button_colour=FFDD00&font_colour=000000&font_family=Poppins&outline_colour=000000&coffee_colour=ffffff" /></a>