[PR #844] [CLOSED] Update Configuration.md to show SHIORI_HTTP_PORT deprecation. #816

Closed
opened 2026-02-25 23:35:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/844
Author: @tenpai-git
Created: 2/18/2024
Status: Closed

Base: masterHead: patch-1


📝 Commits (1)

  • 49210ef Update Configuration.md to show SHIORI_HTTP_PORT deprecation.

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 docs/Configuration.md (+3 -2)

📄 Description

Data

  • Shiori version: v1.5.5
  • Database Engine: PostgreSQL
  • Operating system: Debian 12 Bookworm
  • CLI/Web interface/Web Extension: Command Line Interface (CLI)

Describe the bug / actual behavior

The configuration page has SHIORI_HTTP_PORT as a port you can assign as an environment variable for Linux distributions. However, even if you set the environment variable at the system level, the assignment will not work. With the introduction of the -p flag, it seems that Shiori will always default to 8080, no matter what you set SHIORI_HTTP_PORT to be as an environment variable, because the runtime variable is a higher priority. Instead you must set -p at runtime, or the hosted port will not change.

This is meant to be a simple pull request before the overall documentation revamp.

Proposed Change

Because other options are also deprecated, I recommend making another note in the configuration documentation about this for now in the same style as the other deprecation, as to reduce confusion for current users of Shiori. A future update for Shiori can address all deprecated configuration options and be easily found on this page for the developers.

To Reproduce

Steps to reproduce the behavior:

  1. Add an environment variable in /etc/environment for your Linux-based system (I used a Debian 12 Linux Container, location may slightly differ based on OS). This will make a global system variable accessible anywhere to your program, including Shiori.

root@host# echo SHIORI_HTTP_PORT=15000 >> /etc/environment

  1. Load your change to the file into the current running system environment. source /etc/environment

  2. Download, compile, and run Shiori on the same system. It will tell you the web server is running the HTTP protocol on port 8080.

In the directory you want to download Shiori:
git clone https://github.com/go-shiori/shiori

Use cd to enter that directory and compile and run the binary: go build main.go
./main server

The output will look like this:

INFO[2024-02-18T17:46:24Z] Starting Shiori vdev                         
INFO[2024-02-18T17:46:24Z] starting http server                          addr=":8080"

Setting a custom port.

The only way to change this behavior currently is to use the p option (for example, a custom port of 16000): ./main server -p 16000

The output should then become:

INFO[2024-02-18T17:47:54Z] Starting Shiori vdev                         
INFO[2024-02-18T17:47:54Z] starting http server                          addr=":16000"

Notes

This solution doesn't change the behavior of Shiori at all, it is only designed to be a temporary note in the same style as existing documentation to make addressing it easier later.

This documentation change will make it more clear to save time for users looking on how to set environment variables on manual or Infrastructure-As-Code automated installations (Ansible), and those unfamiliar with Golang.

Alternative solutions are to remove both deprecation notes and the options from the tables, and/or make a new table for deprecated options towards the bottom of the article in case additional deprecations are expected in upcoming development.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/844 **Author:** [@tenpai-git](https://github.com/tenpai-git) **Created:** 2/18/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`49210ef`](https://github.com/go-shiori/shiori/commit/49210efeb9f43d6784a302cd95a232fd12bdf233) Update Configuration.md to show SHIORI_HTTP_PORT deprecation. ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/Configuration.md` (+3 -2) </details> ### 📄 Description ## Data - **Shiori version**: v1.5.5 - **Database Engine**: PostgreSQL - **Operating system**: Debian 12 Bookworm - **CLI/Web interface/Web Extension**: Command Line Interface (CLI) ## Describe the bug / actual behavior The configuration page has `SHIORI_HTTP_PORT` as a port you can assign as an environment variable for Linux distributions. However, even if you set the environment variable at the system level, the assignment will not work. With the introduction of the `-p` flag, it seems that Shiori will always default to 8080, no matter what you set `SHIORI_HTTP_PORT` to be as an environment variable, because the runtime variable is a higher priority. Instead you *must* set `-p` at runtime, or the hosted port will not change. This is meant to be a simple pull request before the overall documentation revamp. ## Proposed Change Because other options are also deprecated, I recommend making another note in the configuration documentation about this for now in the same style as the other deprecation, as to reduce confusion for current users of Shiori. A future update for Shiori can address all deprecated configuration options and be easily found on this page for the developers. ## To Reproduce Steps to reproduce the behavior: 1. Add an environment variable in `/etc/environment` for your Linux-based system (I used a Debian 12 Linux Container, location may slightly differ based on OS). This will make a global system variable accessible anywhere to your program, including Shiori. `root@host# echo SHIORI_HTTP_PORT=15000 >> /etc/environment` 2. Load your change to the file into the current running system environment. `source /etc/environment` 3. Download, compile, and run Shiori on the same system. It will tell you the web server is running the HTTP protocol on port `8080`. In the directory you want to download Shiori: `git clone https://github.com/go-shiori/shiori` Use `cd` to enter that directory and compile and run the binary: `go build main.go` `./main server` The output will look like this: ``` INFO[2024-02-18T17:46:24Z] Starting Shiori vdev INFO[2024-02-18T17:46:24Z] starting http server addr=":8080" ``` ## Setting a custom port. The only way to change this behavior currently is to use the `p` option (for example, a custom port of 16000): `./main server -p 16000` The output should then become: ``` INFO[2024-02-18T17:47:54Z] Starting Shiori vdev INFO[2024-02-18T17:47:54Z] starting http server addr=":16000" ``` ## Notes This solution doesn't change the behavior of Shiori at all, it is only designed to be a temporary note in the same style as existing documentation to make addressing it easier later. This documentation change will make it more clear to save time for users looking on how to set environment variables on manual or Infrastructure-As-Code automated installations (Ansible), and those unfamiliar with Golang. Alternative solutions are to remove both deprecation notes and the options from the tables, and/or make a new table for deprecated options towards the bottom of the article in case additional deprecations are expected in upcoming development. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#816
No description provided.