Skip to content

Feature: ignore empty servers.json file #3318

Description

@Pyroluk

Is this urgent?

No

Host OS

Debian 12 Bookworm

CPU arch

x86_64

VPN service provider

Cyberghost

What are you using to run the container

docker run

What is the version of Gluetun

Running version latest built on 2026-05-04T13:39:33.354Z (commit aab10f9) on Linux 6.1.0-45-amd64 (x86_64)

What's the problem 🤔

Hi,

I am running a container that gets automatically updated with new docker image releases daily, and is started/stopped several times a day.

Somehow, sometimes the servers.json, I mount into the container, gets deleted/emptied out, leaving a 0 byte servers.json in the folder.
Now starting Gluetun, it crashes with "ERROR reading servers from file: decoding servers: unexpected end of JSON input" in the logs.

It would be nice, if first the file is checked for emptiness, instead of trying to parse it. Or maybe override the file in case of any parsing error in general.

Cheers from Germany,
Lukas

Share your logs (at least 10 lines)

(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
(I recreated the container and deleted the logs already, sorry)
ERROR reading servers from file: decoding servers: unexpected end of JSON input

Share your configuration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions