SERVER_CERT_PATH and SERVER_KEY_PATH are not mentioned in the documentation. I suggest to add a HTTPS section to docs/ENVIRONMENT_VARIABLES.md documenting these two variables.
Originally created by @fabriziosorgente on GitHub (Apr 19, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/272
Originally assigned to: @arunavo4 on GitHub.
The application supports native HTTPS out of the box through `@astrojs/node`, but this is not documented in the project.
`@astrojs/node` v10 reads two environment variables at runtime in [standalone.ts](https://github.com/withastro/astro/blob/refs/tags/@astrojs/node@10.0.1/packages/integrations/node/src/standalone.ts):
```ts
if (process.env.SERVER_CERT_PATH && process.env.SERVER_KEY_PATH) {
httpServer = https.createServer({
key: fs.readFileSync(process.env.SERVER_KEY_PATH),
cert: fs.readFileSync(process.env.SERVER_CERT_PATH),
}, listener);
}
```
When both variables are set, the server starts as a real HTTPS server.
To deploy gitea-mirror in HTTPS, add this to your `.env` or systemd service:
```
SERVER_CERT_PATH=/path/to/cert.pem
SERVER_KEY_PATH=/path/to/key.pem
PORT=443
BETTER_AUTH_URL=https://your-domain.com
BETTER_AUTH_TRUSTED_ORIGINS=https://your-domain.com
```
`SERVER_CERT_PATH` and `SERVER_KEY_PATH` are not mentioned in the documentation. I suggest to add a HTTPS section to `docs/ENVIRONMENT_VARIABLES.md` documenting these two variables.
<!-- gh-comment-id:4277726879 -->
@arunavo4 commented on GitHub (Apr 20, 2026):
Thanks @fabriziosorgente `@astrojs/node@10` does read `SERVER_CERT_PATH` / `SERVER_KEY_PATH` at runtime, and we're on that version. Documented in 8cb8fd6:
- Env reference: [HTTPS / TLS section](https://github.com/RayLabsHQ/gitea-mirror/blob/main/docs/ENVIRONMENT_VARIABLES.md#https--tls)
- `.env.example` now includes commented examples
```bash
SERVER_CERT_PATH=/etc/ssl/gitea-mirror/cert.pem
SERVER_KEY_PATH=/etc/ssl/gitea-mirror/key.pem
```
Closing as documented. Thanks for the write-up!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @fabriziosorgente on GitHub (Apr 19, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/272
Originally assigned to: @arunavo4 on GitHub.
The application supports native HTTPS out of the box through
@astrojs/node, but this is not documented in the project.@astrojs/nodev10 reads two environment variables at runtime in standalone.ts:When both variables are set, the server starts as a real HTTPS server.
To deploy gitea-mirror in HTTPS, add this to your
.envor systemd service:SERVER_CERT_PATHandSERVER_KEY_PATHare not mentioned in the documentation. I suggest to add a HTTPS section todocs/ENVIRONMENT_VARIABLES.mddocumenting these two variables.@arunavo4 commented on GitHub (Apr 20, 2026):
Thanks @fabriziosorgente
@astrojs/node@10does readSERVER_CERT_PATH/SERVER_KEY_PATHat runtime, and we're on that version. Documented in8cb8fd6:.env.examplenow includes commented examplesClosing as documented. Thanks for the write-up!