close
Skip to content

Latest commit

 

History

811 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Share2Fedi

Instance-agnostic share page for the Fediverse.

Share₂Fedi (pronounced ‘share-to-fedi’) lets you share stuff on Mastodon, Misskey, Friendica, and other federated social networks, instance-agnostic. Just type in the post text and the instance URL, and click ‘Post’!

Or, add text query parameter to the UR, and it will be automatically inserted into the text field. The same goes for the instance and lang URL parameters. This can be used to build custom share buttons for the federated social networks:

<a href="https://s2f.kytta.dev/?text=Hello%20world!&instance=mastodon.xyz">
  Share on mastodon.xyz
</a>

The instance URL can be saved (this uses Local Storage) for later use.

Important

I know I provide a Share₂Fedi instance for others to use, but if you want to use Share₂Fedi for your share buttons, please consider self-hosting it. Although it's free now, running my instance may become too expensive for me in the future.

Self-hosting

Note

Share₂Fedi is currently undergoing some transitions in regards to deployment. The steps below are not yet stable. This will be fixed in v4.

Docker

Share₂Fedi has an official container image that you can use with any OCI runner. For example, using Podman:

podman run --detach --publish 127.0.0.1:9999:3000/tcp ghcr.io/kytta/share2fedi:v4.0.0-alpha.8

You can pull the image from:

  • Docker Hub: kytta/share2fedi
  • GHCR: ghcr.io/kytta/share2fedi
  • Quay: quay.io/kytta/share2fedi

The app runs on port 3000, which the container automatically exposes. In above code, port 9999 is used on host machine.

Same configuration as a Compose file:

services:
  share2fedi:
    image: ghcr.io/kytta/share2fedi:v4.0.0-alpha.8
    ports:
      - "127.0.0.1:9999:3000/tcp"

The app does not do any TLS termination, so you must run it behind a reverse proxy to get HTTPS. We won't go into detail here; you probably know what you're doing.

Apart from versioned tags, there is also the edge tag, which is built from the latest commit on the main branch. It is not recommended to use it, as it might contain bugs.

Bare metal

You can also host Share₂Fedi without Docker, but this requires some extra setup.

Prerequisites: Node.js v24, pnpm.

  1. Clone the repository on the target machine, or download it as a tarball.

  2. Install dependencies.

    pnpm install
  3. Build.

    pnpm build
  4. Run server.

    By default, this will only listen on localhost:3000. To enable listening on a certain host and/or port, set the HOST and PORT environment variables, respectively.

    node dist/server/entry.mjs

    In production, you might want to use a process manager, like PM2:

    # Start the app, restart on file changes (except node_modules)
    pm2 start dist/server/entry.mjs --name "Share2Fedi" --watch --ignore-watch="node_modules"

    More information about self-hosting an Astro website with Node: https://docs.astro.build/en/guides/integrations-guide/node/#standalone

Contribute

Source code

TL;DR: pnpm install && pnpm dev

See contributing guide for instructions on how to contribute source code to the project, including adding new Fediverse projects.

Translations

Share₂Fedi uses Hosted Weblate for translations. You can edit translations using its UI.. You also could do it manually by editing files in src/i18n/translations, but this is NOT recommended.

Translation status

Note

New languages do not become automatically available. For this, a separate change to our ad-hoc i18n engine has to be made. See contributing guide for instructions

We thank Weblate for providing Libre hosting!

See also

📯 Shareon (lightweight, stylish, and ethical share buttons) uses Share₂Fedi under the hood!

Licence

© 2020 Nikita Karamov
Licensed under the GNU Affero General Public License v3.0 only.


This project is hosted on GitHub: https://github.com/kytta/share2fedi.git

About

Cross-instance share page for the Fediverse

Topics

Resources

Contributing

Stars

53 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages