this post was submitted on 10 Sep 2025
23 points (87.1% liked)

Selfhosted

51294 readers
1210 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

So I initially had been using gitea. It took me a while to get ssh to work properly but then it did. Then I learned of forgejo and decided to go full foss. Only problem is that i cant get ssh to work for the life of me. Here’s my setup

  • Forgejo is in a docker compose file in which I’ve setup a docker network
  • My ssh port for my server is not 22
  • I followed the gitea sshing shim directions I used previously to a T and couldn’t get any sort of anything to work

My best guess is there’s some base configuration difference between the two that I don’t know of that maybe somebody here can point out for me. Any help would be appreciated, thanks.

you are viewing a single comment's thread
view the rest of the comments
[–] bruce965@lemmy.ml 2 points 13 hours ago* (last edited 12 hours ago)

Here's my config for reference, which works for me:

name: forgejo
services:
  forgejo:
    image: codeberg.org/forgejo/forgejo:12
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    volumes:
      - ./data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      #- 80:3000
      - 2222:22
    networks:
      - nginx
networks:
  nginx:
    name: nginx
    external: true

If you can share your error message we might be able to better pinpoint the issue.

EDIT: I searched a bit and now I understand better what you are trying to do. I didn't know about this "SSH shim" idea. This is not what I have done on my setup, sorry.