Create protocol aliases
mainAliases allow you to map a custom protocol name to a specific backend configuration. This is useful for multi-cloud setups (e.g., mapping tos:// to an S3-compatible backend).
Via CLI
# Configure a profile for Volcengine TOS
$ megfile config s3 accesskey secretkey \
--addressing-style virtual \
--endpoint-url https://tos-s3-cn-beijing.ivolces.com \
--profile-name tos
# Create the alias
$ megfile config alias tos s3+tosVia Environment Variables
You can define aliases using the MEGFILE_ALIASES__<NAME> environment variable. This is equivalent to an entry in the [alias] section of megfile.conf and takes precedence over the config file.
export MEGFILE_ALIASES__TOS=s3+tos
export MEGFILE_ALIASES__DATASET=s3+prod://bucket/prefixOnce defined, you can use the alias directly in paths: tos://bucket/key.
export MEGFILE_ALIASES__TOS=s3+tos