Ion acceleration in a solenoid-free plasma expanded by permanent magnets