How to Upload Music Files using sFTP in Azuracast?

[wpseo_breadcrumb]

In the early days of Azuracast, connecting via SFTP was a bit tricky and hard.

docker run –rm \\\\\\\\\\\\\\\\

    -v azuracast_station_data:/home/azuracast/stations \\\\\\\\\\\\\\\\

    -p 2222:22 atmoz/sftp:alpine \\\\\\\\\\\\\\\\

    azuracast:C27b6889c75ee8238e2:1000::stations

Especially for the newbies or for users who are not confident with using the shell command, the code above is not something they want to try.

Good thing, Azuracast has improved a long the way. With the latest AzuraCast version, SFTP connection has been made easier. So I will be guiding you on how to create an SFTP user and then connect the user using several FTP clients such as Coda 2 for Mac users, the more popular one, FileZilla and for advanced users, the Terminal command.

Create the SFTP user

On the sidebar, under Utilities >> click SFTP user

Click “Add SFTP user” then fill up the username and password. Note that “SSH Public Keys” is optional but recommended if you don’t want to use a password when connecting.

Once you have the user, take note of the IP address and port number located on the right sidebar under “Connection Information”.

Once you have the prerequisites, it’s now time to connect using FTP clients.

Connect using Coda 2 by Panic

Open the application. Click the + button located at the bottom left. Then click the server tab and add the parameters. Protocol must be SFTP. Fill up the following fields using the (dynamic) informations from the SFTP tab of your Azuracast panel.

Click save then double click the information to connect. Once connected, you can now upload your audio files directly or create folders first to organize them.

Troubleshooting tips:

If files under Music files tab are not in-sync with the files in the SFTP client, do the following until it’s showing:

  1. Reload broswer
  2. Create a new folder – https://share.getcloudapp.com/jkuK6yOr
  3. In your SFTP client, refresh the directory (right click on your mouse then choose refresh)
  4. If it’s still not showing, reprocess media by navigating to /var/azuraast then executing ./docker.sh cli azuracast:media:reprocess command.

    cd /var/azracast

    ./docker.sh cli azuracast:media:reprocess


    https://share.getcloudapp.com/mXuqv7DB (Note: You must have root privileges to do this. If not permitted, please inform your system administrator.)

Connect using FileZilla

Open the application. On the Host field: Enter the correct format sftp://domainOrIP. On my example, the hostname should be sftp://206.189.152.134.

Connect using Mac Terminal

Open the application. This format should be followed:

sftp -P(not p) {port#} username@IP

Example, sftp -P 2022 [email protected] then hit enter. Type the password when prompted.

Tips:

  1. To upload files use “put{filename}.
  2. Make sure that your are on the right directory. To check local dirctory use “lpwd” command.