Self Hosted Web Publishing Server

Hi,

It would be nice if we could have a self-hosted publishing server. Currently, when exporting, it uses the Anytype server.
We could maybe have this in the config.yaml or another option in the client to define the web publishing server.

Even though publishing to the web makes information public, it is better to keep it on your side. This is not my use case, but if your network is private and you want to share a note with someone else, you are currently forced to make your data available to the whole web using the Anytype server.

Additionaly it adds the benefits of using your own domain wich is cosmetic in itself but nice to have.

@Filip @Razor is it planned that the publish to web functionality will be included in the self hosting option?

It would be awesome. Sounds really nice for companies who uses the tool too, they would be able to share a documentation page or contact information via a simple link in their own network and domain ; sounds a must-have for company tool ! :slight_smile:

Would be a good addition tbh

We don’t have any plans to do this at the moment.

An option to export HTML would help bridge the gap..? :thinking:

and HTML export would be a lot more flexible for displaying things like inline collections & queries..

Found a possible workaround for it.
You can run your AnyType client locally with `ANYTYPE_LOCAL_PUBLISH_DIR` environment variable as described in GitHub - anyproto/anytype-publish-renderer
This makes AnyType to publish your page locally into the specified folder. Look at the following source code:

After that, you can download GitHub - anyproto/anytype-publish-renderer and use it to render the locally exported page into an HTML page.

Additionally, you can run GitHub - anyproto/anytype-publish-server and use it for publishing, but tyou will need to change the publish URL in this configuration file and rebuild the client application.
Tested locally, works as expected:

For my own purpose, I see two possible publishing pipelines as:

  1. Export as MD file, store to a GitHub repo, run a GitHub action that renders and publishes the MD file.
  2. Publish into a local folder with ANYTYPE_LOCAL_PUBLISH_DIR, run anytype-publish-renderer that creates an HTML page, add it to a GitHub repo, run a publishing GitHub action.

Can you please help me with what i need to expose on the publish server through a reverse proxy? Does this also communicate with plain TCP/UDP? I dont know if the any.coop is all i need to change prior to rebuilding, and connect both 8380 and 8383 through internet. I am not sure if i am right, and there is no documentation that i could figure out for the publish-server.

You need to run mongo and redis server to make this service work. I added a Docker compose file and described how to run the web publish server locally here: GitHub - dobromyslov/anytype-publish-server

In simple words:

  1. Run docker compose
  2. Create your own AWS bucket
  3. Adjust the server config file
  4. Build and run the server

The changes: feat: configure self-hosted web publishing server · dobromyslov/anytype-publish-server@c1c9e8f · GitHub

Thank you so much! I managed to host it now. I would assume it is impossible to remove the 48 character unique id that appears on the path? It would be quite nice to have a vanity url for the selfhosted variant

You are welcome. I had not enough time to look into it closely because I use an MD-file rendering pipeline currently, however, a custom anytype-publishing-server looks promissing.

I would appreciate if you share your findings. Maybe, I will manage to find some spare time this weekend, but no guarantee.