Git Product home page Git Product logo

photon's Introduction

Photon

Jump to:

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

Screenshots

image

image

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:

Variable Values Default Value
PUBLIC_INSTANCE_URL URL lemmy.ml
PUBLIC_INTERNAL_INSTANCE URL Value of PUBLIC_INSTANCE_URL
PUBLIC_LOCK_TO_INSTANCE bool true if PUBLIC_INSTANCE_URL is set
PUBLIC_FAVICON URL `/img/logo-background.svg
PUBLIC_SSR_ENABLED bool false
PUBLIC_MIGRATE_COOKIE bool false
PUBLIC_THEME system|dark|light system
PUBLIC_EXPANDABLE_IMAGES bool true
PUBLIC_MARK_READ_POSTS bool true
PUBLIC_DEFAULT_FEED_SORT SortType Active
PUBLIC_DEFAULT_FEED ListingType Local
PUBLIC_DEFAULT_COMMENT_SORT CommentSortType Hot
PUBLIC_HIDE_DELETED bool true
PUBLIC_HIDE_REMOVED bool true
PUBLIC_NSFW_BLUR bool true
PUBLIC_RANDOM_PLACEHOLDERS bool true
PUBLIC_REMOVE_CREDIT bool false

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

  • All
  • Local
  • Subscribed
  • Moderator

Sort Type

(case sensitive)

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

  • Active
  • Hot
  • New
  • Old
  • TopDay
  • TopWeek
  • TopMonth
  • TopAll
  • MostComments
  • NewComments
  • TopHour
  • TopSixHour
  • TopTwelveHour
  • TopThreeMonths
  • TopSixMonths
  • TopNineMonths
  • TopYear

Comment Sort Type

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

  • Hot
  • Top
  • New
  • Old
  • Controversial

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.

Instance Location Contact
phtn.app (Official) ๐Ÿ‡บ๐Ÿ‡ธ US West [email protected]
ph.opnxng.com ๐Ÿ‡ธ๐Ÿ‡ฌ Singapore about.opnxng.com
photon.thesanewriter.com ๐Ÿ‡บ๐Ÿ‡ธ US East [email protected]
p.darrennathanael.com ๐Ÿ‡บ๐Ÿ‡ธ US East [email protected]
p.lemmy.ohaa.xyz ๐Ÿ‡ฆ๐Ÿ‡น Austria (???)
photon.zhenyapav.com (Has not updated since v1.9.2) ๐Ÿ‡ฎ๐Ÿ‡ธ Iceland [email protected]
ph.buckodr.ink (Has not updated since v1.21.1) ๐Ÿ‡บ๐Ÿ‡ธ US East [email protected]
phtn.ngn.tf ๐Ÿ‡น๐Ÿ‡ท Turkey [email protected]

Donate

You can donate at Buy me a Coffee

photon's People

Contributors

xyphyn avatar pbui avatar neshura87 avatar pieterdd avatar 0xcmdrkeen avatar sant0s12 avatar tfaughnan avatar zhenyapav avatar paradox460 avatar corvettecole avatar danielwolbach avatar darrenofficial avatar zamuz avatar heposheikki avatar thesanewriter avatar xusontha avatar ngn13 avatar tmpod avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.