# Joplin Server: Use different port

**URL:** <https://discourse.joplinapp.org/t/joplin-server-use-different-port/40177>\
**Category:** Support\
**Created:** [14 September 2024 17:49 UTC](https://discourse.joplinapp.org/t/joplin-server-use-different-port/40177 "2024-09-14T17:49:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marph](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marph/32/10800_2.png) [@Marph](https://discourse.joplinapp.org/u/Marph)\
**Post date:** [14 September 2024 17:49 UTC](https://discourse.joplinapp.org/t/joplin-server-use-different-port/40177/1 "2024-09-14T17:49:36Z")

</div>

### Operating system

Linux

### Joplin version

3.0.1

### Sync target

Joplin Server

### What issue do you have?

I'm pretty new to Joplin Server and would like to run it on a different port in my local network. I. e. `9017` instead of the default `22300`. Is this possible?

I'm using Joplin Server 3.0.1. My attempt was to simply change the port in the configuration, but then I can't access the login page anymore (with port `22300` configured, it works):

```sh
$ docker container ls -n 1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b6c0e70733fe joplin/server:latest "tini -- yarn start-…" 3 minutes ago Up 3 minutes 0.0.0.0:9017->22300/tcp, :::9017->22300/tcp joplin-app-1

$ curl <IP>:9017
curl: (7) Failed to connect to <IP> port 9017 after 50 ms: Verbindungsaufbau abgelehnt

```

The complete `compose.yml` is:

```yaml
version: '3'

services:
    db:
        image: postgres:16
        volumes:
            - ./data/postgres:/var/lib/postgresql/data
        ports:
            - "3003:3003"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
        # custom postgres port
        # https://discourse.joplinapp.org/t/joplin-server-with-custom-database-port/18916/2
        command: -p 3003
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "9017:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=9017
            - APP_BASE_URL=http://<IP>:9017
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=3003
            - POSTGRES_HOST=db

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [14 October 2024 17:50 UTC](https://discourse.joplinapp.org/t/joplin-server-use-different-port/40177/2 "2024-10-14T17:50:36Z")

</div>

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