Skip to content

Say fly.toml [[files]] raw_value takes plain text, not base64 - #2687

Open
mlr wants to merge 1 commit into
mainfrom
fix-files-raw-value-plain-text
Open

mlr wants to merge 1 commit into
mainfrom
fix-files-raw-value-plain-text

Conversation

@mlr

@mlr mlr commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

The files section of the fly.toml reference told readers to base64-encode raw_value, and its example used raw_value = "aGVsbG8gd29ybGQK". But flyctl base64-encodes raw_value itself when it builds the Machine config (internal/appconfig/config.go#L153-L155). So a file written the way the page said reached the Machine as base64 text instead of the file's contents. An app that reads that file, such as a script run with python /app/server.py, fails on start.

Now the page says raw_value is the plain file content and flyctl encodes it, and the example uses raw_value = "hello world\n".

The Machines API pages don't change: in the API's Machine config, files[].raw_value really is base64.

Preview

https://fly-io-fix-files-raw-value-plain-text.mintlify.site/reference/configuration#the-files-section

Related Fly.io community and GitHub links

Notes

I deployed one app with flyctl v0.5.14 and two [[files]] entries: one written as the new text says, one copied from the old example. The process prints both files with od -c.

[[files]]
  guest_path = "/app/new.txt"
  raw_value = "hello world\n"
[[files]]
  guest_path = "/app/old.txt"
  raw_value = "aGVsbG8gd29ybGQK"

The Machine config (fly machine status -d), with each raw_value decoded:

/app/new.txt raw_value = aGVsbG8gd29ybGQK -> decoded: b'hello world\n'
/app/old.txt raw_value = YUdWc2JHOGdkMjl5YkdRSw== -> decoded: b'aGVsbG8gd29ybGQK'

The Machine's logs:

NEW
0000000   h   e   l   l   o       w   o   r   l   d  \n
OLD
0000000   a   G   V   s   b   G   8   g   d   2   9   y   b   G   Q   K

The new text gives hello world\n on the Machine. The old example gives the base64 string itself.

@mintlify

mintlify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
fly-io 🟢 Ready View Preview Nov 23, 2026, 11:32 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@mlr
mlr marked this pull request as ready for review November 23, 2026 23:34
@mlr
mlr requested a review from a team as a code owner November 23, 2026 23:34

This branch was successfully deployed

1 active deployment
staging — 80f3bab6 Deployed Nov 23, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant