Gotosocial, a fediverse server written in Golang

Hi everyone,

I’ve worked on a package for Gotosocial, an ActivityPub social network server, written in Golang, for ynh

For now the package is entirely tested fonctionnal (I hope :grimacing:)

Any feedback on the package is welcome! :slight_smile:

I asked for its integration to the official repo


Wesh

J’ai packagé Gotosocial,un serveur de réseau social basé sur ActivityPub écrit en Golang, pour ynh

Normalement il est entièrement testé et fonctionnel (mais bon :grimacing:)

Si vous avez des commentaires sur le paquet, n’hésitez pas ! :slight_smile:

J’ai demandé son intégration au repo officiel ^w^

9 Likes

Hi @OniriCorpe

I’ve installed latest “stable” GoToSocial package in my raspi@home :smiley: THANKS!

I’ve read this issue Configuration panel · Issue #4 · YunoHost-Apps/gotosocial_ynh · GitHub about adding config panel to this package so admin can manage the instance from its own web interface rather than log in through GoToSocial Admin Panel

My question is where’s this config web interface? Is it still in the development branch so we have to wait untill gets to the stable? Thank you

I’ve tried at mygotosocial.domain.tld/admin but returns 404

Basic federation and discovery works fine so far, just tested with my mastodon account, but I will try to create some other users and test various activitypub features as media attachment, polls, etc.

THANK YOU FOR THIS PACKAGE

Edit: 2nd question

I guess config file is at /var/www/gotosocial/config.yaml

Is this the I should edit to apply changes to my instance?

(thread moved in Contribute Room > Apps packaging)

@OniriCorpe, feel free to create a proper app annoucement (in the forum category) if/when you feel the package is ready. :slight_smile:

2 Likes

Great !
Apparently the server supports OIDC integration (but not LDAP).

So if you want your app to be able to map it’s users with Yunohost users you can use the dex app that I has been precisely built for that usecase :

You can check the Outline app I’m currently building for how to use dex as a “sub-app” automatically installed and configured

3 Likes

don’t we have gotosocial CLI?

root@ynh:~# gotosocial --help
-bash: gotosocial: command not found

I wanted to create a second user, as only admin account is created on setup.

I’ve enabled allow registration but no sign up button or form shown in gotosocial web portal.

Also I wanted to report this from logs:

2022/05/12 08:32:18 http: response.Write on hijacked connection from github.com/gin-gonic/gin.(*responseWriter).Write (response_writer.go:78)
2022/05/12 08:32:38 http: response.Write on hijacked connection from github.com/gin-gonic/gin.(*responseWriter).Write (response_writer.go:78)
....

repeated several times

Hi!

My question is where’s this config web interface?

The ynh config panel does not replace the GTS admin panel
There is a public instance here: SuperSeriousBusiness GoToSocial - GoToSocial

The ynh config panel can be found in the administration interface of ynh:
Applications > gotosocial > Configure this app (Config Panel)

I guess config file is at /var/www/gotosocial/config.yaml

Yes, but I advise you not to touch it manually
Instead, use the config panel which is literally made for and changes the values in memory also on the ynh side!

don’t we have gotosocial CLI?

The CLI uses the binary directly
you must be in the GTS folder
cd /var/www/gotosocial
then run the following commands:

./gotosocial admin account create --username some_username  --email someuser@example.org --password 'somelongandcomplicatedpassword'

./gotosocial admin account confirm --username some_username

./gotosocial admin account promote --username some_username

Also I wanted to report this from logs:

I had these errors some time ago but since an update of GTS I could not get them on any of my 3 instances
Which version are you using?

Also, I’ve added documentation to the readmes on the github, do not hesitate to read it:

1 Like

thank you!

I had missunderstood “admin panel” concept :pray: And yes, one should not edit config file by hand :smile:

Which version are you using?

GoToSocial: 0.3.1 9cf66bf 2022-04-26T16:10:11Z [go1.18]

no CLI though :pensive: I’m likely doing something wrong

root@ynh:/var/www/gotosocial# ls -la
total 47196
drwxr-x---   4 gotosocial www-data       4096 May 12 08:22 .
drwxr-xr-x+ 14 root       root           4096 May  9 07:46 ..
-r--------   1 gotosocial gotosocial    17146 May 12 08:22 config.yaml
drwxr-x---   2 gotosocial www-data       4096 May  9 07:34 example
-rwxr-x---   1 gotosocial www-data   48234496 Apr 26 18:10 gotosocial
-rw-r-----   1 gotosocial www-data      34520 Apr 26 18:15 LICENSE
-rw-r-----   1 gotosocial www-data      19041 Apr 26 18:15 README.md
drwxr-x---   5 gotosocial www-data       4096 May  9 07:34 web
root@ynh:/var/www/gotosocial# gotosocial
-bash: gotosocial: command not found

actually issued some real commands as in the documentation

1 Like

Cool. Project. I think it would be awesome to host a mini-activity pub server. I need to seriously look into this and help bug test it.

1 Like

Side note, you are not the first, and I think we should make more clear in the documentation and the webadmin interface what these panels do and do not do.

3 Likes

i just installed this app. seems to sort of work but not sure what else to do. i’ll have to dig into the official upstream documentation and see how that works and hope it works the same for the _ynh package :smiley:

I’m trying to access the admin panel at GoToSocial Admin Panel but it says: no client_id found in session

solved!
I needed to turn off ad blocking in Brave browser.

1 Like

I think you need to issue commands with ./ in front of gotosocial

eg.

./gotosocial admin account confirm --username some_username
2 Likes

i just installed this app. seems to sort of work but not sure what else to do. i’ll have to dig into the official upstream documentation and see how that works and hope it works the same for the _ynh package :smiley:

I tried to explain as best I could in the readme, could you tell me what information you were missing so I could try to explain it?

2 Likes

Also I wanted to report this from logs:

Okay I asked in the GTS discussion group :

it just means a write has been attempted on a websocket connection after the connection was closed already
Hijacked makes it sound really sinister :')

So nothing serious :slight_smile:

1 Like

I think maybe installation instructions and a quick start guide of the first things a user should do would be helpful.

===================
Quickstart

  • Create a domain for Gotosocial. Needs to be installed on its own domain!

  • Install the app from the Yunohost Admin panel or by running:
    yunohost app install gotosocial

  • Go to the domain you installed Gotosocial on in the webbrowser. You should see an information page about your server like this:

  • To test your server is working, try making some toots!(posts). Login with your user/pass at pinafore.social or with the Android client Tusky

  • To change options for your server go to:
    GoToSocial Admin Panel and login. If you wish to host your own admin panel, please read this page.

  • How to add a second user?
    To run the ‘gotosocial’ commands, you must be in the gotosocial folder:
    cd /var/www/gotosocial
    Then you can run the following commands:

./gotosocial admin account create --username some_username  --email someuser@example.org --password 'somelongandcomplicatedpassword'

./gotosocial admin account confirm --username some_username

There are other commands you can run. Read the documentation.

===================

Some general questions I have after running Gotosocial for less than 24 hours :stuck_out_tongue:

  • Do I need to choose what instances I federate with? I can see my posts on my GTS on Mastodon.social federated timeline, but my Federated timeline is empty. I have already followed a few people.
  • If I change options in the ./config.yaml file, do I need to stop and start GTS? If so, how do I do that? Like this maybe:
./gotosocial --config-path ./config.yaml server stop
./gotosocial --config-path ./config.yaml server start
  • Is there a way to delete statuses/posts/toots/media older than a certain period? I would like to have posts be delete after 1 year.
  • When clicking on the profile of someone I follow, I can’t see any of their toots? Will I only see the toots of them after I had added them?

Thank you for packaging this! It seems very speedy, and light.

3 Likes

That’s confusing. The admin panel is hosted elsewhere :roll_eyes:. I think it should be added to the installation script so the server and its admin panel are both selfhosted. May be pinafore also.
That reminds me of the couple synapse / element.

Your quick start and faq are great for understanding how it works :ok_hand:

1 Like

Yes if the admin panel is not too hard to host, it would be cool to have the option to self-host it.

Maybe an option during install.

git clone https://github.com/superseriousbusiness/gotosocial-admin.git && cd gotosocial-admin
yarn install
node index.js

This will compile a static bundle in public/, which can be copied to any webhost, or put into your GoToSocial installation in the web/admin directory.

Yes, I saw that but I don’t know what yarn is, and don’t want to worry about keeping another thing up to date for now. I’ll use the other panel for now until it’s bundled. Still learning the ropes here on Gotosocial :smiley:

I had to manually pass --db-user gotosocial and --db-password dbpassword flags in the account creation process to actually access postgre database

db-password value is set on install and can be read at /var/www/gotosocial/config.yaml

Now I have two users!

1 Like

OMG please don’t manipulate the database directly :fearful:
you can break things in the functioning of gotosocial by doing so
I’m too lazy to read the code, but it is probable that the creation of a user touches many places in the database for it to work properly

I advise you to restore a backup

to use the command line, place yourself in the /var/www/gotosocial directory
then start your commands with ./gotosocial
(I’d forgotten the initial ./ on my previous exemple commands, sorry about that :sweat_smile:)

1 Like