Skip to main content

GoToSocial

GoToSocial is a lightweight, privacy-focused ActivityPub server written in Go.

Overview

PropertyValue
LanguageGo
DatabaseSQLite/PostgreSQL
LicenseAGPL-3.0
Repositorygithub.com/superseriousbusiness/gotosocial
Documentationdocs.gotosocial.org

Key Features

  • Single binary deployment
  • Low resource usage (~256MB RAM)
  • Privacy-focused (no public follower lists by default)
  • Clean codebase (good for learning)

ActivityPub Implementation

Actor Type

{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"type": "Person",
"id": "https://gts.example/users/alice",
"preferredUsername": "alice",
"name": "Alice",
"summary": "<p>Hello, I'm Alice!</p>",
"inbox": "https://gts.example/users/alice/inbox",
"outbox": "https://gts.example/users/alice/outbox",
"followers": "https://gts.example/users/alice/followers",
"following": "https://gts.example/users/alice/following",
"featured": "https://gts.example/users/alice/collections/featured",
"manuallyApprovesFollowers": false,
"discoverable": true,
"publicKey": {
"id": "https://gts.example/users/alice/main-key",
"owner": "https://gts.example/users/alice",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----..."
}
}

Note

{
"type": "Note",
"id": "https://gts.example/users/alice/statuses/01ABC",
"attributedTo": "https://gts.example/users/alice",
"content": "<p>Hello from GoToSocial!</p>",
"published": "2024-01-15T10:00:00Z",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"cc": ["https://gts.example/users/alice/followers"],
"sensitive": false,
"summary": null,
"inReplyTo": null,
"url": "https://gts.example/@alice/statuses/01ABC"
}

Supported Activities

ActivitySupportNotes
CreateNotes
UpdateNote edits
DeleteWith Tombstone
LikeFaves
AnnounceBoosts
FollowAccept/Reject
UndoAll reversible
BlockFederation block
FlagReports

Privacy Features

Hidden Collections

By default, follower/following counts are shown but not lists:

{
"type": "OrderedCollection",
"id": "https://gts.example/users/alice/followers",
"totalItems": 42
// No "first" or items - requires authentication
}

Local-Only Posts

Posts can be restricted from federation:

{
"type": "Note",
"to": [],
"cc": ["https://gts.example/users/alice/followers"]
}

API Endpoints

Discovery

GET /.well-known/webfinger?resource=acct:alice@gts.example
GET /.well-known/nodeinfo
GET /.well-known/host-meta

Actor & Collections

GET /users/{username}
GET /users/{username}/inbox
POST /users/{username}/inbox
GET /users/{username}/outbox
GET /users/{username}/followers
GET /users/{username}/following
GET /users/{username}/statuses/{id}

Shared Inbox

POST /inbox

Implementation Details

Request Signing

GoToSocial requires HTTP Signatures:

POST /inbox HTTP/1.1
Host: gts.example
Date: Sun, 15 Jan 2024 10:00:00 GMT
Digest: SHA-256=X48E9qOokqqrvdts...
Signature: keyId="https://sender.example/users/bob#main-key",...

Accept Header

Requires explicit ActivityPub Accept header:

GET /users/alice HTTP/1.1
Accept: application/activity+json

ULID Identifiers

Uses ULIDs instead of UUIDs:

01HQX5N2F0KQHG1XBWQH2K3Z4T

Interoperability

With Mastodon

  • Full compatibility
  • Respects privacy settings
  • Handles all standard activities

Known Differences

  • No quote posts
  • No reactions (only Like)
  • No polls (yet)
  • Stricter signature validation

Deployment

Single Binary

./gotosocial server start

Docker

docker run -d \
-p 443:8080 \
-v ./data:/gotosocial/storage \
superseriousbusiness/gotosocial:latest

Resource Usage

UsersRAMCPU
1~100MBMinimal
10-50~256MBLow
100+~512MBLow

See Also