This presentation deals with the utilization of nanostructured silicon (porous silicon and silicon nanotubes) for deposition of various metals, especially magnetic ones, within the pores/tubes. The novel magnetic properties of the semiconducting/magnetic composites which arise due to the nanoscopic size of the used materials are investigated with respect to optical and magnetic on-chip applications.Porous silicon is fabricated by anodization of a silicon wafer in an aqueous hydrofluoric solution. The morphology of the porous structures depends on the doping density of the used wafer and on the applied current density as well as the electrolyte concentration. The ferromagnetic metals are deposited within the porous structures electrochemically in using the corresponding metal salt solution as electrolyte. A modification of the electrochemical parameters results in adjustable size and shape of the deposits. Ni and Co, both metals are electrodeposited within the nanostructured silicon in using aqueous NiSO4 and CoSO4 solutions by applying a current density between 10 and 20 mA/cm2 and a frequency between 0.05 and 0.2 Hz.One of our key topics is luminescent porous silicon loaded with magnetic metals to enhance the photoluminescence, with the final aim to influence/control the optical properties by a magnetic field. The metal deposits affect the optical properties but also give rise to specific magnetic behavior (1). Due to the metal filling of the porous silicon the photoluminescence is blue-shifted and furthermore an increase of the intensity is observed. The influence of the magnetic metal filling on the optical properties (photoluminescence, decay time) is discussed, and the magnetic characterization of the nanocomposites is presented.A further issue, the deposition of hard and soft magnetic materials within the nanostructures, aiming in the fabrication of arrays of permanent nanomagnets is presented (2). Here the investigation of the magnetic behavior of bi-metal nanostructures within nanostructured silicon with the aim to exploit the magnetic properties of both metals and gain control of the exchange coupling between the two metals especially with respect to their volume ratio is discussed. Furthermore, a variation of the structure size and the proximity of the metal deposits modify the exchange coupling and thus the energy product. Nanocomposite systems with an energy product as high as possible should be achieved to give rise to on-chip applications using permanent nanomagnets, especially arranged in arrays.(1) P. Granitzer, et al, Frontiers in Physics, 8 (2020) 121(2) K. Rumpf, et.al, Phys. Stat. Sol. A, 217 (2020) 1901040