Changing the server instance name

Hi,
I have just set up my new instance of Asciinema, but I’m noticing that the server calls itself “127.0.0.1”.
For example, this is an excerpt from the about page:

About 127.0.0.1

127.0.0.1 is a platform for hosting and sharing terminal session recordings, powered by asciinema server.

I want to change this, is there a way of doing this?

I am using version 20240627 on Docker Compose.

Check out this sections of the docs: Configuration - asciinema docs

Hi,
I have read through the docs and have tried to find how to input the name, but I haven’t found the place for it.
This is my config:

services:
  asciinema:
    image: ghcr.io/asciinema/asciinema-server:20240627
    ports:
      - '40443:4000'
    environment:
      - SECRET_KEY_BASE=[redacted]
      - URL_HOST=a.mydomain.tld
      - URL_PORT=443
      - URL_SCHEME=https
      - CONTACT_EMAIL_ADDRESS=[redacted]
      - SMTP_HOST=[redacted]
      - SMTP_USERNAME=[redacted]
      - SMTP_PASSWORD=[redacted]
    volumes:
      - asciinema_data:/var/opt/asciinema
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: docker.io/library/postgres:14
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U postgres']
      interval: 2s
      timeout: 5s
      retries: 10

volumes:
  asciinema_data:
  postgres_data:

Is there something I’ve missed here that causes the name to become 127.0.0.1?

URL_HOST is the one which controls the server name, and looks like you have it set correctly. I’m not sure why you’re getting 127.0.0.1 in there… :thinking:

What URLs does the Share button on a recording page show?

It doesn’t mention a server name, but the link it shows is the correct one. It doesn’t say 127.0.0.1 anywhere in the popup.

I think I know what’s up. The About page uses the Host HTTP header instead of the URL_HOST config var. I guess you’re accessing asciinema server via some sort of reverse proxy? If so, you may want to configure the proxy to forward the Host header to the upstream (asciinema server).

Amazing, that fixed the problem, thanks! :smiley:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.