banner
 Aeris

Aerisの小宇宙

GotoSocial建立及使用說明

GTS 0.15.1 SnapShot version now supports account registration. Apart from the lack of message notifications and the ability to edit historical articles (which can be deleted and edited), I think it is sufficient for personal use. Moreover, its resource consumption is relatively small compared to Mastodon. I highly recommend it as a personal node (toy). My tutorial is slightly outdated, so I will update it a bit.

Create a directory and set permissions#

First, determine where you want to place your files. I placed mine in /opt/gotosocial and created a data folder.
If you want to store uploaded images and videos locally, make sure to set the directory permissions correctly.
Command example:

mkdir -p /opt/gotosocial/data && cd /opt/gotosocial && chown 1000:1000 ./data

Fetch the latest Docker-Compose.yml and make modifications#

wget https://raw.githubusercontent.com/superseriousbusiness/gotosocial/main/example/docker-compose/docker-compose.yaml

You can modify the environment variables according to the official documentation

If you want to add environment variables, please follow this format:

  1. Add GTS_ before the configuration flag.
  2. Use uppercase letters.
  3. Replace dashes (-) with underscores (_).

For example:
instance-expose-public-timeline: false

If you want to add it as an environment variable, modify it to:
GTS_INSTANCE_EXPOSE_PUBLIC_TIMELINE: false

version: "3.3"

services:
  gotosocial:
    image: superseriousbusiness/gotosocial:snapshot
    container_name: gotosocial
    user: 1000:1000
    networks:
      - gotosocial
    environment:
      GTS_HOST:    #Modify to your domain name
      GTS_DB_TYPE: sqlite
      GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db
      #If you need to use S3, modify the following content
      #GTS_STORAGE_BACKEND: ""
      #GTS_STORAGE_S3_BUCKET: ""
      #GTS_STORAGE_S3_ENDPOINT: ""
      #GTS_STORAGE_S3_ACCESS_KEY: ""
      #GTS_STORAGE_S3_SECRET_KEY: ""
      #GTS_STORAGE_S3_PROXY: "true"
      GTS_INSTANCE_LANGUAGES: "zh,en"
      #If you need SMTP, add the following content
      #GTS_SMTP_HOST: ""
      #GTS_SMTP_PORT: ""
      #GTS_SMTP_USERNAME: ""
      #GTS_SMTP_PASSWORD: ""
      #GTS_SMTP_FROM: ""
      GTS_LETSENCRYPT_ENABLED: "false"
      GTS_LETSENCRYPT_EMAIL_ADDRESS: ""
      GTS_ACCOUNTS_REGISTRATION_OPEN: "true"
      ## For reverse proxy setups:
      # GTS_TRUSTED_PROXIES: "172.x.x.x"
      ## Set the timezone of your server:
      TZ: Asia/Shanghai
    ports:
      - "8086:8080"
      ## For letsencrypt:
      #- "80:80"
      ## For reverse proxy setups:
      #- "127.0.0.1:8080:8080"
    volumes:
      - ./data:/gotosocial/storage
    restart: "always"

networks:
  gotosocial:
    ipam:
      driver: default

Start#

docker compose up -d

Create a user#

docker exec -it gotosocial /gotosocial/gotosocial admin account create --username admin --email [email protected] --password 'SOME_VERY_GOOD_PASSWD'

Modify the content after username, email, and password. After creating the user, you can log in with your email.

Set as administrator#

docker exec -it gotosocial /gotosocial/gotosocial admin account promote --username admin

Modify the content after username to your username.

Set up reverse proxy#

For details, please refer to this section of the official documentation. I use 1Panel, so I won't go into too much detail here.

Backend settings#

Enter https://your-domain/settings and log in to access the backend settings.
You can customize the relevant content.

Image

Content after the 0.15.1 update#

Since registration is now supported, you need to configure SMTP to send verification emails.

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。